In AppDelegate.swift, I have the following code:
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application(app, openURL: url, sourceApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! String, annotation: options["UIApplicationOpenURLOptionsOpenInPlaceKey"]!) }
According to the comments in the UIApplicationDelegate , we should use the application: openURL: options :, but it still doesn't work.
@available(iOS, introduced=4.2, deprecated=9.0, message="Please use application:openURL:options:") optional public func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool
Now I have changed to the following code:
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application( application, openURL: url, sourceApplication: sourceApplication, annotation: annotation) }
Then he began to work normally on both the simulator and the iPhone.
sfbayman Sep 22 '15 at 3:17 2015-09-22 03:17
source share