Device Registration for push notifications not working on iOS 13

After some headbanging tonight to find why I wasn’t receiving my test push notifications I found out that it’s actually a much bigger issue affecting all iOS 13 users!
The deviceToken fields of the DeviceRegistration table looks like this:

{length=32,bytes=0x71581cd975c3f3feab0c90a374e103a7…6bf5f60561b55640}

This obviously isn’t a valid device token! After digging a little bit I found out that the reason is that your iOS SDK uses [NSData description] (albeit implicitly by using [NSString stringWithFormat:@"%@", token]) to convert the token to NSString. However, this is unreliable since what description returns can change. And indeed it did change in iOS 13!
For more info see the comments of this answer: ios - How can I convert my device token (NSData) into an NSString? - Stack Overflow

Please treat this issue with the needed priority as it effectively prevents almost all iOS users from receiving push notifications!

2 Likes

Hello,

The internal ticket BKNDLSS-19707 created. We’ll investigate this issue and answer as soon as possible.

Regards,
Olha

1 Like

Hi @milen-marinov

I also came across this issue in iOS 13/Xcode 11. I updated my app to use the latest version of the Backendless SDK, which is now called BackendlessSwift

Using the new version the issue is not longer occurring and device Token is correctly saved during device registration.

Hope this helps,
Mitch

BackendlessSwift is our new SDK for Apple devices. Anyway the task is in progress and fix for iOS-SDK will appear very soon.

Regards,
Olha

Is BackendlessSwift compatible with ObjectiveC code? And is it backwards-compatible with the “old” iOS SDK?

Hi, Milen!

BackendlessSwift SDK was designed to be backward compatible with old SDK and with ObjC code.
Let us know if you have any problems with it.

Regards,
Andrii.

@milen-marinov

It took me about 30 minutes to get up and running on the new SDK. Some of the functions are slightly different, but Xcode essentially suggested all the new nomenclature for me, it was just a matter of going through each function call.

1 Like

@mitchell,

Looks like a lot of things have different names and some synchronous calls are missing. I don’t have the time to migrate right now but thanks for letting me know of this alternative SDK.

Hello,

issue has been fixed. Please update to v5.5.0 and verify whether it works now.

Regards,
Olha

2 Likes

Hi @olhadanylova,

The issue is indeed fixed in v5.5.0! Thanks!

Best,
Milen