0
我已經在我的Objective-C項目中添加了firebase。集成成功,但我無法在iPhone的通知欄中顯示通知。didReceiveRemoteNotification未在Firebase中調用?
當到達通知調用此方法,我也得到數據有..
- (void)messaging:(FIRMessaging *)messaging didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
NSLog(@"FCM Received data message: >> %@", [remoteMessage appData]);
}
但是這種方法沒有叫......
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
}
{ 「collapse_key的」= 「捆綁ID」; from = 23123213; notification = { badge = 1; body =「身體在這裏」; e = 1; icon = myicon; sound = default; sound2 =「defalut sound」; subtitle = 1; title =「teasdfasasdf」; }; } –
您正在使用哪個iOS版本。如果您使用的是iOS 10.0或更高版本,請檢查此問題https://stackoverflow.com/questions/39600914/push-notification-not-received-when-app-is-in-background-in-ios-10 – Himanth
是的,我是使用11但它仍然不能正常工作...在iOS11中的 –