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
Summary:
Soundcloud Pulse for Android is now built in React Native.
This PR adds a link to the Play Store.
Company CLA is signed.
Closes https://github.com/facebook/react-native/pull/15867
Differential Revision: D5794317
Pulled By: hramos
fbshipit-source-id: d2d161d80c10706ec99a9a835a09fbf864ece2a5
Summary:
Commenting these out until we can stop breaking the OSS builds.
Closes https://github.com/facebook/react-native/pull/15859
Differential Revision: D5789816
Pulled By: hramos
fbshipit-source-id: f3b2ecd0cbcb4dbe5e35697a925b2a8bd8397afe
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!
-->
Add another keystore's settings path.
`+ or android/gradle.properties`
Closes https://github.com/facebook/react-native/pull/15846
Differential Revision: D5785326
Pulled By: hramos
fbshipit-source-id: 5bc2acbd53c7ce7fe4e866b8855c3ca8cd4d60dd
Summary:
React Native v0.48.0 shipped `WebSocketModule` support with `BlobModule` as dependency. But `BlobModule` is not mocked in jest which will cause render tests failed.
Reference implantation: [BlobModule.java](ed903099b4/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.java)
Related PR: #11417
Related issue: #15810
Passed CI tests.
Need render a component in jest with WebSocketModule as dependency.
Closes https://github.com/facebook/react-native/pull/15843
Differential Revision: D5783263
Pulled By: shergin
fbshipit-source-id: 2386692f4a644796da2fd66b3135da9f5911663e
Summary:
fix the regression I mentioned in https://github.com/facebook/react-native/pull/15162#issuecomment-319696706
as no one is working on this, I take the step, although I know nothing about Objective C
I find the key point is that the keys in `NSDictionary` are not ordered as presented, it's a hash table, so no grantee on keys order, so I create a new array to do that, then it will check `ultralight` before `light` and `semibold` before `bold`
Closes https://github.com/facebook/react-native/pull/15825
Differential Revision: D5782142
Pulled By: shergin
fbshipit-source-id: 5346b0cb263e535c0b445e7a2912c452573248a5
Summary:
Shame on me.
Naming can be hard. We have to use positive logic to avoid this kind of bugs. :(
In the bright future we also have to rename `isYogaLeafNode` to something with positive logic, like `canHaveYogaChildNodes`.
But before we can do this, we have to have solid plan how to unify it with Android.
Reviewed By: mmmulani
Differential Revision: D5780917
fbshipit-source-id: 1ddaaea06f5618b91528cc87f1433a55b5fae4ac
Summary:
We have to have a way to explicitly enforce the fact that some nodes cannot have Yoga child nodes.
Previously we relied on `isMeasureDefined()`, which is actually special case (so it does not cover all possible cases).
Reviewed By: AaaChiuuu
Differential Revision: D5647855
fbshipit-source-id: 59591be61ef62c61eb98748d44bb28b878f713fc
Summary:
This is revert of revert of https://github.com/facebook/react-native/pull/15542
WITHOUT default RCT_MAIN_THREAD_WATCH_DOG_THRESHOLD value. So, it makes it completly opt-in feature.
When code blocks the UI thread for too long, it's a bad sign because this can prevent the app from remaining responsive. This change helps detect such responsiveness issues by warning when a React method executes on the UI thread longer than some threshold.
Reviewed By: mmmulani
Differential Revision: D5772433
fbshipit-source-id: 24fe4fc0deffe9c091a4bfc4cbd76cb4f34c4091
Summary:
This change only affects tests run with Jest. `require('/images/image1.png')` will be replaced with
```
Object {
"testUri": "relative/path/to/images/image1.png",
}
```
in the Jest snapshot instead of always being 1 returned by RelativeImageStub. This change makes it possible to test conditional asset loading in components.
The problem with this change is that it will probably break a lot of existing snapshots, but that should be easily fixed when a project updates to a new version of React Native by running `jest -u` to update all snapshots.
A component can have conditional asset loading based on its props, this logic would be nice to test with Jest snapshots. This problem has been discussed in https://github.com/facebook/jest/issues/2838.
* **Who does this affect**: Everyone using `Image` in Jest snapshots
* **How to migrate**: Running `jest -u` will update the snapshots, the snapshots should be reviewed that they are correct.
* **Why make this breaking change**: It enables testing of conditional asset loading.
* **Severity (number of people affected x effort)**: Low.
Closes https://github.com/facebook/react-native/pull/13319
Reviewed By: rafeca
Differential Revision: D5708180
Pulled By: mjesun
fbshipit-source-id: 16ac42004d597db08545a21d4fffe95c5ee7e21f
Summary: FlatList only supports one viewability configuration and callback. This change extends FlatList and VirtualizedList to support multiple viewability configurations and corresponding callbacks.
Reviewed By: sahrens
Differential Revision: D5720860
fbshipit-source-id: 9d24946362fa9001d44d4980c85f7d2627e45a33
Summary:
Content offset was broken because on initial render contentSize is {0,0} so any positive offset is lost. Also inset top/bottom and left/right were inversed �, this led to bad initial scrolling offset when using contentInset. This fixes it by making sure contentSize is actually measured (not {0,0}. I guess it's possible that the content is ACTUALLY {0,0} but in that case I don't think it really matters).
**Test plan**
Tested that a scrollview has proper scroll position when specifying contentOffset. Also tested that it works well with contentInset.
```js
<ScrollView contentOffset={{y: 100}}>
<View style={{height: 1000}} />
</ScrollView>
```
Closes https://github.com/facebook/react-native/pull/15670
Differential Revision: D5771221
Pulled By: shergin
fbshipit-source-id: 455ed8fd5a4ad1ec61780b573d1a8ef1d77dd124
Summary:
Otherwise, you're met with a bewildering blank page. :D
<!--
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!
-->
(Write your motivation here.)
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes https://github.com/facebook/react-native/pull/15754
Differential Revision: D5768992
Pulled By: hramos
fbshipit-source-id: 39a9f7c208d635e089751015dcf2536144ec0176
Summary:
Fixed a typo in `ToastAndroid.js`'s comment.
No test plan. Just fix a typo.
Closes https://github.com/facebook/react-native/pull/15802
Differential Revision: D5767578
Pulled By: hramos
fbshipit-source-id: 4ccc708800f7d4259d266fba195981a85e6647a1
Summary:
Current Geolocation API docs do not mention using PermissionAndroid when working with API 23+. This updates the docs to reflect that requirement.
This a documentation change, so no testing is required.
Closes https://github.com/facebook/react-native/pull/14133
Differential Revision: D5767852
Pulled By: hramos
fbshipit-source-id: 25af70db864a50cdc5e3765eccdeecd49c084d9a
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!
-->
I was trying to follow the instruction on http://facebook.github.io/react-native/docs/integration-with-existing-apps.html to integrate react native into existing android app, but failed. After hours of google/stackoverflow, I finally get it running. I am submitting this pr the list the diffs in the guide so that other developer won't fell into the same issues.
- create an example android project
- follow the guide in the pr to integrate react-native into the example android project
- make sure it runs without error
Closes https://github.com/facebook/react-native/pull/15813
Differential Revision: D5767573
Pulled By: hramos
fbshipit-source-id: 805165a64b6db2aa2de936ad8f6a8a3d2fedd7c4
Summary:
We assign the value to an NSInteger so we should convert the NSString to an NSInteger instead of an int.
Build the app in Xcode and run it.
Closes https://github.com/facebook/react-native/pull/15806
Differential Revision: D5767118
Pulled By: shergin
fbshipit-source-id: b310511f13f5f4026d595a219d69811801d313c2