Skip to content

Instantly share code, notes, and snippets.

@hyukhur
Created December 1, 2017 02:43
Show Gist options
  • Save hyukhur/f0fe8828863f11e0df619203efdb1b3e to your computer and use it in GitHub Desktop.
Save hyukhur/f0fe8828863f11e0df619203efdb1b3e to your computer and use it in GitHub Desktop.
XCTests runs the UIApplication while it tested. It cause the root view controller's 'viewDidLoad' function it can be change test environments.
let isRunningTests: Bool = ProcessInfo.processInfo.environment["XCInjectBundleInto"] != nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment