Swift didReceiveRemoteNotification方法

时间:2015-05-22 08:13:58

标签: ios swift arguments

我遇到警告问题:

enter image description here

此方法来自官方文档,因此我不了解它(或实现)的错误

1 个答案:

答案 0 :(得分:0)

试试这段代码:

func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
        if application.applicationState == .Inactive || application.applicationState == .Background {
            self.sendGoogleAnalyticsEventWithInfo(userInfo)
        }
    }