Push notifications doesn't work

Are you looking for help?

Hi everyone. Currently, I’m configuring notifications, so far I have registered devices without no problems, but when I try to send notifications, devices are not receiving them.

Backendless Version (3.x / 5.x, Online / Managed / Pro )

v6.5.4

Client SDK (REST / Android / Objective-C / Swift / JS )

SwiftSDK
Current iOS app version: 15.0

Application ID

53659D05-8CE2-3A56-FF51-4838E888AF00

Expected Behavior

  1. Send notifications from BackendlessUI or SDK methods
  2. Notification appears in the registered device in the specified channel (default)

Actual Behavior

  1. I try to send a notification
  2. Registered devices do not receive notification

Code for registration

extension AppDelegate: UNUserNotificationCenterDelegate {
    
    func setUpEnableUserNotifications() {
        let options: UNAuthorizationOptions = [.alert, .sound, .badge]
        unUserNotificationCenterCurrent.delegate = self
        unUserNotificationCenterCurrent.requestAuthorization(options: options) { success, _ in guard success else { return } }
        UIApplication.shared.registerForRemoteNotifications()
    }
    
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        let responseHandler = { (response: String) -> Void in print(response)}
        
        let errorHandler = { (fault: Fault) -> Void in
            assertionFailure("An error occurred while trying to save changes to the server - Error code: \(fault.message)")
        }
        
        Backendless.shared.messaging.registerDevice(deviceToken: deviceToken, responseHandler: responseHandler, errorHandler: errorHandler)
    }
    
    func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
        print("Device registration failed: \(error.localizedDescription)")
    }
}

Hello,

Have you added iOS certificate in Backendless console?

Regards,
Mark

Yea, an iOS certificate is added.

Regards

Is it a SANDBOX or PRODUCTION cert?

It’s a Sandbox cert

So far so good. Did you go through the setup described here?:
https://backendless.com/docs/ios/push_xcode_setup_for_apn.html

Specifically, did you configure NotificationService ?

Excellent! Thank you for confirming.

Regards,
Mark