I have a native ios application and it enabled FCM. I have uploaded certificate to firebase and added GoogleService-Info.plist to my project from appdelegate
-(void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[FIRMessaging messaging].APNSToken = deviceToken;
NSLog(@"FCM deviceToken : %@", deviceToken);
}
And I have received token "FCM deviceToken : <076bc1b2 31493038 08da0351 8d272982 d04f7171 46f6e619 31e89403 1457fc19>"
I have tried with this token in console, but it's showing failed.
hi @Anju You need to use
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken (NSData *)deviceToken{
[FIRMessaging messaging].APNSToken = deviceToken;NSString *fcmToken = [FIRMessaging messaging].FCMToken;
NSLog(@"FCM deviceToken : %@", deviceToken);
}
FCMtoken