We're trying to troubleshoot a crash for a production application. From time to time, iOS is killing app on startup with the 0x8badf00d
error.
For a specific case we detected during testing, this crash seems to be caused by Fabric
initialization. We use Fabric only for Twitter login.
According documentation, initialization should be done on applicationDidFinishLaunching
. If there is a 10 seconds delay initializing the library, it will timeout, consuming most of the available time to launch the app before being killed.
Since just a very small amount of users sign up with Twitter, we want to improve the app startup by changing how TwitterKit
is initialized.
We found that background initialization is now allowed. Is there an official recommended setup approach for apps having a low use of TwitterKit
so we don't risk delay startup to set it up? Can we do it on demand when needed? Should we move to TwitterKit
3.0 and get rid of Fabric?
I can't discard TwitterKit
is not to blame... but logs seems to indicate that the main delay contributing to the crash was related to Fabric's init because of a failure reaching a Crashlytics endpoint for getting Fabric settings (https://settings.crashlytics.com/etc/etc..).