I'm getting a bizarre crash after upgrading to Swift 4.1
Every time a user logs in to my app with the Facebook app using the NATIVE option (this opens your facebook app itself if its installed on the device). I am getting the following exception
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
The screen looks like this FYI:
All Crashlytics gives me is the following
AppDelegate.swift line 0 @objc AppDelegate.application(UIApplication, open : URL, sourceApplication : String?, annotation : Any) -> Bool 2 UIKit
__58-[UIApplication _applicationOpenURLAction:payload:origin:]_block_invoke + 880
I've been able to repro on my device, and the local crash logs are equally not helpful. The crash hits on the first line of my AppDelegate file, and there is nothing to backtrace through in intelligible code.
This apparently is the offending line.
class AppDelegate: UIResponder, UIApplicationDelegate {
I've tried enabling Zombie objects since EXC_BAD_ACCESS usually means something got deallocated, to gather some data with no luck.
Whats strange is if I do the following:
let login:FBSDKLoginManager = FBSDKLoginManager()
login.loginBehavior = .web
No crash happens. This makes me believe that when the .native option (the default if you have facebook installed) is used, the app switching is causing the crash somehow.
Using .web is a temporary work around, but I'd really like a root cause to why this would cause a crash. The FBSDKLoginKit is on version 4.32.0 for me.
Any ideas or help are appreciated.