iOS Question gettoken returns empty for firebase notifications

tufanv

Expert
Licensed User
Longtime User
Hello

I use the following sub to get user token :

B4X:
Private Sub GetToken As String
    Dim no As NativeObject
    Dim token As NativeObject = no.Initialize("FIRInstanceID").RunMethod("instanceID", Null).RunMethod("token", Null)
    If token.IsInitialized Then Return token.AsString Else Return ""
End Sub

and under fcmconnected I use:

....
...
sleep(500)
log(gettoken)

it returns empty. I can send to topic and device get the msg
 
Top