parse-community / Parse-SDK-dotNET

Parse SDK for .NET, Xamarin, Unity.
http://parseplatform.org
Apache License 2.0
323 stars 261 forks source link

ParseInstallation.CurrentInstallation.SetDeviceTokenFromData(NSData deviceToken) may not be up to date for iOS 13. #338

Closed SmatchyLaPaglia closed 4 years ago

SmatchyLaPaglia commented 4 years ago

As per this website: https://nshipster.com/apns-device-tokens/ the format Apple uses for deviceTokens has changed, and I wonder if this requires an update to ParseInstallation.CurrentInstallation.SetDeviceTokenFromData(NSData deviceToken).

I am seeing irregularities with deviceTokens while registering for Push Notifications on Xamarin in Visual Studio Mac.

Sometimes devices seem to have no tokens at all. Sometimes the token shown on the Dashboard does not match those shown on the device.

TobiasPott commented 4 years ago

@SwingsetTheory I'm very confused where you came across the method you mentioned in the Parse SDK for .NET. What version of the SDK are you using? I neither can find the method in the 1.7.0 nor the 2.0.0-develop version.

I have the feeling that this is either an even more outdated and unmaintained version than 1.7.0 or a different platform SDK (or some fork?)

SmatchyLaPaglia commented 4 years ago
Screen Shot 2020-07-21 at Jul 21  1 17 24 pm

The warnings have to do with .NETFrameworks and shouldn't affect the available methods, should they?

I don't know if this helps, but it's more information:

Screen Shot 2020-07-21 at Jul 21  1 19 43 pm
SmatchyLaPaglia commented 4 years ago

Found it, it's in the iOS SDK:

https://docs.parseplatform.org/ios/guide/#using-channels

But as this is a bug occurring in Xamarin and Visual Studio using Parse and C#, should it really be posted there? It's not actually a problem I'm having with iOS itself....

Here is the code I am using to test it, inside the AppDelegate in the Xamarin iOS project:

Screen Shot 2020-07-21 at Jul 21  1 43 56 pm

Here is the printout in Application Output from that: image

I can confirm from the Dashboard that the second deviceToken printed there is correct.

So the question is, how do I use Parse in Xamarin to correctly set this device token?

SmatchyLaPaglia commented 4 years ago

I am unsure at this point that I have diagnosed the issue correctly.

I deleted the problematic Installations and started over and they seem to be working correctly now.

Closing unless further information develops.