Step 1: Enable push notificaiton on certificate on Apple developer portal
Step 2: Request Push notification in iOS app
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { success, error in
if let error {
print("Notification access not granted.", error.localizedDescription)
}
}
Step 3: Save this test.apns
{
"Simulator Target Bundle": "<bundle_id>",
"aps":{
"alert":"Test",
"sound":"default",
"badge":1
}
}
Step 4: drag test.apns
to iOS simulator