Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Why the player Id is empty from oneSignal on Xamarin? Just in iOS

$
0
0

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;
                            }));

Viewing all articles
Browse latest Browse all 204402

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>