Repository navigation
refactor: drop iOS deep-link overrides handled by Expo SDK 58 - #7854
diegolmello wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Remove AppDelegate callbacks ios/AppDelegate.swift |
Removes URL and universal-link forwarding to RCTLinkingManager, plus the scene-configuration and discarded-scene callback overrides. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related PRs
- RocketChat/Rocket.Chat.ReactNative#7852: Updates the iOS native project for Expo SDK 58, including the scene lifecycle referenced by this change.
Merge Risk: 
Minimal · up to a9fe2
-
Deep links remain routed through the scene delegate, and no actionable merge-blocking risk was found.
Pre-merge checks: 
4
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Errors were encountered while retrieving linked issues.
Errors: 1
-
- JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Android Build Available Rocket.Chat 4.78.0.110111 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNTUmy6WbDDvyF4gVEL7OWm8xL9Lnh8H8VkQ_Qf8RZQqegG5tHtbpbd3iJdSWMod3704jiCLcF4YJXYETaQe |
|
iOS Build Available Rocket.Chat 4.78.0.110113 |
Proposed changes
Removes four methods from
ios/AppDelegate.swiftthat Expo SDK 58 makes redundant under the scene life cycle:application(_:open:options:)andapplication(_:continue:restorationHandler:), which calledRCTLinkingManager. With a scene delegate, UIKit no longer calls these app-delegate methods.ExpoAppSceneDelegate(ourSceneDelegatesubclasses it) handles cold-start URLs and user activities fromconnectionOptions, plus warmscene(_:openURLContexts:)andscene(_:continue:). It sends both kinds of event throughSceneEventForwarder, which notifiesRCTLinkingManagerunless the app delegate already did (notifyLinkingManagerUnlessAlreadyNotified). It also rebuilds launch options so thatLinking.getInitialURL()sees cold-start links.application(_:configurationForConnecting:options:)andapplication(_:didDiscardSceneSessions:).Info.plistalready declares theDefault Configurationscene withSceneDelegate, so UIKit resolves it without these.AppDelegatenow matches the SDK 58 bare template (expo-template-bare-minimum@58), which has none of the four. After the change, nothing inios/outside Pods referencesRCTLinkingManager.Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-1779
How to test or reproduce
Custom scheme, on any iOS simulator:
xcrun simctl openurl booted "rocketchat://room?host=<server>&path=channel/<room>".Universal link, on a non-slimmed simulator or a device (
simctl openurl https://…always opens Safari, so tap the link instead):https://go.rocket.chat/room?host=<server>&path=channel/<room>.Checked on an iPhone 17 simulator (iOS 27) with all four cases. Temporary JS logging recorded exactly one
urlevent (warm) or onegetInitialURLvalue (cold), and oneDEEP_LINKING_OPENdispatch, for each link.Screenshots
Custom scheme, warm (app in background):
custom-scheme-warm.mp4
Custom scheme, cold (app killed):
custom-scheme-cold.mp4
Universal link
go.rocket.chat/room?host=…, warm (tapped in Safari):universal-link-warm.mp4
Universal link, cold (tapped in Safari):
universal-link-cold.mp4
Types of changes
Checklist
Further comments
The apple-app-site-association file on
go.rocket.chatclaims/room/*,/auth/*,/mention/*and/channel/*, and thego.rocket.chat/room?…links still open the app as universal links. This PR doesn't change either.Summary by CodeRabbit