Commit Graph

10141 Commits

Author SHA1 Message Date
Pieter De Baets 7de59b102d Support calls through MessageQueue when interecting with JSValue directly
Reviewed By: yungsters

Differential Revision: D4756241

fbshipit-source-id: 5c7309a18ac476a620451bf471471596c9f82cf8
2017-03-28 07:18:21 -07:00
Janic Duplessis ec5baf02bd Fix cxx bridge headers when archiving
Summary:
There were some headers that were in the `public` or `private` section instead of `project` this causes headers to be included in archives and prevent it from being able to be uploaded to the app store. This fixes it by using only `project` headers and copy files like we use in other places.

Also fixes a file that was moved and not updated in ReactCxx.xcodeproj.

**Test plan**
Tested that I am now able to upload an archive on the app store.
Closes https://github.com/facebook/react-native/pull/13008

Differential Revision: D4779894

Pulled By: javache

fbshipit-source-id: 6e36e925cc3fc03c095c9f1872eb5a45b7f0d78c
2017-03-28 06:45:56 -07:00
Janic Duplessis c9fae2fb93 Native Animated - Restore default values when removing props on iOS
Summary:
This fixes a bug that causes properties to keep stale values because they were not restored to their default after being removed when their value was controlled by native animated.

To fix this we restore default values in `disconnectFromView` by updating views with null values for all props that we modified previously. However this causes another issue where we lose any props that were set by the normal process because NativeAnimated operations are always executed after UIManager operatations. To fix this I added a way to hook into UIManager view updating process to be able to execute NativeAnimated operations either before or after updating native views.

In the case of disconnecting we want to do it before updating views so that it does: Value changed by native animated -> value restored to default -> (optional) value updated by normal prop.

This PR also depends on #10658.

**Test plan**
Tested that this fixed a particular bug in an app that uses ex-navigation + native animations where a navbar w
Closes https://github.com/facebook/react-native/pull/11819

Differential Revision: D4752566

Pulled By: javache

fbshipit-source-id: 68ee28200ffeba859ae1b98ac753bd7dcb8910f0
2017-03-28 05:33:02 -07:00
Spencer Ahrens acc1edd188 expand example with `PureComponent` usage, explicit `extraData` prop, `initialNumToRender`
Summary: Should help with some common pitfalls, e.g. https://github.com/facebook/react-native/issues/12512#issuecomment-289521758.

Reviewed By: yungsters

Differential Revision: D4781833

fbshipit-source-id: 3dec2f0c444645ad710e9ed81390636da4581f0f
2017-03-27 20:00:10 -07:00
Brian Vaughn 6f9447e7b2 React sync (16 beta 6 plus addons)
Reviewed By: sebmarkbage

Differential Revision: D4775005

fbshipit-source-id: c50d099dc3d01c10e122c56f11bd990a2b1e81d1
2017-03-27 17:01:14 -07:00
Eric Vicenti 92d985fb49 Deprecate Navigator
Reviewed By: fkgozali

Differential Revision: D4770514

fbshipit-source-id: ea3ea7fc5515ff42394bacb4a63a9a6411185e2a
2017-03-27 13:32:29 -07:00
Marc Horowitz 8706b663b6 Include ios-cc.sh in the package.
Reviewed By: javache

Differential Revision: D4775797

fbshipit-source-id: 632853cc5b809b8e4f5c9bd06386ede385104f7f
2017-03-27 12:03:25 -07:00
Janic Duplessis 87b0378eb8 Native Animated - Restore, reorganize and add new tests
Summary:
Native Animated tests were removed a while back because they were failing, this restores the existing tests and reorganize / cleanup them. It also adds new ones so we have at least one test for each public API. These tests mostly assert that the native animated module is called with the proper args.
Closes https://github.com/facebook/react-native/pull/12775

Differential Revision: D4684968

Pulled By: ericvicenti

fbshipit-source-id: 4783d5edd08101cab7c0ce2eec4f3ccd0fbc1d27
2017-03-27 11:46:05 -07:00
Eric Vicenti 7aa2c9ab17 NavigatorIOS - Remove NavigationContext
Reviewed By: fkgozali

Differential Revision: D4774022

fbshipit-source-id: 0184bcbcf6a458eac6377cc6e1cffc0924f0d2d2
2017-03-27 10:46:30 -07:00
Eric Vicenti af34c3452f Fix license header for TVEventHandler
Reviewed By: yungsters

