Skip to content

Instantly share code, notes, and snippets.

@matiasvillaverde
Created June 22, 2018 09:28
Show Gist options
  • Save matiasvillaverde/86d0d14773a3ceb888751a01bb62d19b to your computer and use it in GitHub Desktop.
Save matiasvillaverde/86d0d14773a3ceb888751a01bb62d19b to your computer and use it in GitHub Desktop.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
// Instance variable to prevent deallocation.
private let externalDependencies: ExternalDependeciesInjection = ExternalDependenciesImplementation()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Set up SDKS
externalDependencies.setup()
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Example of tracking an event.
externalDependencies.track(event: "applicationWillResignActive")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment