vendredi 27 février 2015

didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called

I've been trying to implement the fetch completion block with no luck. Whenever I send an APN, xcode still complains that it's not implemented. Here's my code



func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {

println("2. User Data", userInfo)

completionHandler(UIBackgroundFetchResult.NewData)

}


and the warning I am getting in the xcode console is this



Warning: Application delegate received call to -application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called.


Not sure if I am implementing the right syntax here




Aucun commentaire:

Enregistrer un commentaire