Last active
January 9, 2019 04:01
-
-
Save ysam12345/542b5402893b01b42ed98f1685ca9461 to your computer and use it in GitHub Desktop.
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 { | |
// Override point for customization after application launch. | |
//Push Notification Authorization | |
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in | |
} | |
UIApplication.shared.registerForRemoteNotifications() | |
// 讓 App 在前景狀態下收到通知 | |
UNUserNotificationCenter.current().delegate = self | |
//return true | |
return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions:launchOptions) | |
} | |
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { | |
return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment