PSA: UISceneDelegate.openURLContexts called twice sometimes in iOS 26

If you use UISceneDelegate's scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) to handle deep links (such as tapping a widget) you might run into an issue where this callback is called twice in the majority of cases.

If you push a view controller in response to this, you might end up with two pushed view controllers, if you do not mitigate this. This is exclusively an issue in iOS 26.0 and works as expected on iOS 18.

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
        /// Add any widget to the home screen that uses the widgetURL modifier and tap them. Most of the time, openURLContexts() will get called twice.
        /// If you run this project on iOS 18, it's *always* called once as expected.
        print("openURLContexts \(URLContexts)")
    }

Filed as FB20301454

Sometimes Link fails to be recognized when clicked, but iOS 18 is functioning perfectly.

PSA: UISceneDelegate.openURLContexts called twice sometimes in iOS 26
 
 
Q