I'm having a little problem getting the player Id from Xamarin. I'm making an application in Xamarin Forms, it works for Android, but when I try to get it on iOS the string is Empty.
Then, when I want to get the value of "playerId" (My var) it is Empty. This happens just in iOS--when I do this on Android it works fine. Obviously before I register the app with the OneSignal Key, my device(iPhone) is registered on the OneSignal page and I can receive push notifications. I need get the playerId to save it on my DataBase.
This is my code:
string playerId="";
OneSignal.Current.IdsAvailable(new Com.OneSignal.Abstractions.IdsAvailableCallback((playerID, pushToken) =>
{
playerId = playerID;
}));