rohitsux opened a new pull request, #1681: URL: https://github.com/apache/cordova-ios/pull/1681
Closes #1671 ## Summary On a cold (killed-state) launch from a custom-scheme deep link under the UIScene lifecycle, `window.handleOpenURL` was never called — the launch URL was dropped in native code before reaching JavaScript. Warm launches were unaffected. Root cause: `CDVSceneDelegate scene:willConnectToSession:` posts `CDVPluginHandleOpenURLNotification` synchronously during scene connection, but `CDVHandleOpenURL` only registers its observer later, in `-pluginInitialize`. `NSNotificationCenter` delivers a notification only to observers present at post time, so the notification — and the URL — was lost. ## Changes - `CDVSceneDelegate.m` — on cold launch, buffer the launch URL contexts and register a one-shot observer for `CDVPageDidLoadNotification`; replay the open-URL notification once the page has loaded and the plugin observer exists. A `sceneDidDisconnect:` teardown removes the pending observer if the scene disconnects before the page loads. The runtime (warm) `openURLContexts:` path is unchanged. - `CDVSceneDelegateTests.m` — new unit tests covering: cold-launch URL is buffered until page load, replayed after page load, no notification when there is no launch URL, disconnect-before-load cancels the pending URL, and the warm path still posts immediately. - `CordovaTests.xcodeproj/project.pbxproj` — register the new test file in the CordovaTests target. ## Testing All tests pass on the iOS 26.5 simulator (iPhone 17). The five new tests exercise both the cold-launch buffering/replay contract and the unchanged warm path; the existing suite continues to pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
