Created
December 3, 2018 12:39
-
-
Save candostdagdeviren/93fff7b82b2a1ae23ebc4ed183088b9d to your computer and use it in GitHub Desktop.
Swift Post Testability Example Code
This file contains hidden or 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
func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { | |
let isUnitTesting = ProcessInfo.processInfo.environment["IS_UNIT_TESTING"] == "1" | |
if isUnitTesting == false { | |
// Do UI-related setup, which can be skipped when testing | |
} | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment