3
테스트 중에 Firebase 콘솔을 사용하여 내 IOS에서 알림을 수신합니다. 처음에는 Firebase에 연결되어 있는데 메시지 ID를 받았지만 오류가 발생했습니다. Warning: Application delegate received call to -application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called.
및 Unable to connect to FCM. Error Domain=com.google.fcm Code=2001 "(null)"
어떻게 해결할 수 있습니까?Firebase를 사용하여 iOS에서 알림을받을 수 없습니다.
completionHandler(UIBackgroundFetchResultNoData);
당신의 didReceiveRemoteNotification 방법의 끝에 :
여기 didReceiveRemoteNotification
추가// [START receive_message]
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
// If you are receiving a notification message while your app is in the background,
// this callback will not be fired till the user taps on the notification launching the application.
// TODO: Handle data of notification
// Print message ID.
NSLog(@"Message ID: %@", userInfo[@"gcm.message_id"]);
// Pring full message.
NSLog(@"%@", userInfo);
}
// [END receive_message]