SkillAgentSearch skills...

TJSceneDelegate

A UISceneDelegate implementation that forwards everything to UIApplicationDelegate

Install / Use

/learn @timonus/TJSceneDelegate
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TJSceneDelegate

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.

Instructions

  • Add the following to your Info.plist

  • Conform your app delegate to TJAppDelegate
    • Implement appWindowRootViewController to return your app's intended root view controller.
    • Implement window to the following
- (UIWindow *)window
{
    return self.appWindowRootViewController.view.window;
}
  • Remove any creation of UIWindows/makeKeyAndVisible calls in your app delegate.
  • Remove window.rootViewController = ... from your app delegate.
View on GitHub
GitHub Stars8
CategoryDevelopment
Updated6mo ago
Forks0

Languages

Objective-C

Security Score

82/100

Audited on Sep 25, 2025

No findings