Push Notification is not working (iOS)

Thanks. But still my iPhone device didn’t receive the push notification . When I tried to send the push notification to my device using NWPusher and then my iPhone received the alert. But when i am sending the push notification from backendless, alert is not received . Please let me know what is to be done

I think the backendless is not accepting the deviceId i have entered. Because , when i added my deviceId, it is still showing the number of recipients as zero.
My device Id is BD8D9F3C-4A5B-8781-FFE8-C1D00F0A2400

Hello @Kevin_McClain

Make sure there is a data object with this device id in the DeviceRegistration Table, if not you have to register the device before send any Push Notifications

Regards, Vlad

When I login from my iPhone, user device Id updated in the backendless is :
BD8D9F3C-4A5B-8781-FFE8-C1D00F0A2400::default

Why there is a “default” in the end of device id? Will that be the reason for not receiving the push notifications in my device?

After getting the deviceId in app delegate, i am storing the device Id in a local storage and when the push notification is sent, device Ids are taken and push notification is sent based on the user device Ids (not device token).The code to get deviceId from the device token is attached below:

Yesterday,I updated the backendless to 5.6.0 (Earlier it was 4.0.29) in my podfile. I did this to check whether the push notification issue was because of the older backendless version.But after updating the backendless , user device Id getting from the backendless is a default value ( BD8D9F3C-4A5B-8781-FFE8-C1D00F0A2400::default ). I have attached the screenshot of the code for getting the user device Id from the device token in the above comment. This user device Id is used for sending push notifications to the users. Please let me know what to be done.

The registerDevice() method response is not a deviceId but registrationId.
You can get deviceId this way:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {
    [Backendless.shared.messaging registerDeviceWithDeviceToken:deviceToken responseHandler:^(NSString *registrationId) {
        NSLog(@"Device registration completed");
        NSLog(@"DeviceId = %@", Backendless.shared.messaging.currentDevice.deviceId);
    }];
}

This signature is from Swift-SDK but iOS-SDK has the same method.

Regards,
Olha

There is no registerDeviceWithDeviceToken method. Please see the screenshot below. These were the methods shown when i searched for registerdevice.

I tried another method such that I stored value of Backendless.shared.messaging.currentDevice.deviceId in a string variable and saved as userDeviceId in backendless. Now the userDeviceId is :
83BCD311-3962-48B6-AA2D-B24D12BAA261

Then i tried to send the push notification message from backendless to my device. As you had said yesterday, in the segment section , i gave deviceId = ‘83BCD311-3962-48B6-AA2D-B24D12BAA261’ and i send the push notification . But my iPhone didn’t receive the push notification.

Please see the screenshot below. This is how i send the push notification message from backendless.

The method you’ve selected on the screenshot is the method you need.
Some of the signatures are a little different and our documentation is made for Swift-SDK since iOS-SDK is deprecated.

Regards,
Olha

Yes . i am passing the device token to that method. But the result i am getting from that method is a default value.
BD8D9F3C-4A5B-8781-FFE8-C1D00F0A2400::default.

I am getting this default value after updating the backendless to 5.6.0 (Earlier it was 4.0.29). When i am using the older backendless version (4.0.29), i am getting the device id as 83BCD311-3962-48B6-AA2D-B24D12BAA261.

In both cases, my device is not receiving any push notifications from backendless

As I’ve already said here

The registerDevice() method response is not a deviceId but registrationId .

You need to use Backendless.shared.messaging.currentDevice.deviceId to get deviceId without ::default.

Can I connect my own certificate to your application to check push notifications on my device?
Unfortunately its impossible for me to use yours as far as I’m not in your Apple dev team.

What should i do to connect you to Apple dev team?

I don’t think it will work as far as I’m in other group now and I’m not sure if it’s possible to be connected to 2 groups simultaneously. That’s why I’m asking if I can connect my own certificate for testing (I won’t remove yours).

Regards,
Olha

yes . you can add your certificate to my application.

Ok, then please remove the OlhaTest channel from your’s certificate support.
Yo can do it by specifying channels for your certificate here:

I have deleted the OlhaTest channel . Now the channels in backendless are Production, Sandbox and Default.

No no you shouldn’t delete it.
Just remove the support of your certificate for that channel. You see - your certificate is set for all channels and it doesn’t allow me to add certificate for my OlhaTest channel.
Please change he pattern for your certificate as here:

After my tests you can set it back to all channels but for now please change like on the screenshot.

Ooh . i deleted the OlhaTest channel . will there be a problem if i delete that channel?

Nope, no problems)

I have made changes . Can you please check now?