简体   繁体   中英

IOS - FCM Push Notification not received from firebase console

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.

在此处输入图片说明 This is what i am getting from firebase console

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM