새로 프로젝트를 만들어서 테스트 해보면 잘 오는데,
현재 프로젝트에 적용하면 FCM 이 안오는 문제가 있었다.
일주일 정도 삽질하다가 오늘에서야 해결이 되서 간단하게 기록한다.
https://stackoverflow.com/a/71163183
APNS device token not set before retrieving FCM Token for Sender ID - React Native Firebase
I have been following this tutorial to set-up Remote Push notifications on my react-native application using react-native-firebase Version 5.2.0. After I configured everything and ran the applicati...
stackoverflow.com
#import "FirebaseCore.h" // 이건 원래 있을 것이고
#import "FirebaseMessaging.h" // 이걸 상단에 추가
...
// 아래 코드 추가
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[FIRMessaging messaging].APNSToken = deviceToken;
}
뭔가 firebase 버그인건지 문서가 엉망인건지는 모르겠지만 어쨌든 해결
'개발 > React Native' 카테고리의 다른 글
[ReactNative] 카카오 로그인을 쉽게 구현해보자 (0) | 2023.01.06 |
---|---|
[ReactNative] Custom Font 적용하기 (0) | 2023.01.06 |
[ReactNative] 각종 OAuth 관련 github 모음 (0) | 2022.12.02 |