Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback: SwiftUI app lifecycle: issues with ScenePhase and using AppDelegate adaptors #200

Closed
dennisbirch opened this issue Jul 30, 2024 · 2 comments

Comments

@dennisbirch
Copy link

  1. I'm glad to see I'm not the only one experiencing this apparent oversight

  2. "Unexpectedly, the main view receives onAppear() before your app receives the scene phase change. In the sample above, that would be ContentView. That’s like receiving viewWillAppear() on your root view controller before application(_:didFinishLaunchingWithOptions:) gets called."

This is exactly the behavior I ran across when trying to translate my iOS (UIKit) experience to a macOS (AppKit) project. I couldn't understand why nothing was being set up properly in my main view until I realized that viewWillAppear was being called in the ViewController before the AppDelegate's didFinishLaunching... method was called.

@jessesquires
Copy link
Owner

Ooof 😅 yeah sorry you're dealing with this too @dennisbirch !

I'm also glad it's not just me 😆

@github-actions github-actions bot added the stale label Aug 18, 2024
Copy link

Thanks so much for leaving feedback about this blog post! After 2 weeks of inactivity these issues are automatically closed, but feel free to continue the discussion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants