Commit Graph

10498 Commits

Author SHA1 Message Date
Gerald Monaco 102f990861 Add symbolication support to DevServerHelper
Reviewed By: javache

Differential Revision: D4929829

fbshipit-source-id: 6babdb868d27c1b0da0332cc6aee38502f35704f
2017-04-25 11:15:37 -07:00
Michael Schneider 57b0039ce1 Add appProperty to ReactRootView
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
2017-04-25 10:19:40 -07:00
Daniel Wagner-Hall 3d2a9ebdda Remove project_config rules
Reviewed By: marcinkosiba

Differential Revision: D4939288

fbshipit-source-id: 53343a9a1a016db305de0293b6db5dc127940865
2017-04-25 07:21:03 -07:00
Pieter De Baets 34bc6bd2ae Drop support for webworkers
Reviewed By: AaaChiuuu

Differential Revision: D4916449

fbshipit-source-id: a447233d3b7cfee98db2ce00f1c0505d513e2429
2017-04-25 05:37:54 -07:00
Pieter De Baets a20882f62e Remove WebWorker support from Timers
Reviewed By: AaaChiuuu

Differential Revision: D4929245

fbshipit-source-id: 6eae128756a31f6063bf8fe39f0573c1c07ca8bb
2017-04-25 05:37:53 -07:00
Pieter De Baets ea93577ff2 Remove WebWorker support from NetworkingModule
Reviewed By: AaaChiuuu

Differential Revision: D4929251

fbshipit-source-id: fa07bfea64e6f79fd7b8c19889a26caec03cd421
2017-04-25 05:37:53 -07:00
David Aurelio 3e08a28987 Remove irrelevant options from cache key
Reviewed By: jeanlauliac

Differential Revision: D4938131

fbshipit-source-id: 88b686bc5ee6946297e1fd1b91d46fa618f0d9d7
2017-04-25 04:02:06 -07:00
David Aurelio 291a497bc4 make test independent from side effects
Reviewed By: jeanlauliac

Differential Revision: D4939025

fbshipit-source-id: cc7f811484cba0db4df394edef294cabe7343c8b
2017-04-25 04:02:06 -07:00
Emil Sjolander 5bb1e4813b Move reset into yoga node and dont set overflow as it has no effect
Reviewed By: marco-cova

Differential Revision: D4938759

fbshipit-source-id: 4cd6bc478dd1f56340f23e8bfe95fe7bb1b5db2d
2017-04-25 03:31:57 -07:00
Alexey Lang 1bc9d448f5 Port perf metrics used in RCTBatchedBridge
Reviewed By: javache

Differential Revision: D4938279

fbshipit-source-id: c927261ff96c2eb07b7303ae96aae7600f2947f1
2017-04-25 02:32:25 -07:00
Hector Ramos 3153c3baa0 Remove Appetize embedded examples
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
2017-04-24 12:16:36 -07:00
Jean Lauliac b6a7a711de packager: buck library: aggregate assets
Reviewed By: davidaurelio

Differential Revision: D4938032

fbshipit-source-id: afc4f4f97b7cc513eca9c925e09fbee4871216f4
2017-04-24 09:34:41 -07:00
Janic Duplessis 6c434f9404 Native Animated - Support decay on iOS
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
2017-04-24 04:31:43 -07:00
Emil Sjolander f1d5fdd468 connect / disconnect with websocket not when starting / stopping
Reviewed By: kittens

Differential Revision: D4937181

fbshipit-source-id: d1ec8144567809537fc7e321c255501bb130939b
2017-04-24 04:01:39 -07:00
Pieter De Baets f09fdcbd2b Throw when failing to load script
Reviewed By: AaaChiuuu

Differential Revision: D4929104

fbshipit-source-id: 115a44097b26bc11d20059c1667b9cf36fc47be9
2017-04-24 04:01:38 -07:00
Andres Suarez 43fd94daef Update babel & friends
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
2017-04-23 07:44:53 -07:00
Andrew Y. Chen 88a63980b5 Fix disabled prop for Text
Reviewed By: antiarchit

Differential Revision: D4929450

fbshipit-source-id: b6c508d5dec695d04858b83ce38ca89d250c360e
2017-04-21 18:02:09 -07:00
Kevin Lacker d47a86de4c disable Circle e2e tests
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
2017-04-21 13:46:21 -07:00
Eric Vicenti 297354615a Upgrade prop-types and fix RN website yarnfile
Reviewed By: gfosco

Differential Revision: D4930232

fbshipit-source-id: a77687dd043dc85c7b5194523393e640f3bcf6e7
2017-04-21 13:16:15 -07:00
Valentin Shergin e7c6a4c038 Fixed crash caused by NaN values in RCTTouchEvent
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
2017-04-21 11:30:57 -07:00
David Aurelio 13f89f4e38 Stronger typing for transform options / remove duplication
Reviewed By: jeanlauliac

Differential Revision: D4929276

fbshipit-source-id: 0b23435a1502c72377425cae775e258106a5bf14
2017-04-21 08:57:03 -07:00
Pieter De Baets 6b19419cdb Merge all copies of RUN_RUNLOOP_WHILE in UIExplorerUnitTests
Reviewed By: mhorowitz

Differential Revision: D4921344

fbshipit-source-id: 8b00acba108e46c55374df54a027015d4327d683
2017-04-21 08:35:46 -07:00
Pieter De Baets 59378f71db Immediately trigger renderApplication from RCTRootView init
Reviewed By: fkgozali

Differential Revision: D4849610

fbshipit-source-id: 291a9bcdf0efe47d83130fe2675f3ef04a3f085b
2017-04-21 07:04:57 -07:00
Aaron Chiu 6138e20379 give us the ability to create a background UI thread
Reviewed By: javache

Differential Revision: D4928689

fbshipit-source-id: 94fa5f3f7c047ad816c7699dcc8bebf9e751b282
2017-04-21 05:30:22 -07:00
Pieter De Baets b4932082c7 List nested exception in Redbox
Reviewed By: AaaChiuuu

Differential Revision: D4928968

fbshipit-source-id: 3af8f4ad0f76f035d2167fbf4b4381b6503f6bd2
2017-04-21 05:30:22 -07:00
Jean Lauliac 9bbbfb46ea packager: AssetServer: @flow
Reviewed By: davidaurelio

Differential Revision: D4921672

fbshipit-source-id: 6405275bbd04550d7dd87cd5b8ef35a6cf5904f2
2017-04-21 04:01:02 -07:00
Thomas Kekeisen d53e61271a Fixeds a typo in VibrationExample.js
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
2017-04-21 03:30:18 -07:00
Tom Haynes f98d9f5ea8 Small grammar edit
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
2017-04-21 03:15:17 -07:00
William Schurman 39d19740d2 Expose shake-to-show dev menu setting via the bridge
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
2017-04-21 03:02:52 -07:00
Daniel Farrell 32eab54781 Apple TV Support: Add tvOS build support for ART library
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
2017-04-20 16:15:38 -07:00
Aaron Chiu 3a3e5affc3 add flag to test running BG UI operation on a separate thread from the native modules thread
Reviewed By: achen1

Differential Revision: D4912045

fbshipit-source-id: b0b1aea24f8d463b95369636b7df2422a23aab22
2017-04-20 16:15:38 -07:00
Aaron Chiu 97a86634f7 lower thread priority of native module and JS thread
Reviewed By: achen1

Differential Revision: D4921012

fbshipit-source-id: 71df4ab0614f20f092b992c07e828eb5ad951159
2017-04-20 15:35:58 -07:00
Marc Horowitz 38f5b84734 Make ModuleHolder usable from C++
Reviewed By: AaaChiuuu

Differential Revision: D4924286

fbshipit-source-id: f4d86603cf241ab21f931fed4798acd805d0b5aa
2017-04-20 15:01:20 -07:00
Pieter De Baets 17020ff9af Add API to reset CxxModuleWrapper's module pointer
Reviewed By: mhorowitz

Differential Revision: D4914335

fbshipit-source-id: f28f57c2e74d590dacfb85d8027747837f768fdc
2017-04-20 11:00:33 -07:00
Pieter De Baets db8efd9c4b Split off websocket related items to RCTPackagerConnection
Reviewed By: cwdick

Differential Revision: D4588557

fbshipit-source-id: 3f4176b9bab2b06cacbb06f1ff514a5f99a76d73
2017-04-20 08:32:10 -07:00
Jean Lauliac 2403b42cf9 packager: getAssetDataFromName: @flow
Reviewed By: davidaurelio

Differential Revision: D4921247

fbshipit-source-id: 47c516257cde5de6b69604d714e45310d00afe19
2017-04-20 07:35:15 -07:00
wenzhao.yin 47f834a76d fix RCTMultipartDataTask Memory leaks
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
2017-04-20 03:45:25 -07:00
Pieter De Baets 366cb5a00a Remove unused PersistentDirectory JSC config
Reviewed By: amnn

Differential Revision: D4921075

fbshipit-source-id: 8e0a0caadc882a0e3ffb6f66c2bc7336c7d64849
2017-04-20 03:15:26 -07:00
Jean Lauliac 79d9fd8f83 packager: correct transform for assets to avoid string
Reviewed By: davidaurelio

Differential Revision: D4913509

fbshipit-source-id: 9997da819483056d896fedecdc47510ecd381c03
2017-04-20 03:00:10 -07:00
Aaron Chiu 350b6c6d7f don't run setupReactContext() on UI thread
Reviewed By: achen1

Differential Revision: D4816125

fbshipit-source-id: e1da5de166bc29d635ffa22e8747a5b61eaf1491
2017-04-20 01:30:59 -07:00
Brian Vaughn 5fa33d4936 Add create-react-class package
Reviewed By: sebmarkbage

Differential Revision: D4917270

fbshipit-source-id: 3a490eaaa31cb0f4a4f39065bf09a1f30f43c4e1
2017-04-19 20:05:33 -07:00
Marc Horowitz 325228d6cf Remove RCTBatchedBridge rule and all uses from the tree
Reviewed By: AaaChiuuu, javache

Differential Revision: D4889438

fbshipit-source-id: ba103ace8802f0976e09af6b491442e9aa723f49
2017-04-19 17:00:43 -07:00
Connor McEwen 3122328023 Enable dev menu in tvOS simulator
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
2017-04-19 15:29:56 -07:00
Georgiy Kassabli 6b0c72fa82 Correcting Flex fix within Experimental feature
Reviewed By: emilsjolander

Differential Revision: D4915189

fbshipit-source-id: efccee2fe39ed0f474a41dc3250d24c546f3f5d9
2017-04-19 13:29:59 -07:00
Emily Janzer bd0f9fbacb Only start observing in requestPermissions() if not already observing
Reviewed By: javache

Differential Revision: D4903744

fbshipit-source-id: d2700f59bae521de6c76f8a3d11d6d48f1c0e7d9
2017-04-19 11:30:36 -07:00
Paulus Esterhazy c58e19ef33 Fix run-ios when specifying a scheme as cli arg
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
2017-04-19 11:30:36 -07:00
Jean Lauliac f519f16180 packager: GlobalTransformCache: throat() the file fetching function
Reviewed By: cpojer

Differential Revision: D4914187

fbshipit-source-id: ae3b8aa4ed4dbd1896ca35cf498b7c02fd109f58
2017-04-19 11:00:41 -07:00
Jean Lauliac aef286791a packager: assetPathUtils: @flow
Reviewed By: cpojer

Differential Revision: D4913888

fbshipit-source-id: 31ddb4b9ede65e1b6caf740a245c3a11326d15d6
2017-04-19 10:41:08 -07:00
Jean Lauliac 0b339362ff packager: buck: fix messed up file types
Reviewed By: cpojer

Differential Revision: D4913706

fbshipit-source-id: 792d78e1baf7d9bea4eba90f791a1dc593087b55
2017-04-19 08:51:14 -07:00
Jean Lauliac 0001d3ce4e packager: worker: strenghten TransformOptions
Reviewed By: davidaurelio

Differential Revision: D4906499

fbshipit-source-id: e7948d09c678d3e270ddd9fd355597eb5d535781
2017-04-19 06:33:52 -07:00