在iOS8之后,苹果建议远程推送使用的方法
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
运行之后发现如下报错
but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in y
解决: