react-native/local-cli/runIOS
Stephen Poter 8b55e50d1d Fix error in react-native run-ios when Product Name and Scheme are inequal
Summary:
In xcode, you can modify the Product Name per build configuration.  During the build, the app file name is made using that value.  For example, I name my app "MyApp Dev", it will build into "MyApp Dev.app".

react-native run-ios doesn't extract the proper app name.  Instead it uses the scheme name + ".app".  So if in the example above I use the default Scheme "MyApp", which references the build configuration whose name is "MyApp Dev".  The build will succeed, but when runIOS.js goes to run the app, it fails because the file name doesn't exist.

My fix parses the build output and extracts the app name from the line "export FULL_PRODUCT_NAME=$(appfilename)" and uses that instead of the scheme.  If there is any issue parsing, the scheme name is used like it currently is.

**Test plan (required)**

1) Change the Product Name in xcode project manager to be something different than the scheme name.
2) Run react-native run-ios and ensure it works.
Closes https://github.com/facebook/react-native/pull/10178

Differential Revision: D4022116

Pulled By: javache

fbshipit-source-id: c1bd8e7a1f6364d681c505557a96955a293bc05c
2016-10-14 14:43:52 -07:00
..
__tests__ cli run-ios on device 2016-09-06 08:13:41 -07:00
findMatchingSimulator.js cli run-ios on device 2016-09-06 08:13:41 -07:00
findXcodeProject.js Added `react-native run-ios` 2016-01-05 17:18:49 -08:00
parseIOSDevicesList.js cli run-ios on device 2016-09-06 08:13:41 -07:00
runIOS.js Fix error in react-native run-ios when Product Name and Scheme are inequal 2016-10-14 14:43:52 -07:00