无法使用Firebase在iOS中接收通知
我在测试中使用Firebase控制台在iOS中接收通知。起初它说我已连接到Firebase并收到消息ID,但随后出现了一个错误无法使用Firebase在iOS中接收通知,ios,objective-c,firebase,firebase-cloud-messaging,Ios,Objective C,Firebase,Firebase Cloud Messaging,我在测试中使用Firebase控制台在iOS中接收通知。起初它说我已连接到Firebase并收到消息ID,但随后出现了一个错误警告:Application delegate收到了对-Application:DidReceiveEmotentification:fetchCompletionHandler:的调用,但从未调用过完成处理程序。和无法连接到FCM。Error Domain=com.google.fcm Code=2001“(空)”如何解决此问题 这是我的DidReceiveMotoni
警告:Application delegate收到了对-Application:DidReceiveEmotentification:fetchCompletionHandler:的调用,但从未调用过完成处理程序。
和无法连接到FCM。Error Domain=com.google.fcm Code=2001“(空)”
如何解决此问题 这是我的DidReceiveMotonification代码尝试添加:// [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]
在你的DidReceiveMotonification方法结束时completionHandler(UIBackgroundFetchResultNoData);