Closed fsantanac closed 2 years ago
@fsantanac Thanks for reporting the issue. We have a release OneSignalSDK.Xamarin-4.0.0 in which this issue no longer seems to exist.
we have moved the push notification subscription status' ids to a new api. You check out our documentation on the changes regarding the status ids in our OneSignal Xamarin 4.0.0 API reference documentation
Please note that we have changed the package name and namespace for the SDK from Com.OneSignal
to OneSignalSDK.Xamarin
and would require you to remove the previous package name and add the new package name to import the SDK in your code.
Additionally, when searching for the package on nuget.org, you will be required to search for OneSignalSDK.Xamarin to import the package
Description:
Hi. We have a problem with the IdsAvailable callback. It is supposed that if a device is in User Opted Out state, the pushtoken value of the callback should come to null. Well in android it comes correctly to null but in ios it returns a valid token. This makes that we do not know the state of the ios devices.
Is it a bug or is there another way that we have not found in the documentation to know in Xamarin the state of the devices?
Environment
Steps to Reproduce Issue:
OneSignal.Current.IdsAvailable(IdsAvailable);
// pushToken in android return null ok // pushToken in iOS return pushToken valid with User Opted Out state try { if (pushToken != null) { Preferences.Set("PushAllow", true); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }