2
votes

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.

enter image description hereThis is what i am getting from firebase console

1
Don't use APNS token, Use FCM tokenSivajee Battina
Follow my tutorial incase if you don't understand: insights.nimblechapps.com/app-development/ios-app-development/…Sivajee Battina

1 Answers

0
votes

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