Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html
Happy contributing!
-->
When initializing react native module using a url pointing to local jsbundle and hot reload is enabled, bridge, is trying to initialize the feature but crashes because there is no host in a local file url.
1. Create a new project.
```sh
$ react-native init testPlanApp && cd testPlanApp
```
2. Create jsbundle.
```sh
$ react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/main.jsbundle
```
3. Run the app and enable hot reload.
4. Enable airplane mode.
5. Close application and re-run.
6. See app crashes.
<!--
Help reviewers and the release process by writing your own release notes
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
CATEGORY
[----------] TYPE
[ CLI ] [-------------] LOCATION
[ DOCS ] [ BREAKING ] [-------------]
[ GENERAl ] [ BUGFIX ] [-{Component}-]
[ INTERNAL ] [ ENHANCEMENT ] [ {File} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
[CATEGORY] [TYPE] [LOCATION] - MESSAGE
EXAMPLES:
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
[IOS] [BUGFIX] [Hot reloading] - Fix crash when loading local bundle and hot reload is enabled.
Closes https://github.com/facebook/react-native/pull/16504
Differential Revision: D6133767
Pulled By: shergin
fbshipit-source-id: 3f7668e3e8fa7e772f58420e5a8a0985a5f8e48b
Summary:
Remove fallback logic.
It is hard to test whether a bundle is good or bad on device, since it does the fallback, remove the fallback logic now.
Reviewed By: javache
Differential Revision: D5773542
fbshipit-source-id: 8bb4fdad4c5761ccce915f9f1c2577464e8d37d8
Summary:
This fixes the `testModulesAreDeallocated` test. It was sometimes failing because the bridge's module was still alive. I debugged with the Xcode memory graph and found that the bridge was actually kept alive by a pointer from the NSThread.
By killing the runloop on the thread, the thread will eventually die and thus free the bridge.
One thing I didn't investigate was whether the thread was alive because of it receiving actual messages or just because the run loop was spinning.
Reviewed By: javache
Differential Revision: D5729925
fbshipit-source-id: 304f526129d2c5e137bfd791a6f957f6169b783e
Summary:
The next in my series of :atom: migrations.
Closes https://github.com/facebook/react-native/pull/15277
Differential Revision: D5526460
Pulled By: javache
fbshipit-source-id: e4ba54a5911c4a76280edf8aa164ac5aa935a945
Summary:
* Cleanup some header files so we use more forward declarations
* Rename Executor to JSExecutor.h
* Move some typedefs to more appropriate locations
Reviewed By: mhorowitz
Differential Revision: D5301913
fbshipit-source-id: e75154797eb3f531d2f42a5e95409f4062b85f91