79733944

Date: 2025-08-13 06:32:00
Score: 0.5
Natty:
Report link

The kind folks over at Apple helped me figure this out. The key bit of information here is: SwiftUI is inherently scene based.

To get the parameters at launch you need to have a Scene Delegate:

class SceneDelegate: NSObject, UIWindowSceneDelegate {
    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
       // Use connectionsOptions
    }
    
    func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
        // Use URLContexts
    }
}

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Basti X