Skip to content

Instantly share code, notes, and snippets.

@yoichitgy
Created September 16, 2017 06:29
Show Gist options
  • 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("[email protected]")
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