Summary:
- Consolidate common code in iOS and tvOS test scripts
- Start the packager before starting tests, to improve reliability
- Increase timeout value in RCTTestRunner.m
Closes https://github.com/facebook/react-native/pull/10378
Differential Revision: D4028364
Pulled By: bestander
fbshipit-source-id: 24c2124a1c62643a02f0668b60a67b971e08d1a3
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/10413
Differential Revision: D4028108
fbshipit-source-id: 99a864dfda578d640f582b296583591415ba26cd
Summary:
JS API very similar to web workers and node's child process.
Work has been done by somebody else for the Android implementation over at #7020, so we'd need to have these in sync before anything gets merged.
I've made a prop `messagingEnabled` to be more explicit about creating globals—it might be sufficient to just check for an onMessage handler though.
![screen shot 2016-09-06 at 10 28 23](https://cloud.githubusercontent.com/assets/7275322/18268669/b1a12348-741c-11e6-91a1-ad39d5a8bc03.png)
Closes https://github.com/facebook/react-native/pull/9762
Differential Revision: D4008260
fbshipit-source-id: 84b1afafbc0ab1edc3dfbf1a8fb870218e171a4c
Summary:
For some reason the transitive dependency isn't picked up in OSS, so make it hard.
bestander
Closes https://github.com/facebook/react-native/pull/10397
Differential Revision: D4024350
Pulled By: bestander
fbshipit-source-id: 32182857dcc88744ebf6ce0e5cf8eaee390bf067
Summary:
In xcode, you can modify the Product Name per build configuration. During the build, the app file name is made using that value. For example, I name my app "MyApp Dev", it will build into "MyApp Dev.app".
react-native run-ios doesn't extract the proper app name. Instead it uses the scheme name + ".app". So if in the example above I use the default Scheme "MyApp", which references the build configuration whose name is "MyApp Dev". The build will succeed, but when runIOS.js goes to run the app, it fails because the file name doesn't exist.
My fix parses the build output and extracts the app name from the line "export FULL_PRODUCT_NAME=$(appfilename)" and uses that instead of the scheme. If there is any issue parsing, the scheme name is used like it currently is.
**Test plan (required)**
1) Change the Product Name in xcode project manager to be something different than the scheme name.
2) Run react-native run-ios and ensure it works.
Closes https://github.com/facebook/react-native/pull/10178
Differential Revision: D4022116
Pulled By: javache
fbshipit-source-id: c1bd8e7a1f6364d681c505557a96955a293bc05c
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