-
-
Save graco911/cac6a3c3fbd00bb1deaaf209a0cb453c to your computer and use it in GitHub Desktop.
Firebase RegisteredForRemoteNotifications iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) | |
{ | |
// Get current device token | |
var DeviceToken = deviceToken.Description; | |
if (!string.IsNullOrWhiteSpace(DeviceToken)) | |
{ | |
DeviceToken = DeviceToken.Trim('<').Trim('>'); | |
CrossFirebasePushNotification.Current.Subscribe("Ecopulse_news"); | |
CrossFirebasePushNotification.Current.Subscribe("Ecopulse_ios"); | |
} | |
#if DEBUG | |
FirebasePushNotificationManager.DidRegisterRemoteNotifications(deviceToken, FirebaseTokenType.Sandbox); | |
System.Console.WriteLine("DeviceToken : " + DeviceToken); | |
TokenUpdate(DeviceToken); | |
#endif | |
#if RELEASE | |
FirebasePushNotificationManager.DidRegisterRemoteNotifications(deviceToken,FirebaseTokenType.Production); | |
System.Console.WriteLine("DeviceToken : " + DeviceToken); | |
TokenUpdate(DeviceToken); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment