Last active
August 15, 2017 15:52
-
-
Save drulabs/7774951b2b13752f477f15e2ad0d30e5 to your computer and use it in GitHub Desktop.
Receive data from remote notification
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) { | |
print("Dhruw: Dumping notification payload") | |
if application.applicationState != .active { | |
let value1: String? = userInfo["key1"] as? String | |
let value2: String? = userInfo["key2"] as? String | |
let value3: Bool? = userInfo["key3"] as? Bool | |
// do something with the received data | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment