react-native/local-cli/runIOS
Trevor Brindle cb8a116d05 Use xcpretty for iOS build output if installed
Summary:
iOS/xcodebuild logging output sucks. It's completely unreadable because of how xcodebuild takes arguments. Fortunately a ruby gem has existed to fix this for years: xcpretty. You simply pipe xcodebuilds output to xcpretty and it cleans it up, showing relevant info in a more readable format.

This PR implements xcpretty output. It checks to see if xcpretty is in PATH, then uses it by default if it is, and can be disabled using a --verbose cli flag.

- Create a project from master
- run `react-native run-ios`
- Confirm output looks like this:

```tabrindle-mbp:shop-rn tabrindle$ make
Scanning 662 folders for symlinks in /Users/tabrindle/Developer/react-native/node_modules (5ms)
Found Xcode project Shop.xcodeproj
We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.
Launching iPhone 6 (iOS 10.3)...
Building using "xcodebuild -project Shop.xcodeproj -configuration Debug -scheme Shop -destination id=0CD9ABF3-A8E4-43D6-A52B-F437FF0F45A0 -derivedDataPath build"
▸ Building React/yoga [Debug]
▸ Check Dependencies
▸ Building React/double-conversion [Debug]
▸ Check Dependencies
▸ Running script 'Install Third Party'
▸ Building React/third-party [Debug]
▸ Check Dependencies
▸ Building React/jschelpers [Debug]
▸ Check Dependencies
▸ Building React/cxxreact [Debug]
▸ Check Dependencies
▸ Building React/React [Debug]
▸ Check Dependencies
▸ Running script 'Start Packager'
▸ Running script 'Include RCTJSCProfiler'
▸ Building RCTSettings/RCTSettings [Debug]
▸ Check Dependencies
▸ Building BVLinearGradient/BVLinearGradient [Debug]
▸ Check Dependencies
▸ Building RCTActionSheet/RCTActionSheet [Debug]
▸ Check Dependencies
▸ Building RCTLinking/RCTLinking [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/fishhook [Debug]
▸ Check Dependencies
▸ Building RCTWebSocket/RCTWebSocket [Debug]
▸ Check Dependencies
▸ Building RCTText/RCTText [Debug]
▸ Check Dependencies
▸ Building RCTNetwork/RCTNetwork [Debug]
▸ Check Dependencies
▸ Building RCTAnimation/RCTAnimation [Debug]
▸ Check Dependencies
▸ Building RCTGeolocation/RCTGeolocation [Debug]
▸ Check Dependencies
▸ Building ReactNativeNavigation/ReactNativeNavigation [Debug]
▸ Check Dependencies
▸ Building RNI18n/RNI18n [Debug]
▸ Check Dependencies
▸ Building RCTImage/RCTImage [Debug]
▸ Check Dependencies
▸ Building RNVectorIcons/RNVectorIcons [Debug]
▸ Check Dependencies
▸ Building RCTVibration/RCTVibration [Debug]
▸ Check Dependencies
▸ Building Shop/Shop [Debug]
▸ Check Dependencies
▸ Running script 'Bundle React Native code and images'
▸ Building Shop/ShopTests [Debug]
▸ Check Dependencies
▸ Build Succeeded
Installing build/Build/Products/Debug-iphonesimulator/Shop.app
Launching com.marketamerica.MAMobile
com.marketamerica.MAMobile: 43497```
- run `react-native run-ios --verbose`
- confirm output looks as normal

Nothing else should be affected. This is simply a developer experience change. If xcpretty is not already installed, nothing will change at all. Many of us using fastlane have been spoiled by this for years.
Closes https://github.com/facebook/react-native/pull/15607

Differential Revision: D5740684

Pulled By: shergin

fbshipit-source-id: 09ef21414b8b65be92595b19502b843fa943403d
2017-09-08 10:00:51 -07:00
..
__tests__ remove disableAutomock from jest tests (new default) @bypass-lint 2017-06-13 15:04:09 -07:00
findMatchingSimulator.js Make run-ios find if a device is booted better 2016-12-01 09:58:32 -08: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 Use xcpretty for iOS build output if installed 2017-09-08 10:00:51 -07:00