Last active
January 26, 2020 14:11
-
-
Save EnesKaraosman/0a50832ad5aa06851909b7e8055943f7 to your computer and use it in GitHub Desktop.
Environment enum usage in AppDelegate
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 { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
// Override point for customization after application launch. | |
// .. | |
self.setupNetworkEnvironment() | |
return true | |
} | |
private func setupNetworkEnvironment() { | |
let baseUrl = Environment.selected.url | |
print(baseUrl) | |
// Burada network instance'ınızı besleyebilirsiniz. | |
// APIClient.instance.environment = NetworkEnvironment(baseUrl: baseUrl) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment