Skip to content

Instantly share code, notes, and snippets.

@yoichitgy
Created September 16, 2017 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoichitgy/9ed8a4f66ab7feb34717eab12893c8e0 to your computer and use it in GitHub Desktop.
Save yoichitgy/9ed8a4f66ab7feb34717eab12893c8e0 to your computer and use it in GitHub Desktop.
iOSDC JAPAN 2017 Demo - AppDelegate.swift
import UIKit
import Fabric
import Crashlytics
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Fabric.with([Crashlytics.self])
Crashlytics.sharedInstance().setUserIdentifier("123456789")
Crashlytics.sharedInstance().setUserEmail("someone@test.com")
Crashlytics.sharedInstance().setUserName("Someone")
Crashlytics.sharedInstance().setObjectValue("A", forKey: "ABTest1")
Crashlytics.sharedInstance().setObjectValue("B", forKey: "ABTest2")
Crashlytics.sharedInstance().setBoolValue(true, forKey: "RemoteConfig1")
Crashlytics.sharedInstance().setBoolValue(false, forKey: "RemoteConfig2")
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment