It looks like Apple is going to deprecate the "classic" UIApplication-based lifecycle in favor of the newer scene-based lifecycle introduced in iOS 13. I preferred the older lifecycle, it was simpler and a 99.99% of apps don't need the multi-scene setup that the new one introduced. Furthermore, small differences between the two lifecycles lead to common bugs that drive me nuts (like URLs not being handled on cold start).
This project is glue between UISceneDelegate and UIApplicationDelegate. You should be able to configure this and then forget about the scene-based lifecycle entirely if I've done my job right. Your app delegate should receive all events as it did previously.
I've held out on the scene-based lifecycle in all of my apps, and this project is how I now plan to migrate to it.
- Add the following to your Info.plist
- Conform your app delegate to
TJAppDelegate- Implement
appWindowRootViewControllerto return your app's intended root view controller. - Implement
windowto the following
- Implement
- (UIWindow *)window
{
return self.appWindowRootViewController.view.window;
}- Remove any creation of
UIWindows/makeKeyAndVisiblecalls in your app delegate. - Remove
window.rootViewController = ...from your app delegate.
