{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/6352","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/6352/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/6352/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/6352/events","html_url":"https://github.com/facebook/react-native/pull/6352","id":139132802,"number":6352,"title":"Fix to make bundling available for iPhone simulators again","user":{"login":"poonamst","id":5892908,"avatar_url":"https://avatars.githubusercontent.com/u/5892908?v=3","gravatar_id":"","url":"https://api.github.com/users/poonamst","html_url":"https://github.com/poonamst","followers_url":"https://api.github.com/users/poonamst/followers","following_url":"https://api.github.com/users/poonamst/following{/other_user}","gists_url":"https://api.github.com/users/poonamst/gists{/gist_id}","starred_url":"https://api.github.com/users/poonamst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poonamst/subscriptions","organizations_url":"https://api.github.com/users/poonamst/orgs","repos_url":"https://api.github.com/users/poonamst/repos","events_url":"https://api.github.com/users/poonamst/events{/privacy}","received_events_url":"https://api.github.com/users/poonamst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20needs-revision","name":"GH Review: needs-revision","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-08T00:06:27Z","updated_at":"2016-03-10T18:28:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/6352","html_url":"https://github.com/facebook/react-native/pull/6352","diff_url":"https://github.com/facebook/react-native/pull/6352.diff","patch_url":"https://github.com/facebook/react-native/pull/6352.patch"},"body":"Motivation:-\r\n\r\nBeing a framework, other teams are not debugging RN part of code but use it as a blackbox component. It creates a lot of inconveniences for developers which use the framework in a way as many other standard frameworks, real device or simulator does not make any difference for developers who are not directly develop RN code.\r\n\r\nFor iOS projects that create the JSBundle within the DyLib framework, this condition results in the bundle being unavailable for iOS emulators and results in an infinite loop resulting in a crash saying _fbBatched bridge undefined. Removing this piece of code would make the bundle available for iOS simulators for all such projects when the JSLocation is pointing to the RN Bundle."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/194991046","html_url":"https://github.com/facebook/react-native/pull/6352#issuecomment-194991046","issue_url":"https://api.github.com/repos/facebook/react-native/issues/6352","id":194991046,"user":{"login":"frantic","id":192222,"avatar_url":"https://avatars.githubusercontent.com/u/192222?v=3","gravatar_id":"","url":"https://api.github.com/users/frantic","html_url":"https://github.com/frantic","followers_url":"https://api.github.com/users/frantic/followers","following_url":"https://api.github.com/users/frantic/following{/other_user}","gists_url":"https://api.github.com/users/frantic/gists{/gist_id}","starred_url":"https://api.github.com/users/frantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frantic/subscriptions","organizations_url":"https://api.github.com/users/frantic/orgs","repos_url":"https://api.github.com/users/frantic/repos","events_url":"https://api.github.com/users/frantic/events{/privacy}","received_events_url":"https://api.github.com/users/frantic/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T18:28:51Z","updated_at":"2016-03-10T18:28:51Z","body":"So this is the same cycle we went through inside Facebook. At first it was \"always bundle\", then it was too slow and we switched to \"skip bundling for simulator\", then a bunch of edge cases appeared (e.g. \"Release builds in simulator still need the bundle\"). Then RN got into a larger app that many non-RN engineers work on and we faced the same problem you are describing. We haven't yet came out with solution that makes everyone happy.\r\n\r\nMerging this in means everyone in open source community will get slower builds.\r\n\r\nWhat you could do for now is copy and customize the `packager/react-native-xcode.sh` script into your project and replace the reference in Xcode.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/192222/13679790/691795e4-e6aa-11e5-989e-ea9d121a34fe.png)\r\n\r\n\r\nThe alternative would be to add some kind of setting to that script like `FORCE_BUNDLE`, but then it's another piece of configuration to maintain."}}