Summary:
This test wasn't being run externally (it's not added to the xcode project) or internally.
It doesn't even test anything related to RN.
Reviewed By: javache
Differential Revision: D4021791
fbshipit-source-id: fee3fd5e1c3ef47f5bc8480cdc98a10b4da21815
Summary:
If you don't have a `package.json` in your project you can't do anything with the cli as it errors. This fixes that by wrapping the reading of the `package.json` file and returns `my-react-native-app` if an error is caught.
Closes https://github.com/facebook/react-native/pull/10207
Differential Revision: D4022113
Pulled By: javache
fbshipit-source-id: ffe940160f9d0b58e630adfab5e0dc9d34b859e5
Summary: Fixes remaining references to `ReactElement` that did not already have `React` in scope.
Reviewed By: bestander, vjeux
Differential Revision: D4022022
fbshipit-source-id: 4aeacee0cdbb2c825feba10282208316d064c578
Summary:
after adding new parameter options in alert method, parameter type is the 5th.
Closes https://github.com/facebook/react-native/pull/10370
Differential Revision: D4021511
Pulled By: javache
fbshipit-source-id: 09476162b879d2081f0c0ac95260e673327871b8
Summary:
Circle CI is failing sometimes on the `buck && ant` task with a `Require JDK 8 or higher` error.
**Test plan (required)**
Make sure tests pass on Circle CI.
Closes https://github.com/facebook/react-native/pull/10390
Differential Revision: D4021546
Pulled By: bestander
fbshipit-source-id: 355657936bf90e70a10df418b378ad07978c0e5e
Summary:
The pod `RCTNetwork` is missing from the `Podfile` documentation. Without it the view controller does not run.
This probably also closes#8449.
Closes https://github.com/facebook/react-native/pull/10389
Differential Revision: D4021432
Pulled By: JoelMarcey
fbshipit-source-id: 689ed540c6750bf4ccaee1e7943d9175ac50d6c5
Summary:
This PR removes the `.setUseOldBridge(true)` from the documentation. The method was removed from the `ReactInstanceManager` class at [this](1a690d5674 (diff-dc0f3a09c238b372cb1c27aa5f7dcbce)) commit and currently it is not available.
Closes https://github.com/facebook/react-native/pull/10368
Differential Revision: D4016564
Pulled By: JoelMarcey
fbshipit-source-id: 0d9f83c1708dc85043d80a82ecd4fad6b9d42cf5
Summary:
We're seeing a lot of crashes from `PermissionsModule` not being able to access the current activity, mentioned in #10009 and here: https://github.com/facebook/react-native/issues/9310#issuecomment-245657347
As far as I can tell, there is no way to ensure the Activity exists since the `ReactContext` holds a `WeakReference` to the current Activity and it appears that the lifecycle calls are happening in the right order (so not the same as #9310).
This will at least allow people to catch the error in JS and update the UI or try again as opposed to crashing the app.
I'm working on some bigger changes in #10221 but this is a smaller change and important to get fixed I think.
Closes https://github.com/facebook/react-native/pull/10351
Differential Revision: D4010242
fbshipit-source-id: 7a76973bb2b3e45817d4283917740c89a10ec0b0
Summary:
on iOS, if you pull photo from one of user's custom album, the app crashes on the assertion `RCTAssert(resolvedPromise == NO, @"Resolved the promise before we finished processing the results.");` . assertion that was assumed to never been reached.
According to iOS doc, the enumerateGroupsWithTypes `usingBlock` block is called with `group=nil` when the iteration is over, but in current react-native implementation, it is stopping in other circumstance (because the `else` case) which is probably a mistake.
You have probably never seen the bug because you didn't tried to use getPhotos with something else than the pre-defined groups, but it should be possible to do so *(and it seems to work fine as soon as I included my fix. Later I should provide a PR that includes a way to list user groups :) but at least I need this to gets in, otherwise it crashes)*.
For instance, User have a Photo Folder (or "album", whatever you call it) called "Instagram", when I call `CameraRoll.getPhotos({ groupName: "Instagram",
Closes https://github.com/facebook/react-native/pull/10272
Differential Revision: D4009342
Pulled By: javache
fbshipit-source-id: a73ca828133b4f0d880c229f9b675538854020de
Summary: Update Activity API to allow adding more details to events for telemetry purposes.
Reviewed By: davidaurelio
Differential Revision: D3982691
fbshipit-source-id: 07f3ed5d1ec4eddbbdeb00feb02ea75e1168705e
Summary:
Grabbing the port from Bundle URL allows concurrent Remote JS Debugging using the same machine with running multiple instances of packager on different ports.
This improves the developer experience when developing and debugging cross-platform components.
Closes https://github.com/facebook/react-native/pull/10007
Differential Revision: D4008630
Pulled By: javache
fbshipit-source-id: fcf8495e564fd9ac7baf26a87ed3904898132aa0
Summary:
Warning: bind(): You are binding a component method to the component.
React does this for you automatically in a high-performance way, so you can safely remove this call. See TouchableOpacity
Closes https://github.com/facebook/react-native/pull/10349
Differential Revision: D4008552
Pulled By: javache
fbshipit-source-id: d98fe9a0d694dee74ea872e51b02fbd75a133e43
Summary:
Replace `<br />` with `{'\n'}` in order to provide an example of working line breaks in React Native.
Closes https://github.com/facebook/react-native/pull/10323
Differential Revision: D3995544
Pulled By: JoelMarcey
fbshipit-source-id: 8404db8f23eeb606a5a5ed98ca1b7f9b20917e46
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**
Explain the **motivation** for making this change. What existing problem does the pull request solve?
Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
**Test plan (required)**
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
**Code formatting**
Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide).
For more info, see
Closes https://github.com/facebook/react-native/pull/10317
Differential Revision: D4002531
Pulled By: hramos
fbshipit-source-id: f70421f39ed17c4d3511c104347d66063c15e0b3
Summary:
> What existing problem does the pull request solve?
Purely a documentation/example error. Was misled/wasted time debugging because of this issue.
Description:
`dx`/`dy` are zero in onPanResponderGrant, not `x0`/`y0`. `x0`/`y0` will be the coordinates relative to the granted element, which are rarely zero.
Closes https://github.com/facebook/react-native/pull/9984
Differential Revision: D4001603
Pulled By: hramos
fbshipit-source-id: 32580795f62394585ccfb8f9a2ae65b0b72add69
Summary:
This just cleans up the work done in #7219 by adamterlson based on grabbou's feedback
Closes https://github.com/facebook/react-native/pull/10337
Differential Revision: D4001540
Pulled By: javache
fbshipit-source-id: c73b5fef912fa71d1d988dae41094c9c46dc610b
Summary:
As of Swift 3, [Swift converts Objective-C API names based on parameters](https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md), so the docs should explicitly declare what the Objective-C API is (because it's also used in the JavaScript side too).
An alternative to this would be to update the Objective-C and JavaScript calls to be `addEventWithName:location:date:` / `addEventWithName()` based on the default Swift API, but I think the approach in the PR is most correct here.
Closes https://github.com/facebook/react-native/pull/10176
Differential Revision: D4001604
Pulled By: hramos
fbshipit-source-id: cd4143d19d2d375288a086b9d7995e75fe1e9170
Summary:
We've deprecated these APIs for quite a few releases and we should be able to get rid of them now.
Remove following deprecated modules/components
- AppStateIOS
- ActivityIndicatorIOS
- IntentAndroid
- SliderIOS
- SwitchAndroid
- SwitchIOS
- LinkingIOS
Update following modules to remove callback support
- Clipboard
- NetInfo
cc bestander
Closes https://github.com/facebook/react-native/pull/9891
Reviewed By: bestander
Differential Revision: D3974094
Pulled By: javache
fbshipit-source-id: 9abe32716bd85d0cea9933894f4447d53bdd5ee7
Summary: Instead of sending a list of modules over to JS on startup (and actually blocking script execution) instead provide a proxy object that constructs each of these lazily.
Reviewed By: lexs
Differential Revision: D3936979
fbshipit-source-id: 71bde822f01eb17a29f56c5e60e95e98e207d74d