Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Widcket/90d650ed00b4008e71d85a89405e42bd to your computer and use it in GitHub Desktop.
Save Widcket/90d650ed00b4008e71d85a89405e42bd to your computer and use it in GitHub Desktop.
Handle Remote Config push notifications
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