Created
January 16, 2019 19:55
-
-
Save Widcket/90d650ed00b4008e71d85a89405e42bd to your computer and use it in GitHub Desktop.
Handle Remote Config push notifications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (_: UIBackgroundFetchResult) -> Void) { | |
if userInfo["CONFIG_STATE"] != nil { | |
UserDefaults.standard.set(true, forKey: "CONFIG_STATE") | |
UserDefaults.standard.synchronize() | |
} | |
| |
completionHandler(UIBackgroundFetchResult.newData) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment