Skip to content

Instantly share code, notes, and snippets.

@louismullie
Last active June 21, 2018 00:25
Show Gist options
  • Save louismullie/14645dacc50d134a51891bea8110f02c to your computer and use it in GitHub Desktop.
Save louismullie/14645dacc50d134a51891bea8110f02c to your computer and use it in GitHub Desktop.
didRegisterForRemoteNotificationsWithDeviceToken
@import Firebase;
@import FirebaseMessaging;
/**
* Manually set the APNS token when the user successfully registered for remote notifications
*/
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[[FIRMessaging messaging] setAPNSToken: deviceToken];
}
// If this works, we should implement it as a plugin instead: https://stackoverflow.com/questions/31000387/customizing-ioss-applicationdidfinishlaunchingwithoptions-method-in-a-cordova
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment