Last active
May 29, 2018 11:31
-
-
Save TramPamPam/87c460f21481a64a0ac1d62fe6f64204 to your computer and use it in GitHub Desktop.
AppDelegate.swift
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, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
if let userInfo = launchOptions?[.remoteNotification] as? [AnyHashable: Any] { | |
// Parsed notification here | |
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "openPush"), object: nil, userInfo: userInfo) | |
} else { | |
// Ordinary opened app | |
} | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment