I have a strange case. My swift ios app is connected to Cloudkit. If the app is NOT running (background state), I receive my notifications badge and alert just fine, every t
You've implemented the wrong method. Implement:
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [NSObject : AnyObject],
fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void)
As the docs explain:
Unlike the
application:didReceiveRemoteNotification:
method, ... the system calls this method when your app is running in the foreground or background.