Search code examples
iosswiftfacebook-ios-sdk

Strange facebook crash on launch


Here is the bug report

Crashed: com.apple.main-thread
0  libswiftCore.dylib             0x103c2faa4 swift_getObjectType + 60
1                          0x102e3dc58 @objc AppDelegate.application(UIApplication, open : URL, sourceApplication : String?, annotation : Any) -> Bool (AppDelegate.swift)
2                          0x102f5e730 -[FIRAuthAppDelegateProxy object:selector:application:openURL:sourceApplication:annotation:] + 4303562544
3                          0x102f5d8e4 __47-[FIRAuthAppDelegateProxy initWithApplication:]_block_invoke.199 + 4303558884
4                          0x102ee6aa0 -[FIRAAppDelegateProxy application:openURL:sourceApplication:annotation:] + 4303071904
5  UIKit                          0x18e064acc __58-[UIApplication _applicationOpenURLAction:payload:origin:]_block_invoke + 880

It crashes after user grant access from facebook app and turns back to my app.

Any idea what may the problem be like?


Solution

  • set this code.in app delegate

       //For Facebook
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool
    {
        return FBSDKApplicationDelegate.sharedInstance().application(app, open: url, options: options)
    }