CrossGeeks / AzurePushNotificationPlugin

Azure Push Notification Plugin for Xamarin iOS and Android
MIT License
67 stars 34 forks source link

Fix token parsing in iOS13 #26

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi, this PR fix token parsing for iOS 13. The NSData description changed in new iOS13 and the actual underlying token isn't completely written anymore inside it. To get the entire token, we should now extract the token and format each byte from it into a new string. The first method is kept to allow the plugin to work on iOS >=13 as well as iOS <13 .

rdelrosario commented 4 years ago

Nice work! Thanks

ghost commented 4 years ago

I'm afraid that I made a mistake. It seems the token format does not depends on iOS version but rather on "Target sdk" version. My iOS version check is wrong, then.