Search code examples
facebookswiftswift2facebook-loginios9

Facebook Log In - Sigabrt Error in App Delegate and App Crashes


I am trying to create a simple Facebook login with swift and parse. iOS9. Twitter login works fine but the Facebook login keeps crashing and no idea why? The crash leads to AppDelegate.swift saying there is a Sigabrt error "signal sigabbt"

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {


var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    Parse.setApplicationId("MY ID", clientKey:"<MY CLIENT KEY")
        PFTwitterUtils.initializeWithConsumerKey("CONSUMER KEY", consumerSecret:"CONSUMER SECRET")
    PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions);
    return true

}

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
    return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}

func applicationDidBecomeActive(application: UIApplication) {
    FBSDKAppEvents.activateApp()
}

}

2015-09-30 18:35:46.237 Unilad[10789:3335461] * Terminating app due to uncaught exception 'InvalidOperationException', reason: 'App ID not found. Add a string value with your app ID for the key FacebookAppID to the Info.plist or call [FBSDKSettings setAppID:].' * First throw call stack: ( 0 CoreFoundation 0x0000000105595f65 exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000105921deb objc_exception_throw + 48 2 Unilad 0x00000001025619e7 +[FBSDKInternalUtility validateAppID] + 183 3 Unilad 0x0000000102561a10 +[FBSDKInternalUtility validateURLSchemes] + 32 4 Unilad 0x000000010258a3ae -[FBSDKLoginManager logInParametersWithPermissions:] + 78 5 Unilad 0x000000010258abc8 -[FBSDKLoginManager logInWithBehavior:] + 88 6 Unilad 0x000000010258ab44 -[FBSDKLoginManager logInWithPermissions:handler:] + 292 7 Unilad 0x0000000102588e57 -[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:] + 343 8 Unilad 0x0000000102588cc7 -[FBSDKLoginManager logInWithReadPermissions:handler:] + 103 9 Unilad 0x00000001026acc90 -[PFFacebookAuthenticationProvider authenticateAsync] + 476 10 Unilad 0x00000001026abb60 +[PFFacebookUtils _logInAsyncWithReadPermissions:publishPermissions:] + 144 11 Unilad 0x00000001026ab9b5 +[PFFacebookUtils logInInBackgroundWithReadPermissions:block:] + 71 12 Unilad 0x00000001026c392e -[PFLogInViewController _loginWithFacebook] + 878 13 UIKit 0x0000000103e451fa -[UIApplication sendAction:to:from:forEvent:] + 92 14 UIKit 0x0000000103fa9504 -[UIControl sendAction:to:forEvent:] + 67 15 UIKit 0x0000000103fa97d0 -[UIControl _sendActionsForEvents:withEvent:] + 311 16 UIKit 0x0000000103fa8906 -[UIControl touchesEnded:withEvent:] + 601 17 UIKit 0x00000001042f5ca5 _UIGestureRecognizerUpdate + 10289 18 UIKit 0x0000000103eaf592 -[UIWindow _sendGesturesForEvent:] + 1137 19 UIKit 0x0000000103eb0681 -[UIWindow sendEvent:] + 849 20 UIKit 0x0000000103e62752 -[UIApplication sendEvent:] + 263 21 UIKit 0x0000000103e3dfcc _UIApplicationHandleEventQueue + 6693 22 CoreFoundation 0x00000001054c20a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 23 CoreFoundation 0x00000001054b7fcc __CFRunLoopDoSources0 + 556 24 CoreFoundation 0x00000001054b7483 __CFRunLoopRun + 867 25 CoreFoundation 0x00000001054b6e98 CFRunLoopRunSpecific + 488 26 GraphicsServices 0x0000000107077ad2 GSEventRunModal + 161 27 UIKit 0x0000000103e43676 UIApplicationMain + 171 28 Unilad 0x000000010250e2bd main + 109 29 libdyld.dylib 0x000000010644392d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)


Solution

  • It happened to me 3 days ago. I updated my Parse and Facebook SDK and problem solved. Try to update your SDKs.