Reputation: 3565
As mentioned in Firebase documentation we can retrieve FCMToken as follows.
NSString *fcmToken = [FIRMessaging messaging].FCMToken;
NSLog(@"FCM registration token: %@", fcmToken);
However above returns compile time error Property 'FCMToken' not found on object of type 'FIRMessaging *'
.
How to get FCMToken?
Upvotes: 6
Views: 4952
Reputation: 1490
Try using :
NSString *fcmToken = [[FIRInstanceID instanceID] token];
For more information on this, please follow: stackoverflow post
Upvotes: 10