/TestingSceneDelegate

Sample project demonstrating custom App/Scene delegates to bypass main app initialisation when unit testing.

Primary LanguageSwiftMIT LicenseMIT

TestingSceneDelegate

A sample app which demonstrates how to use test-specific app and scene delegates when running unit tests on iOS 13 to avoid executing the main app's initialisation code. This reduces the time it takes to run unit tests and avoids any possible side effects of the app's initialisation code. This version is for Swift. There is also an Objective-C Version.

See my Medium article How to Switch Your iOS Scene Delegate for Improved Testing for details on how the technique works.

A pre-ios-13-support branch has extra code which and extends the solution to work prior to iOS 13 where the App Delegate is responsible for creating the app's window.