react-native ios 푸시알림 에러

이승우·2024년 1월 23일

10.19.0 - [FirebaseMessaging][I-FCM002022] APNS device token not set before retrieving FCM Token for Sender ID '*** '.Be sure to re-retrieve the FCM token once the APNS device token is set.

프로젝트에서 ios 푸시알림을 구현해야해서 공식문서를 따라했는데 되지않았다.

getAPNSToken() 함수가 아예 실행되지 않고 다음 코드로 넘어갔다.

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  [FIRMessaging messaging].APNSToken = deviceToken;
}

Appdelegate.m 파일에 넣으니 바로 해결..

0개의 댓글