Last active
February 16, 2019 18:09
-
-
Save trupin/89f3a1ec461a3cebbd5cef260317ab5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
private let dependencies: AppDelegateDependencyResolver = AppDelegateDependencyContainer() | |
// weaver: homeViewController = HomeViewController <- UIViewController | |
// weaver: urlSession = URLSession | |
// weaver: urlSession.scope = .container | |
// weaver: urlSession.builder = URLSession.make | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
window = UIWindow() | |
window?.rootViewController = UINavigationController(rootViewController: dependencies.homeViewController) | |
window?.makeKeyAndVisible() | |
return true | |
} | |
} | |
extension URLSession { | |
func make(_: AppDelegateDependencyResolver) -> URLSession { | |
return URLSession(configuration: .default) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment