-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Support launchOptions in bridgeless mode (#43757) Summary: Support launchOptions in bridgeless mode bypass-github-export-checks [IOS] [FIXED] - Support launchOptions in bridgeless mode Pull Request resolved: #43757 Test Plan: ``` useEffect(() => { const processInitialURL = async () => { const url = await Linking.getInitialURL(); if (url !== null) { console.log(`Initial url is: ${url}`); } }; processInitialURL(); }, []); ``` Reviewed By: javache Differential Revision: D55790758 Pulled By: cipolleschi fbshipit-source-id: 0f6aa6bdcebfc5bc42d632bea9193f122c1eb84f * Fix Connect to Metro after Reload in Bridgeless mode (#43994) Summary: Pull Request resolved: #43994 We received [this issue](#43764) from OSS where an app can't connect to Metro on reloads in the following scenario: * Start the App when metro does not run. * Observe the error screen * Start Metro * Press Reload * Observe the error message again While the desired behavior should be to connect to Metro now that this is running. The root cause of the problem is that the RCTHost is initialized with a value of the `bundleURL` that is `nil`. Upon reload, the RCTHost is **not** recreated: the instance is restarted, but with the previous `bundleURL`, which is still `nil`. The solution is to initialize the `RCTHost` with a closure that re-evaluate the `bundleURL` whenever it is invoked and to evaluate it only on `start`, to keep the initialization path light. This way, when the app is started with Metro not running, the `bundleURL` is `nil`. But when it is reloaded with Metro starting, the `bundleURL` is properly initialized. Note that the changes in this diff are not breaking as I reimplemented (and deprecated) the old initializer so that they should work in the same way. [iOS][Fixed] - Let RCTHost be initialized with a function to provide the `bundleURL` so that it can connect to metro on Reload when the url changes. Reviewed By: dmytrorykun Differential Revision: D55916135 fbshipit-source-id: 6927b2154870245f28f42d26bd0209b28c9518f2 * Fix badly resolved merge conflicts --------- Co-authored-by: zhongwuzw <zhongwuzw@qq.com>
- Loading branch information
1 parent
2d84d83
commit cb2d93e
Showing
16 changed files
with
207 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.