Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Back in Unity you’ll want to grab the device token for this player’s device and then register them to UserWise:

Code Block
languagec#
DeviceToken = await Firebase.Messaging.FirebaseMessaging.GetTokenAsync();

NotificationPlatform platform = (Application.platform == RuntimePlatform.Android) ?
            NotificationPlatform.fcm :
            NotificationPlatform.apns;

UserWise.INSTANCE.PushNotificationsModule.RegisterDeviceToken(platform, DeviceToken, (success) =>
        {
            UnityEngine.Debug.Log("Device token registration succeeded? " + success);
        });

...