Facebook Login to Swift 3

Hi, I have a problem with FBLogin in Swift It always displays

"User has canceled login."

in iOS8.2 and

"Return to NSUserDefaults access token storage due to simulator error"

when i use iOS10.1

Do you have any suggestions on this issue?

enter image description here

+4
source share
1 answer

I solved this problem by adding these features to my AppDelegate.swift

  @available(iOS 9.0, *) public func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return SDKApplicationDelegate.shared.application( app, open: url as URL!, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String, annotation: options[UIApplicationOpenURLOptionsKey.annotation] as Any ) } public func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { return SDKApplicationDelegate.shared.application( application, open: url as URL!, sourceApplication: sourceApplication, annotation: annotation) } 

Hope will help

+5
source

Source: https://habr.com/ru/post/1012570/


All Articles