Summary:This is the initial implementation of the Navigator done with the NavigationExperimental library.
There will be following diffs to support more features that are currently available from the Navigator.
Reviewed By: ericvicenti
Differential Revision: D3016084
fb-gh-sync-id: ed509fc86e9dc67b5334be9e60b582494fd52844
shipit-source-id: ed509fc86e9dc67b5334be9e60b582494fd52844
Summary: ReactAndroid will need to use the deprecated version of folly::dynamic for the time being.
Reviewed By: bestander
Differential Revision: D3025433
fb-gh-sync-id: fee6beb65d5d0c449f1a08a0d3c593b788905001
shipit-source-id: fee6beb65d5d0c449f1a08a0d3c593b788905001
Summary: We also need a more recent version of uglify that supports this
Reviewed By: martinbigio
Differential Revision: D3024959
fb-gh-sync-id: f9efdddceda4f726567c39884c844a8e74e6e09d
shipit-source-id: f9efdddceda4f726567c39884c844a8e74e6e09d
Summary: We need a newer release of uglify in order not to include //# sourceMappingURL= comments
Reviewed By: martinbigio
Differential Revision: D3025104
fb-gh-sync-id: f39a2fa859c3279908abd47e84288ef6a0a17e4a
shipit-source-id: f39a2fa859c3279908abd47e84288ef6a0a17e4a
Summary:**EDIT: **
This has been updated to simply fix the `run-android` command so that it runs on all connected devices instead of throwing an error.
**Original PR description:**
This adds a new command to the react-native CLI. When executed this command will install and successfully execute your app on all connected Android devices:
`react-native run-android-all`
Closes#5901
**Note:** I wasn't sure how to approach this API since it seems a bit like a flag, but I didn't see any other flags implemented in the cli so it seems like the current trend is to keep all commands to a single phrase. I am open to changing this if need be.
Closes https://github.com/facebook/react-native/pull/5902
Differential Revision: D2976580
Pulled By: mkonicek
fb-gh-sync-id: e7f734478f719cf59e0192b5f4be3f6408c31964
shipit-source-id: e7f734478f719cf59e0192b5f4be3f6408c31964
Summary: Don’t rebuild bundles automatically after they have been requested once. This helps to not lock developer machines.
Reviewed By: martinbigio
Differential Revision: D3019751
fb-gh-sync-id: 98367b4fb89c5ae22c00444eabc1194ba6832dba
shipit-source-id: 98367b4fb89c5ae22c00444eabc1194ba6832dba
Summary: If we're compiling with `-Wunused-variable` and `__IPHONE_OS_VERSION_MIN_REQUIRED` >= 8.0, this would cause an build error.
Reviewed By: javache, majak
Differential Revision: D3019904
fb-gh-sync-id: d4482d7d070f8d896acd44b03ebc70bacd9f2f3f
shipit-source-id: d4482d7d070f8d896acd44b03ebc70bacd9f2f3f
Summary:Make packager transform files before extracting their dependencies.
This allows us to extract dependencies added by transforms (and to avoid including them manually).
It also allows for better optimization and to get rid of the “whole program optimization” step:
This diff utilizes the new worker introduced in D2976677 / d94a567 – that means that minified builds inline the following variables:
- `__DEV__` → `false`
- `process.env.NODE_ENV` → `'production'`
- `Platform.OS` / `React.Platform.OS` → `'android'` / `'ios'`
and eliminates branches of conditionals with constant conditions. Dependency extraction happens only after that step, which means that production bundles don’t include any modules that are not used.
Fixes#4185
Reviewed By: martinbigio
Differential Revision: D2977169
fb-gh-sync-id: e6ce8dd29d1b49aec49b309201141f5b2709da1d
shipit-source-id: e6ce8dd29d1b49aec49b309201141f5b2709da1d
Summary:See comments on https://github.com/facebook/react-native/pull/6346
We cannot publish the shrinkwrap file to npm and make the same file
work with the internal fb infra.
We've never had the shrinkwrap file in a release of RN, keeping it
that way for now should be ok.
Reviewed By: bestander
Differential Revision: D3024260
fb-gh-sync-id: 477509eb9a9890c1955a957ece922d692cd35aab
shipit-source-id: 477509eb9a9890c1955a957ece922d692cd35aab
Summary:This really stumped me and I thought it could be added to the docs.
Closes https://github.com/facebook/react-native/pull/6136
Differential Revision: D2973912
Pulled By: mkonicek
fb-gh-sync-id: 0da1a946e2c2ad00056037a6492be3e99096582e
shipit-source-id: 0da1a946e2c2ad00056037a6492be3e99096582e
Summary:Fixes #6314.
When node-haste is officially the package for users to fix the timeout constant, the docs will need to be updated again, but that's a worry for down the line.
Closes https://github.com/facebook/react-native/pull/6328
Differential Revision: D3023114
Pulled By: mkonicek
fb-gh-sync-id: 939cba5f065c1d3bbd2706115a3a704e62975c98
shipit-source-id: 939cba5f065c1d3bbd2706115a3a704e62975c98
Summary:There are two issues:
1. When calling startObserving or getCurrentPosition for the first time, _locationManager is not initialized and the accuracy value set in options is lost.
2. When using the cached location _lastLocationEvent, current timestamp retrieved by CFAbsoluteTimeGetCurrent() is from 2001, but the timestamp of the location is from 1970. In addition, the comparison between _lastLocationEvent[@"coords"][@"accuracy"] and options.accuracy is incorrect. Less value indicates more accurate location.
Closes https://github.com/facebook/react-native/pull/6198
Differential Revision: D3023786
Pulled By: nicklockwood
fb-gh-sync-id: 869c0e34252470275bf99cf0e5861747247f1158
shipit-source-id: 869c0e34252470275bf99cf0e5861747247f1158
Summary:Fixes the RefreshControl layout after a screen rotation. See #6311 for a more detailed explanation. I fixed it by adjusting the frame of the RefreshControl in `layoutSubviews` of the parent ScrollView.
While working on fixing this I noticed that when doing a 'pull to refresh' and then not scrolling and wait for it to end the next one will not behave like the first one (it will require pulling further down for the spinner to start spinning). I fixed that too by scrolling the scrollview back to 0 manually before calling `UIRefreshControl.endRefreshing`.
**Test plan (required)**
Tested using the UIExplorer RefreshControl example.
When doing a pull to refresh and then rotating the screen the RefreshControl must stay positioned properly.
Doing multiple consecutive pull to refresh without scrolling after should all behave the same.
Fixes#6311
Closes https://github.com/facebook/react-native/pull/6359
Differential Revision: D3023727
fb-gh-sync-id: f50ae52ea769c2b3e5025c362544a8809a71aa00
shipit-source-id: f50ae52ea769c2b3e5025c362544a8809a71aa00
Summary: In React, ReactCompoundView is supposed to be implemented by a View, but there is no ViewGroup counterpart that allows mixing virual nodes and non-virtual ones (Views) in the same parent. This is needed because TouchTargetHelper always considers child Views when looking for touch target before falling back to View/ReactCompoundView. This works incorrectly for e.g. layout-only / flattened nodes. ReactCompoundViewGroup allow intercepting touch event before it is dispatched to its children. In that sense, ReactCompoundView.reactTagForTouch() is like View.onTouchEvent() whereas ReactCompoundViewGroup.interceptsTouchEvent() is like ViewGroup.onInterceptTouchEvent().
Differential Revision: D3018028
fb-gh-sync-id: d2c70a55afb9ce9823275e7483d72e0ebedf52e4
shipit-source-id: d2c70a55afb9ce9823275e7483d72e0ebedf52e4
Summary:025281230de2e316f2770a2db71f8bec6fe43a07 changed `WebSocket` to fire both `onerror` and `onclose`.
However, `setupDevtools` assumed that only one of the two handlers would ever be invoked. When the handler is invoked, it re-invokes itself to keep a socket open. But since both handelrs are invoked, a series of closed or failed sockets can cause an exponential increase in sockets opened.
Symptoms of this bug include eventually reaching the maximum number of file descriptors allowed by the operating system, or a non-responsive system. Within React Native applications, symptoms include a failure to load resources from the React Native server or application crashes.
Reviewed By: frantic
Differential Revision: D3022697
fb-gh-sync-id: 8131ecbd6d8ba30281253340d30370ff511a5efd
shipit-source-id: 8131ecbd6d8ba30281253340d30370ff511a5efd
Summary:I updated the Network documentation to not lead users to use Parse, since its service is shutting down.
Closes https://github.com/facebook/react-native/pull/6140
Differential Revision: D2974665
fb-gh-sync-id: 2a784ad00f742f9f2e2ce369f8b3e1eaab0e2ad4
shipit-source-id: 2a784ad00f742f9f2e2ce369f8b3e1eaab0e2ad4
Summary:Adds a generic close command to the issue bot and add myself to the task force list.
Closes https://github.com/facebook/react-native/pull/6349
Reviewed By: mkonicek
Differential Revision:D3021271
Ninja: RN GitHub bot only
Pulled By: mkonicek
fb-gh-sync-id: dbdce129c4287173a4c16889c16bb5ed9ded5f79
shipit-source-id: dbdce129c4287173a4c16889c16bb5ed9ded5f79
Summary:When running `react-native run-ios`, this feature allows a user to specify which scheme to run.
My project's scheme name is not the same as the xcode project name. Running `react-native run-ios` would error with the following:
```
± |master ↓95 ✓| → react-native run-ios
Found Xcode workspace Poot.xcworkspace
Launching iPhone 6 (9.2)...
Building using "xcodebuild -workspace Poot.xcworkspace -scheme Poot -destination id=2B3E8AAC-DD61-414C-95BD-F4829A8F7CE6 -derivedDataPath build"
User defaults from command line:
IDEDerivedDataPathOverride = /Users/mrickert/Documents/project/ios/build
xcodebuild: error: The workspace named "Poot" does not contain a scheme named "Poot". The "-list" option can be used to find the names of the schemes in the workspace.
Installing build/Build/Products/Debug-iphonesimulator/Poot.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was n
Closes https://github.com/facebook/react-native/pull/6157
Differential Revision: D3020313
Pulled By: frantic
fb-gh-sync-id: 9d99fa382b3f50045759acea18eff418b15d511d
shipit-source-id: 9d99fa382b3f50045759acea18eff418b15d511d
Summary:After adding support for `XMLHttpRequest#response`, the `fetch` polyfill detects buffer support when debugging in Chrome and sets `responseType` to `'blob'`.
In that case, the response was always empty.
This change will construct a blob if `responseType` has been set to `'blob'` in order to avoid that problem
Reviewed By: steveluscher
Differential Revision: D3018884
fb-gh-sync-id: 4ade0413de67242c3565d95c2880d4a981ba2342
shipit-source-id: 4ade0413de67242c3565d95c2880d4a981ba2342
Summary:Fixes #6281
The JS executor is invalidated from `[RCTBatchedBridger stopLoadingWithError:]`
which prevented another blocks that depended on the executor to run in the bridge
invalidation.
Reviewed By: javache
Differential Revision: D3018299
fb-gh-sync-id: 4f482b9b697bfabd24b405398d25c72b9e1a3c84
shipit-source-id: 4f482b9b697bfabd24b405398d25c72b9e1a3c84
Summary: This diff adds support for initializing the bridge on an arbitrary thread. This is helpful if you want to defer bridge creation, or prevent it from delaying your app startup.
Reviewed By: javache
Differential Revision: D2965725
fb-gh-sync-id: 8065fa89e850031c72ee4427351300986985e9de
shipit-source-id: 8065fa89e850031c72ee4427351300986985e9de
Summary:3 small changes
Added a published android app to the showcase.
Modified the rendering of the apps.
When there's a _source_ property on the app object, the link will show up as shown in this screenshot.
![screen shot 2016-02-04 at 9 13 31 am](https://cloud.githubusercontent.com/assets/5065940/12823220/a79bafcc-cb1f-11e5-8cf5-03b03ecadc45.png)
Also, external links have the _blank target and not just blank (without the underscore), so a new tab/window will always be opened.
Closes https://github.com/facebook/react-native/pull/5761
Differential Revision: D2943464
fb-gh-sync-id: 18c88a90fc7c477730a78442ab0ab45733676dea
shipit-source-id: 18c88a90fc7c477730a78442ab0ab45733676dea
Summary:Motivation: After second navigation event in UIExplorer, content in main page always stayed the same.
Fix: For second and future navigation events use stack.index to retrieve state from stack.children.
Closes https://github.com/facebook/react-native/pull/6312
Differential Revision: D3018119
Pulled By: andreicoman11
fb-gh-sync-id: 4c502c42a0cb7b240e558515fb8fd766d6e1f856
shipit-source-id: 4c502c42a0cb7b240e558515fb8fd766d6e1f856
Summary:Explain the **motivation** for making this change. What existing problem does the pull request solve?
Fixes https://github.com/facebook/react-native/issues/6203
> SyntaxError: Use of const in strict mode.
- The rest of the file isn't using es6 anyway and babel-register is run on the file it's included in
**Test plan (required)**
Shouldn't have issues replacing it since it's used right after one time.
Closes https://github.com/facebook/react-native/pull/6329
Differential Revision: D3017697
Pulled By: martinbigio
fb-gh-sync-id: 42ee011d032a4bae3409b8e7793c9eb508719964
shipit-source-id: 42ee011d032a4bae3409b8e7793c9eb508719964
Summary:The "Android Support Library" package is now named "Local Maven repository for Support Libraries", so this updates the docs and screenshot accordingly.
Closes https://github.com/facebook/react-native/pull/6185
Reviewed By: mkonicek
Differential Revision:D3017638
Ninja: oss only (rn website)
Pulled By: mkonicek
fb-gh-sync-id: 3559a9f09930e7606af7912e7aaee3c4215c1b03
shipit-source-id: 3559a9f09930e7606af7912e7aaee3c4215c1b03
Summary:Motivation: Developer expects `onclose` to be called before/during close of the websocket. The `websocketFailed` event triggers a close but does not invoke onclose.
Testplan: Connect to a websocket server from android, terminate the server, observe that onerror is called, the websocket is closed, but onclose is not called.
Note: the observed bug is in android only because in iOS the underlying websocket implementation fires the `websocketClosed` rather than `websocketFailed` event when the server terminates. Nevertheless, the justification for this change stands that regardless of the cause of the close, if `this.close` is called it is expected this.onclose should be called as well.
Closes https://github.com/facebook/react-native/pull/6307
Differential Revision: D3017458
fb-gh-sync-id: c9e2dfefa597b4e99ee85eaa991667c347f86d83
shipit-source-id: c9e2dfefa597b4e99ee85eaa991667c347f86d83
Summary:Should be self-explanatory.
__Edit__: oh turns out I fixed a memory leak too because of a typo of the typo on teardown.
cc ericvicenti
Closes https://github.com/facebook/react-native/pull/6309
Differential Revision: D3016576
fb-gh-sync-id: 608a39ad293154e47480003bc9b450b521cddbb1
shipit-source-id: 608a39ad293154e47480003bc9b450b521cddbb1
Summary:This commit makes a change to a comment in `Text.md` related to documenting that all text nodes must be wrapped in a `<Text />` component.
I know this is super small, but it was so easy to handle this on Github that I went ahead and did it.
Closes https://github.com/facebook/react-native/pull/6310
Differential Revision: D3016460
Pulled By: vjeux
fb-gh-sync-id: 9cf861c44961c285971ec22489fbf48c16620a5f
shipit-source-id: 9cf861c44961c285971ec22489fbf48c16620a5f