Summary:
To get on par with iOS this PR adds an `appProperty` to the `ReactRootView`. The documentation on the iOS side is here: [https://facebook.github.io/react-native/docs/communication-ios.html#properties.](https://facebook.github.io/react-native/docs/communication-ios.html#properties.)
You can pass in initial props with the `startReactApplication` method:
```java
…
Bundle initialProps = new Bundle();
bundle.putString(“initialKey”, “initialValue”);
mReactRootView.startReactApplication(mReactInstanceManager, "HelloWorld", initialProps);
setContentView(mReactRootView);
…
```
And later on properties can be updated this way:
```java
…
// Update props
Bundle updatedProps = mReactRootView.getAppProperties();
updatedProps.putString(“someOtherKey”, “someOtherValue”);
mReactRootView.setAppProperties(updatedProps);
// Replace props
Bundle newProps = new Bundle();
newProps.putString(“someKey”, “someValue”);
mReactRootView.setAppProperties(newProps);
…
Closes https://github.com/facebook/react-native/pull/13430
Reviewed By: AaaChiuuu
Differential Revision: D4896483
Pulled By: javache
fbshipit-source-id: 7c752d6bbf5dc500874b49dcff80db772e83915f
Summary:
These examples work sporadically, and are all based on a years-old build of UIExplorer that was once uploaded to Appetize. As a result, newer APIs such as FlatList are not supported and attempting to run their associated examples will result in an error.
<img width="526" alt="screen shot 2017-04-24 at 12 21 31 pm" src="https://cloud.githubusercontent.com/assets/165856/25348155/57016f4a-28eb-11e7-92b0-a918ef1a0e5c.png">
This PR removes the prompts to run the examples.
See #13644 for exploration into using `<SnackPlayer>` for these.
Fixes#12300
Closes https://github.com/facebook/react-native/pull/13644
Differential Revision: D4939653
Pulled By: hramos
fbshipit-source-id: 11cf564d2ceb1981d3ce700aaae40dc873b183ad
Summary:
This is one of the last feature that is missing from native animated, it was already supported on Android and this implementation is based on it.
**Test plan**
Test that the existing decay animation example now works on iOS
Run unit tests
Closes https://github.com/facebook/react-native/pull/13368
Differential Revision: D4938061
Pulled By: javache
fbshipit-source-id: 36b57b1029a542e9daf21e048a06d3b3347e9659
Summary: This update carries with it Babylon 6.17.0 which adds support for flow type spread, and babel-eslint 7.2.3, which has a fix for working with flow type spreads. The other upgrades are to dedupe the babel deps.
Reviewed By: bestander
Differential Revision: D4922240
fbshipit-source-id: e42d708ad8de1084e31e9be5678d3a3a665fdfa1
Summary:
Motivation is that Circle e2e tests have been broken for a few days, it appears to be flaky and an ongoing problem. AaaChiuuu & Andrew Chen are taking a look, but for now let's turn this off so that Circle can be useful for other things.
Closes https://github.com/facebook/react-native/pull/13616
Differential Revision: D4931852
Pulled By: ericvicenti
fbshipit-source-id: ce725ff3311ea70052191df45d3feb4373176876
Summary:
React Native uses JSON to marshal the data across the bridge.
And because of this we have to avoid using NaN and INF values in events and other pieces of data that suppose to be transfered to/from JS side.
(We also don't want to introduce additional wrapping/escaping semantics for perfomance reasons.)
So, we have to gate all particular cases where there is a possibility of NaN or INF values, and replace these value with something meaningful for each particular case.
We are using `0` as NaN substitution here because:
* NaN in touch event is super rare case;
* Conversion to `0` is fast;
* `0` is okay value for product code in most cases;
* In all cases `0` is decent analog to "undefined position on screen" for touch event;
* Nobody will explicitly handle NaN case in product code, just because it is super rare case and actually indicates that something else went wrong.
Reviewed By: javache
Differential Revision: D4918669
fbshipit-source-id: e95fa29e59dcdc40b57519e307b74c1f293da188
Summary:
Just found this typo in `Examples/UIExplorer/js/VibrationExample.js` and fixed it.
Closes https://github.com/facebook/react-native/pull/13593
Differential Revision: D4921094
Pulled By: javache
fbshipit-source-id: f0945ee0786061f98c634a3f1408c7358d930304
Summary:
Small edit to comment, shouldn't require a test plan.
Closes https://github.com/facebook/react-native/pull/13604
Differential Revision: D4928784
Pulled By: javache
fbshipit-source-id: b8f4aff1580a7c5e8c80bbec3f52252b5e62c852
Summary:
Apps commonly provide their own rage-shake menus or behaviors, including in dev builds where the dev menu is enabled on shake. Rather than try to override these settings via native code, it can be helpful to let the app define when to show the menu via the bridge.
See recent discussion in https://github.com/facebook/react-native/issues/1054
Closes https://github.com/facebook/react-native/pull/13563
Differential Revision: D4928745
Pulled By: javache
fbshipit-source-id: a5b30e1b198780bb560e1a6d528f727b3b7d4cb7
Summary:
The ART library backend did not get build support for tvOS when other libraries did. We are writing an application that will run on tvOS, and wanted to use ART, so it was important to have this. This PR adds that build support.
Verified that this builds and works on tvOS simulator for development of this project.
Closes https://github.com/facebook/react-native/pull/12547
Differential Revision: D4925864
Pulled By: lacker
fbshipit-source-id: f72c650d7620e9c7f59d9ae68cfc39f0e7bab12b
Summary:
In the Docs of `NSURLSession` ,
>IMPORTANT
>The session object keeps a strong reference to the delegate until your app exits or explicitly >invalidates the session. If you do not invalidate the session, your app leaks memory until it exits.
The RCTMultipartDataTask will cause memory leaks, it will make `RCTBatchedBridge` and ` RCTMultipartDataTask` will not release.
So call `[session finishTasksAndInvalidate];` at the end of `startTask` function.
Closes https://github.com/facebook/react-native/pull/12673
Reviewed By: shergin
Differential Revision: D4896497
Pulled By: javache
fbshipit-source-id: eb5f8761f67ad33a7de081a68a9a7e1d4329bfc0
Summary:
There was no easy way to pull up the dev menu in the tvOS simulator
Run the UIExplorer demo and press cmd+d to bring up the menu
Closes https://github.com/facebook/react-native/pull/13584
Differential Revision: D4916967
Pulled By: javache
fbshipit-source-id: 27f50031f65f35dad46ad5ade7b52c7d350b31a2
Summary:
The cli arg `--scheme` allows you to override the inferred scheme.
The runOnDevice command takes this override into account, but run-ios
doesn't. This commit fixes this discrepancy.
Thanks for submitting a PR! Please read these instructions carefully:
- [x] Explain the **motivation** for making this change.
- [x] Provide a **test plan** demonstrating that the code is solid.
- [x] Match the **code formatting** of the rest of the codebase.
- [x] Target the `master` branch, NOT a "stable" branch.
Currently if a custom scheme is specified, `run-ios` will fail with the following message
```
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
```
This PR fixes this.
Tested manually from CLI.
Closes https://github.com/facebook/react-native/pull/13548
Differential Revision: D4914531
Pulled By: javache
fbshipit-source-id: 071710947e90e6194e0229751e33068565e010b2