Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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)
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
You can’t perform that action at this time.