Differential Revision: D4775067

fbshipit-source-id: 3504b0429c14d6a7d79ac4c8464113f4a19ae230
2017-03-27 10:32:14 -07:00
Jean Lauliac e0ad42592b packager: ResolutionRequest.js: resolveDependency() now sync
Reviewed By: davidaurelio

Differential Revision: D4763593

fbshipit-source-id: b3dc95229d040c776833a88c9a156b9168e0cc4c
2017-03-27 09:46:37 -07:00
Jean Lauliac b96e210500 packager: ResolutionRequest.js: sync _resolveNodeDependency()
Summary: Moar synchronicity.

Reviewed By: davidaurelio

Differential Revision: D4756495

fbshipit-source-id: 4e0758ba8b55bd25a24d79dcc8ac4ace101e2ae8
2017-03-27 09:46:37 -07:00
wenzhe.lv d2939eafbf Fix crash when move on the edge of some phones like HUAWEI P9
Summary:
The app crashes because of `TouchEventCoalescingKeyHelper.getCoalescingKey` throwing an exception when move on the edge of some phones like HUAWEI P9. It's caused by that the down time differs from `ACTION_DOWN` to `ACTION_MOVE` which belongs to the same gesture when I touched on the edge of my HUAWEI P9. It seems a native bug of manufacturer. Related issue #11302.
```
java.lang.RuntimeException: Tried to get non-existent cookie
    at com.facebook.react.uimanager.events.TouchEventCoalescingKeyHelper.getCoalescingKey(TouchEventCoalescingKeyHelper.java:75)
    at com.facebook.react.uimanager.events.TouchEvent.init(TouchEvent.java:93)
    at com.facebook.react.uimanager.events.TouchEvent.obtain(TouchEvent.java:46)
    at com.facebook.react.uimanager.JSTouchDispatcher.handleTouchEvent(JSTouchDispatcher.java:118)
    at com.facebook.react.ReactRootView.dispatchJSTouchEvent(ReactRootView.java:158)
    at com.facebook.react.ReactRootView.onInterceptTouchEvent(ReactRootView.java:130)
    at android.view.Vie
Closes https://github.com/facebook/react-native/pull/12063

Differential Revision: D4779060

Pulled By: astreet

fbshipit-source-id: 5cf20084ff9081f2535ff9cb3b99d1d52c443f03
2017-03-27 07:02:14 -07:00
Eric Vicenti 3b2864404e Fix broken references in website, moved lists, remove navigator
Reviewed By: mkonicek

Differential Revision: D4775152

fbshipit-source-id: 8af949573ed827ec86a68c1f311c4180f19da742
2017-03-26 17:16:03 -07:00
Tim Yung 73c85e4f31 RN: Cleanup Flow / Jest / Metro Configs
Reviewed By: kassens

Differential Revision: D4777088

fbshipit-source-id: d07f4d1dd019a814c8bee4caeb57fc1dd3721c27
2017-03-26 16:05:10 -07:00
Aaron Chiu e2204c5ccb measure delay of calling into UI thread when setting up ReactContext
Reviewed By: yungsters

Differential Revision: D4736627

fbshipit-source-id: 6d425ef0ad7bbd54296a619009136c929cb16030
2017-03-25 09:52:16 -07:00
Brian Vaughn 848593c0f0 Moved takeSnapshot method from UIManager to ReactNative
Reviewed By: spicyj

Differential Revision: D4767428

fbshipit-source-id: 77c80c0135641ab46f9dce2763f27499a96373a0
2017-03-25 00:46:54 -07:00
Héctor Ramos 30778b62ea Update RunningOnDevice.md
Summary:
Taking another pass at this doc after running apps on iOS and Android devices this week. Of note, the Connecting to Dev server section on iOS seemed incomplete.

Tested steps on iOS and Android.

Tested rendering of the site on all permutations.
Closes https://github.com/facebook/react-native/pull/13143

Differential Revision: D4775026

Pulled By: hramos

fbshipit-source-id: 9b64120922a093ac646d12861d8dee98fb4e5d7d
2017-03-24 18:45:58 -07:00
dabit1 94d93f7d41 PositionError must be an object, not string
Summary:
As specifications says, the Position error must be an object with code and message attributes. Right now it is a string. If not, we can't know what kind of error is. Another issue is that the message must be exactly "No available location provider."

Specifications:
https://developer.mozilla.org/en/docs/Web/API/PositionError
Closes https://github.com/facebook/react-native/pull/13140

Differential Revision: D4774922

Pulled By: ericvicenti

fbshipit-source-id: f956af051461e9f8d6435496283e54b3c4dc8ef5
2017-03-24 18:30:59 -07:00
Spencer Ahrens 27c3e32abf FrameRateLogger JS module
Summary:
This adds a flowified JS module for the FrameRateLogger native module and plugs
it into `ScrollResponder` and `AppRegistry`.

If there is no `FrameRateLogger` native module, then the function calls will be no-ops.

One major limitation is that we can't track animated/programatic scrolls because we don't
have reliable end events. Would be generally useful to add those in a followup though.

Reviewed By: fkgozali

Differential Revision: D4765694

fbshipit-source-id: f3bec771df6ac918200c1afd1a7d8b6da540a4e2
2017-03-24 18:30:59 -07:00
Sokovikov c87c4d052f Fixed previously broken support for negative `scale` (`transform` style property)
Summary:
closes #13081

UIExplorer, TransformExample
Closes https://github.com/facebook/react-native/pull/13083

Reviewed By: mmmulani

Differential Revision: D4758237

Pulled By: shergin

fbshipit-source-id: 58385a4cde7a739b6657c293c381644a92918265
2017-03-24 18:15:42 -07:00
Eric Vicenti 09fe99972d Fix license headers on SwipableRow
Reviewed By: hramos

Differential Revision: D4770164

fbshipit-source-id: fc1cbbdd2161d4fd307cb14821318466fa6fca57
2017-03-24 14:47:28 -07:00
Eric Vicenti 8ff813e6e0 Fix license header on websocket_integration_test_server
Reviewed By: hramos

Differential Revision: D4770121

fbshipit-source-id: c05b45e8775cf3d05c8c9a6e87ab35a3bd032087
2017-03-24 14:47:25 -07:00
Eric Vicenti ff4468ad1b Re-License Lists with standard React Native License
Reviewed By: sahrens

Differential Revision: D4771084

fbshipit-source-id: 9878a813b7dacb6ec1215fee469b946df0752de9
2017-03-24 14:31:19 -07:00
Eric Vicenti 77d52fecbe Remove old examples from RN repo
Summary:
React Native originally shipped with these examples, which have gotten super old and unmaintained.

Cruft like this in the core repo only slows us down with extra issues and pull requests. Eventually we may create a different repo for samples that will be maintained into the future.

We are doing some spring cleaning in the repo, so now is a good time to remove these and let the community share their own examples.
Closes https://github.com/facebook/react-native/pull/13064

Differential Revision: D4770699

Pulled By: ericvicenti

fbshipit-source-id: bbcdec336b28e5a9330afbdb6b166e94e15fa485
2017-03-24 14:17:40 -07:00
Lee Byron d2fc08d33b Move classic relay into oss packages
Reviewed By: kassens

Differential Revision: D4769497

fbshipit-source-id: 0144456a82c3969b399a4a0b37814b5627d191c5
2017-03-24 11:31:01 -07:00
Andrew Y. Chen 820c8e2466 Instrumentation test for PokesDashboardApp
Reviewed By: AaaChiuuu

Differential Revision: D4758149

fbshipit-source-id: 17e448d44af4deccc288738d294146a612d5e9c3
2017-03-24 11:16:21 -07:00
Pieter De Baets 3f46e591ff Fix crash when overriding native modules on RCTJSCExecutor
Reviewed By: alexeylang

Differential Revision: D4769955

fbshipit-source-id: 20f4f4c469eafbe2c7a81ad9f5b9a8386195a8ac
2017-03-24 09:31:04 -07:00
Andrew Y. Chen 893689c82b Fix buck build
Reviewed By: AaaChiuuu

Differential Revision: D4768765

fbshipit-source-id: 91e34faa2fe864b9a9835e6dab07c8396477505f
2017-03-24 08:47:02 -07:00
Pieter De Baets ff7fb6efda Allow overrides of NativeModules
Reviewed By: mhorowitz

Differential Revision: D4764126

fbshipit-source-id: 036f848f8b3debbb3cc4a34fc99044304615760e
2017-03-24 05:04:05 -07:00
Brian Vaughn de8ce45258 Ran codemod to replace View.propTypes with ViewPropTypes
Reviewed By: yungsters

Differential Revision: D4764838

fbshipit-source-id: 0b47a0fdd6793dab9333bb73bb93053fccc27dae
2017-03-24 00:30:48 -07:00
jrodiger f891985bd8 Update runAndroid.js to fix startServerInNewWindow() (Windows)
Summary:
**Motivation**
Resolves issue: #12367. The issue is that the packager does not launch automatically on Windows when running `react-native run-android` like it does on OSX. The proposed change fixes this issue, and causes the packager to be launched automatically on Windows 10. Also note the updated code uses the syntax described in the [Node.js documentation](https://nodejs.org/api/all.html#child_process_spawning_bat_and_cmd_files_on_windows) on spawning .bat files on Windows.

**Test plan**
Manually tested on Windows 10.

Running just `react-native run-android` now results in the packager launching, without needing to run `react-native start` in a new command prompt window.

**Screenshot:**
![packager](https://cloud.githubusercontent.com/assets/17132071/23641540/8d82bb7c-02c2-11e7-9c47-d1c9b582bd65.png)
Closes https://github.com/facebook/react-native/pull/12755

Differential Revision: D4767321

fbshipit-source-id: a14f369ba99939aa44d0ee3403e1d262e2657e6e
2017-03-23 18:20:10 -07:00
Brian Vaughn 9a88c72163 Exposed new ViewPropTypes object on ReactNative renderer (stack and fiber)
Reviewed By: yungsters

Differential Revision: D4765002

fbshipit-source-id: 54be903bf6529df7ab2cff265c1f87b145da8d94
2017-03-23 17:45:30 -07:00
Eric Vicenti febf3d00ed Remove Deprecated NavigationExperimental
Summary:
Now that there are a number of good navigation solutions provided by the community, we are ready to remove NavigationExperimental from the RN core. The latest navigation doc explains the available options pretty well: http://facebook.github.io/react-native/docs/navigation.html . We should also add a mention to Airbnb's new native-navigation.

For anybody who continues to rely on it, it is recommended to migrate to React Navigation, which will be maintained over the long-term. For those who cannot migrate yet, it is possible to copy this code into your app.
Closes https://github.com/facebook/react-native/pull/13066

Differential Revision: D4757539

Pulled By: ericvicenti

fbshipit-source-id: 949d9b33f188584fb095155fa67d3ce24beba29f
2017-03-23 17:29:56 -07:00
Gabe Levi d868e86df0 Deploy v0.42.0
Reviewed By: zertosh

Differential Revision: D4732064

fbshipit-source-id: 12fb8f9aff983ff5d1cb01f413bab761259829f9
2017-03-23 16:46:23 -07:00
Pieter De Baets 7c9173bc9e Enable -Wimplicit-retain-self en sync warning config for all projects
Summary:
This is enforced for all of our internal iOS code and a common cause of import failures.

cc janicduplessis
Closes https://github.com/facebook/react-native/pull/13124

Differential Revision: D4765016

fbshipit-source-id: 7c8248c98bca0fa6bad24d5a52b666243375e0db
2017-03-23 15:01:34 -07:00
Jean Lauliac 20ba987139 packager: TerminalReporter: stop reporting global cache errors
Summary: At FB we log errors into the error infra, and these errors are not actionnable for end users, so let's reduce the noise generated on the terminal. In the OSS case, people can simply add a handler in a TerminalReporter decorator, the same way we do internally (anyhow, I do not know of anyone using the global cache in OSS for now).

Reviewed By: davidaurelio

Differential Revision: D4762858

fbshipit-source-id: 880c02e175ae551df11b7ce273acc318222c46bf
2017-03-23 12:31:39 -07:00
Michael Lee dcf3cbeb31 Clean up some of the ReactNative Buck rules
Reviewed By: yangchi

Differential Revision: D4739284

fbshipit-source-id: 0ee335df0d114631e5fc60d5d6e51547e5312d39
2017-03-23 12:02:25 -07:00
Gustavo Perdomo 3df654e28e Integrare UNUserNotification
Summary:
Implementing removeAllDeliveredNotifications and removeDeliveredNotifications for remove notifications from notification center, and getDeliveredNotifications

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, calling PushNotificationIOS.cancelAllLocalNotifications not remove the notification from the Notification Center

In iOS 10, a new UNUserNotification class was introduced, this class has a method which get and remove the notifications from notification center

This PR try to solve that.

In my case, i'm working with an messaging app, every message is a new notification, when the user tap a notification, the app is opened and the rest of notifications should be gon
Closes https://github.com/facebook/react-native/pull/13036

Differential Revision: D4761828

Pulled By: javache

fbshipit-source-id: 216e44a64f1bf88b5ae3045d1fa6eca8a1278a71
2017-03-23 12:02:25 -07:00
Pieter De Baets 9d377e98a0 Fix warnings in React.xcodeproj
Summary:
Various fixes of xcode projects and cleaning up some warnings
Closes https://github.com/facebook/react-native/pull/13109

Differential Revision: D4762652

Pulled By: lacker

fbshipit-source-id: b452976a58962439de4adecc8e703264af40cb38
2017-03-23 11:36:17 -07:00
Hector Ramos 1f15c7526a Fix broken icons in Safari
Summary:
The Play Store started serving WebP files for these icons, which are not rendered well in Safari. Switched to JPEGs from the App Store.

Periodical pruning of the showcase: Removed several entries to keep the showcase fresh.
Closes https://github.com/facebook/react-native/pull/13098

Differential Revision: D4762944

Pulled By: hramos

fbshipit-source-id: 5f9c43fd186f20b432c54496b143b4a9dd5851e3
2017-03-23 11:20:46 -07:00
Héctor Ramos 53f9e6a659 Update ISSUE_TEMPLATE.md
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.
Closes https://github.com/facebook/react-native/pull/13122

Differential Revision: D4763115

Pulled By: hramos

fbshipit-source-id: 5d4852a133d42e3fd6eb084cf491a672cf075c29
2017-03-23 11:20:46 -07:00
Jean Lauliac 337daa3d19 packager: ResolutionRequest.js: sync _resolveHasteDependency()
Summary: Some more synchronicity, one step at a time.

Reviewed By: davidaurelio

Differential Revision: D4756542

fbshipit-source-id: 0c56dbca61b3da764aa8d28e29c0e20b54de091e
2017-03-23 11:20:46 -07:00
Jean Lauliac 3f0f7357cf packager: ResolutionRequest.js: sync _resolveFileOrDir
Reviewed By: davidaurelio

Differential Revision: D4754138

fbshipit-source-id: d19792a726220a673dead1c8c6cdf487e34a6808
2017-03-23 11:20:46 -07:00
Jean Lauliac f06384b1b7 packager: ResolutionRequest.js: _loadAsDir and _loadAsFile sync
Reviewed By: davidaurelio

Differential Revision: D4754090

fbshipit-source-id: 84ad1d988bf097d3094d90f3738ce64cc523879c
2017-03-23 11:20:46 -07:00
Héctor Ramos 10918680eb Fix grammar in the "Running on a device" docs
Summary:
The wording had some grammar issues. The instructions were also not as precise as they could be.

Verified on Xcode 8.2.1.
Closes https://github.com/facebook/react-native/pull/13093

Differential Revision: D4763071

Pulled By: hramos

fbshipit-source-id: fe9da098f0e457efba4712db704692f6f4857624
2017-03-23 11:20:46 -07:00
Andrew Y. Chen 04ccbdd887 Move NetworkRecordingModuleMock into testing/network
Reviewed By: AaaChiuuu

Differential Revision: D4755904

fbshipit-source-id: 8a68530453b1d288da402f17e16fec9c57e5bb2a
2017-03-23 11:03:44 -07:00
Brian Vaughn 333dd59533 ReactNativeFiber findNodeHandle() bugfix
Reviewed By: sahrens

Differential Revision: D4762397

fbshipit-source-id: d047f5c77067dbf8b0331695bb661e04ce00913c
2017-03-23 11:03:43 -07:00
Peter Hoang 123311cad2 Update GettingStarted.md
Summary:
Typing "android avd" into the terminal is not supported anymore. The android command is no longer available. There are workarounds, but it involves replacing files with the older ones.

Thanks for submitting a PR! Please read these instructions carefully:

- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged
Closes https://github.com/facebook/react-native/pull/13096

Reviewed By: AsyncDBConnMarkedDownDBException

Differential Revision: D4762937

Pulled By: AsyncDBConnMarkedDownDBException

fbshipit-source-id: 5289402d7e6934d3493a902247a991cd1d887ec0
2017-03-23 10:45:21 -07:00
Brian Vaughn 53905a537a ReactNative moved View.propTypes to ViewPropTypes
Reviewed By: yungsters

Differential Revision: D4761354

fbshipit-source-id: b49922d78ee5d8628f945e5dee476ffe5d889b07
2017-03-23 09:15:42 -07:00