Skip to content

Conversation

@dfsm
Copy link
Contributor

@dfsm dfsm commented Nov 29, 2025

This branch migrates from UIKit UIApplicationMain lifecycle to SwiftUI @main App lifecycle using @UIApplicationDelegateAdaptor.

There are no changes to actual functionality, no adoption of the newer navigation APIs (I have had nothing but trouble with them) and ideally this change should be completely unnoticed by all users. Swipe to unpop has been tested and still works. Have not changed the target iOS version at all.

So why do it?

  1. If I ever figure out how to adopt the newer navigation APIs while also retaining all current features then this would be a necessary step anyway. This makes that future activity easier. Even tho creating new UIKit views is much less of an obstacle these days with Claude Code doing the legwork, even bloody Claude struggles with it. Constraints will be the death of us all. I'd like to (long term) replace the views with SwiftUI, particularly any NIBs still in place (page settings view)
  2. While we still need to use UIHostingControllers and whatnot from inside the current UIKit views, this change does allow us to create new fully SwiftUI views at the root level. This would let us build native alerts/popups/progress views in SwiftUI to replace the deprecated MRProgress solution. We have a "toot" lottie for this purpose waiting to be used...
    I also want to add banners and things for when there's a Poll available to view in a thread, etc.
  3. Makes the app slightly less legacy, more familiar to newcomer devs

Below is LLM generated:

Changes

  • Replaced main.swift with SwiftUI AwfulApp.swift entry point
  • Preserved AppDelegate functionality via @UIApplicationDelegateAdaptor
  • Added explicit CoreData save handlers for safety
  • Removed all storyboards (LaunchScreen, Login, RootTabBarController)
  • Converted LoginViewController to programmatic UI
  • Added UILaunchScreen configuration in Info.plist

Benefits

  • Modern SwiftUI lifecycle (iOS 14+)
  • Cleaner codebase without storyboards
  • Better separation of concerns
  • Improved state management via scenePhase
  • No breaking changes to existing functionality

@dfsm dfsm requested a review from nolanw November 29, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants