我在Objective-C项目中添加了firebase。集成成功,但我无法在iPhone的通知栏中显示通知。
当通知到达时,调用此方法并在那里获取数据..
- (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 {
}
答案 0 :(得分:1)