Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bundling in Simulator #5779

Closed
wants to merge 1 commit into from
Closed

Allow bundling in Simulator #5779

wants to merge 1 commit into from

Conversation

ffxsam
Copy link

@ffxsam ffxsam commented Feb 5, 2016

Feel free to reject this PR, though I'm removing this because it causes a total failing state without any clue to the developer as to what's going on. It just yields a cryptic error message:

2016-02-04 18:59:17.582 [error][tid:com.facebook.React.JavaScript] Unable to execute JS call: __fbBatchedBridge is undefined
2016-02-04 18:59:17.585 SydTechEco[76215:10166934] *** Terminating app due to uncaught exception 'RCTFatalException: Unable to execute JS call: __fbBatchedBridge is undefined', reason: 'Unable to execute JS call: __fbBatchedBridge is undefined'

I ran into this when I set my project to Release instead of Debug, and tried to test in Simulator. This held me up and prevented me from meeting a launch goal, which was really frustrating. As developers, we should have the choice of running a release copy on Simulator or a device, as a final check before publishing to the AppStore.

Feel free to reject this PR, though I'm removing this because it causes a total failing state without any clue to the developer as to what's going on. It just yields a cryptic error message:

```
2016-02-04 18:59:17.582 [error][tid:com.facebook.React.JavaScript] Unable to execute JS call: __fbBatchedBridge is undefined
2016-02-04 18:59:17.585 SydTechEco[76215:10166934] *** Terminating app due to uncaught exception 'RCTFatalException: Unable to execute JS call: __fbBatchedBridge is undefined', reason: 'Unable to execute JS call: __fbBatchedBridge is undefined'
```

I ran into this when I set my project to Release instead of Debug, and tried to test in Simulator. This held me up and prevented me from meeting a launch goal, which was really frustrating. As developers, we should have the choice of running a release copy on Simulator or a device, as a final check before publishing to the AppStore.
@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @frantic, @ide and @lpil to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Feb 5, 2016
@frantic
Copy link
Contributor

frantic commented Feb 5, 2016

Hi @ffxsam, sorry about your bad experience, we are still figuring out what's the best thing to do here. We made it so the bundling process doesn't happen for simulator to save time when running the app for the first time, because packager runs with the simulator anyways.

I see two ways to adjust this PR to fit both our assumption and your use case:

  1. Add check for "$CONFIGURATION" = "Debug" to line 15
  2. Change the URL in AppDelegate.m to point to dev=false (however, in this case JS and images will be loaded from packager, which is not 100% same as Release build shipped to AppStore)

@ffxsam
Copy link
Author

ffxsam commented Feb 5, 2016

@frantic Thanks for the response! You guys have way more experience with the code base, so I'll defer to your judgment on this one. I'm just glad I found the issue.

The other thing that tripped me up was having to add libReact.a to the MyAppTests target. Without that step, I couldn't build a release version for my device. If I remember, I'll add this to the documentation somewhere.

@frantic
Copy link
Contributor

frantic commented Feb 5, 2016

If I remember, I'll add this to the documentation somewhere.

It would be better to fix the original cause :)

@ffxsam
Copy link
Author

ffxsam commented Feb 5, 2016

Is it just a matter of editing this file and adding a reference to libReact.a somewhere?

To be clear, I had to add this in order for the release version to build and run properly:

sydtecheco_xcodeproj

@frantic
Copy link
Contributor

frantic commented Feb 5, 2016

Is it just a matter of editing this file and adding a reference to libReact.a somewhere?

Yes, that's the right place

@facebook-github-bot
Copy link
Contributor

@ffxsam updated the pull request.

@javache
Copy link
Member

javache commented Feb 24, 2016

Pulling #6119 instead of this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants