我正在使用Firebase进行分析,使用一个推送通知库。当我使用其中任何一个时,didReceiveRemoteNotification被调用。但是,当我同时使用它们时,didReceiveRemoteNotification没有被调用。
代码:
代码:
didFinishLaunchingWithOptions:
NSString *google_app_id = @"----";
NSString *gcm_sender_id = @"----";
FIROptions *o = [[FIROptions alloc] initWithGoogleAppID:google_app_id GCMSenderID:gcm_sender_id];
o.APIKey = @"----";
o.bundleID = @"----";
o.clientID = @"----";
[FIRApp configureWithOptions:o];
// Initilization of push framework
didReceiveRemoteNotification :
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
// This method is not called when Firebase and push framework are enabled at the same time
// It works fine when only Firebase or only push framework is enabled
NSLog(@"Push: %@", userInfo);
}