- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo]; //<-----userInfo returns payload data in JSON format
NSLog(@"App was in background and opened from Push message
我知道这段代码会向用户显示推送func application( application: UIApplication, didReceiveRemoteNotification userInfofetchCompletionHandler handler: (UIBackgroundFetchResult) -> Void) {
print("Notification received: \(userInfoworks only if the app started the GCM ser