I created an app that started from this project's setup. As it turned out, I released it to the store and every app crashed for every user when they updated it on their devices.
I did not get notified from Fabric/Crashlytics because of the way I had it installed. I looked more into the fabric docs and found out what to do to fix it.
Edit AppDelegate to be like this:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
... stuff here for setup.
// Make sure fabric is last.
#if !DEBUG
Fabric.with([Crashlytics.self])
DDLog.add(CrashlyticsCocoaLumberjackLogger.sharedInstance)
#endif
return true
}
Also in the AppDelegate, remove the crashlytics delegate stuff.
That's pretty much it. This is a better way to install Fabric and install it only on release builds.
Add better crash logging support using CocoaLumberjack.
I created an app that started from this project's setup. As it turned out, I released it to the store and every app crashed for every user when they updated it on their devices.
I did not get notified from Fabric/Crashlytics because of the way I had it installed. I looked more into the fabric docs and found out what to do to fix it.
AppDelegate
to be like this:Also in the
AppDelegate
, remove the crashlytics delegate stuff.That's pretty much it. This is a better way to install Fabric and install it only on release builds.
So now, when you want to log errors in the app, use
DDLogError()
and it will be reported to Crashlytics.