Summary:
Local Maven repository for Support Libraries -> Android Support Repository
someone so moody
Closes https://github.com/facebook/react-native/pull/11360
Differential Revision: D4339960
Pulled By: lacker
fbshipit-source-id: 04e92d07413184e86fca3034a4a16a6e689da87e
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
Using `~` in the `.bashrc` or `.zshrc` fails inside of double quotes. By changing this to `$HOME` the path is exported correctly in all instances.
Explain the **motivation** for making this change. What existing problem does the pull request solve?
It corrects the path to the Android home location if SDK is installed via Android Studio. Using `~` for the home path is failing. By added `$HOME` you are guaranteed the correct path.
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)**
Install Android Studio & SDK.
Set environment variable in `.bashrc` or `.zshrc` with `${HOME}/Library/Android/sdk` instead of `~/Library/Android/sdk`
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the p
Closes https://github.com/facebook/react-native/pull/11461
Differential Revision: D4327870
Pulled By: JoelMarcey
fbshipit-source-id: 903a84504f6288c73ac39a8f3b8800ededbdccf9
Summary:
The goal of this pull request is to make it easier for contributors to run Android tests locally, specifically the unit tests and integration tests. I added a bunch of checks to the local testing scripts that will warn you if your environment is misconfigured, and tell you how to fix it. I also updated the testing docs, so that the regular "Testing" page should be a decent resource to point people to when you are telling them "hey this pull request needs a test." Just Android, though, I haven't gotten to the iOS parts yet.
I also disabled a couple tests that seemed quite flaky while running on a local machine, and don't seem to be providing much value. In particular, the `TestId` test just hangs on my emulator a lot and has been flaky on CI in the past, so I removed about half of its test cases to make the sample app smaller. The testMetions test appears to be dependent on screen size so I commented it out.
Closes https://github.com/facebook/react-native/pull/11442
Differential Revision: D4323569
Pulled By: bestander
fbshipit-source-id: 9c869f3915d5c7cee438615f37986b07ab251f8c
Summary:
Small pull request
**motivation**
The doc 'Building React Native from source' is not up to date now.
While i try to build from the source my self, the gradle-download-task(2.0.0) will always fail to download boost zip with a failure of 403.
After i upgrade the gradle-download-task to 3.1.2, the download works well.
**Test plan (required)**
I tested to build the source myself, it works.
This is non-code update, it is document update, hope to help other people who get the same download failure.
**Code formatting**
Non-code update PR.
Closes https://github.com/facebook/react-native/pull/11298
Differential Revision: D4288387
fbshipit-source-id: 5e6feef1ea80f7e3feddcc7e4abf2b5cea82f08f
Summary:
The line
`Please make sure you export the correct path for 'ANDROID_HOME' if you did not install the Android SDK using Android Studio.`
was visible twice (one on top of another) in the docs when viewing linux instructions. I removed the block that set it visible on both linux and windows and incorporated it into the existing windows block.
Closes https://github.com/facebook/react-native/pull/11276
Differential Revision: D4269783
Pulled By: hramos
fbshipit-source-id: 423fca3219567cf96d91aefc43d1ddabb2403728
Summary:
*First PR to React Native.*
After performing a clean install of macOS Sierra on my machine I tried to get RN set up again and noticed that the link provided for installing Java (required by Android Studio) pointed to the [wrong location](https://www.java.com/en/download/mac_download.jsp). After some time researching I found the right package required by Android Studio [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).
I tried looking for a more general link (as this points to the JDK version 8 and has a weird path: _jdk8-downloads-2133151.html_ - Sadly this was the best I could find.
I also looked through listed issues to try and find a previous attempt to fix this error but couldn't find any references, sorry if I missed anything.
**TL;DR:** JDK download link is incorrect, PR updates it to the correct one.
Closes https://github.com/facebook/react-native/pull/11201
Differential Revision: D4253304
Pulled By: hramos
fbshipit-source-id: be8ffe059bf60f5d7aa1876e5581b270187864c2
Summary:
I was running RN 0.31 on ArchLinux (kernel 4.7), and "react-native start"
was refusing to run on the default (and sometimes required, as I have
noticed) port. I tried executing the suggested lsof command, but that did not
work. Somewhere I found the lsof command I include in this commit, and that
worked (it was a node.js process). So I'm including it, since I found it
helpful.
Closes https://github.com/facebook/react-native/pull/9402
Reviewed By: lacker
Differential Revision: D4144400
Pulled By: hramos
fbshipit-source-id: 6203549455555efc59b7bab0a3ec23957d80b956
Summary:
The upgrading process based on Yeoman is a pain. For each file, Yeoman (or the brand new copyAndReplace solution a477aec) compares the newly generated content with the existing one and prompts the user if it differs, with very basic options: overwrite or skip.
I have digged into this problem and came with [rn-diff](https://github.com/ncuillery/rn-diff) (you may have read [this article](https://medium.com/ncuillery/easier-react-native-upgrades-with-rn-diff-5020b5c3de2d#.llvy2dym5)). This repository helps people to upgrade RN on their projects. An alternative upgrading process using `git apply` instead of Yeoman is described [here](https://github.com/ncuillery/rn-diff/blob/master/USAGE.md).
This PR is the integration of this process into the core. I got rid of the drawbacks mentioned in the link below in order to make it a clean, elegant, one-step operation.
This process is based on some Shell operations that:
- Generate the blank sources of both old and new versions
Closes https://github.com/facebook/react-native/pull/11110
Differential Revision: D4237107
Pulled By: mkonicek
fbshipit-source-id: 15e82e030b762415c925ccb2a62ddb354a6e18b9
Summary:
Adding documentation for the CLI for 2 reasons:
1. It's not immediately clear to most how the CLI is part of `react-native` and not the node module they installed. This begins clarifying.
2. I plan on adding some additional documentation to this section pending an upcoming PR I've discussed with Mike.
screen shot provided:
![image](https://cloud.githubusercontent.com/assets/997157/20574213/0640d026-b179-11e6-9bc1-4f507b2a195a.png)
Closes https://github.com/facebook/react-native/pull/11097
Differential Revision: D4237028
Pulled By: mkonicek
fbshipit-source-id: c1dc50fe1be7f6947a33ee6472b5862306888055
Summary:
The windows and linux block didn't have the command to install react-native-cli.
The command is the exact same as it is on macOS. It makes the guide a little confusing because it leaves out this critical step and it's difficult to understand whether or not this needed component was already indirectly installed in one of the other steps.
Closes https://github.com/facebook/react-native/pull/11135
Differential Revision: D4236984
Pulled By: mkonicek
fbshipit-source-id: dca237132df7d80b5a02eaf09faec53e13e005cb
Summary:
As said in #10944, there's not yet some good infos on how to profile the javascript.
I'm adding a mention to two ways of doing it (`react-addons-perf` and chrome profiler), feel free to correct me on this.
I almost added an example for `react-addons-perf` but I'm not sure what's the correct way to use. Here's the way I use it:
```javascript
import Perf from 'react-addons-perf';
....
componentDidMount() {
console.log('start perf tracking');
Perf.start();
setTimeout(() => {
console.log('stop perf tracking');
Perf.stop();
Perf.printExclusive();
}, 10000);
}
...
```
Closes https://github.com/facebook/react-native/pull/10974
Differential Revision: D4221630
Pulled By: mkonicek
fbshipit-source-id: 918f837b9c7169c3dd835e653c78159b801fb946
Summary:
Line 367 said **throughly** when it should say **thoroughly**
Closes https://github.com/facebook/react-native/pull/11054
Differential Revision: D4218630
fbshipit-source-id: b2bb58106879a01bdf9694fd8b1b2fda57295755
Summary:
DOCS
Android studio should be android section only
Closes https://github.com/facebook/react-native/pull/10984
Differential Revision: D4197586
Pulled By: JoelMarcey
fbshipit-source-id: 2fe3d737083f3ad301dbc39cdb4f8ff315370d76
Summary:
This is the next incremental step to rewrite node-haste. I apologize for the size of this diff but there is really no smaller way to do this. The current architecture passes a single file watcher instance into many classes that each subscribe to file changes. It's really hard to keep track of this. The new implementation reduces the listeners to two (will eventually be just one!) - one in DependencyGraph and one in it's parent's parent's parent (ugh! This doesn't make any sense). This should make it much more straightforward to understand what happens when a file changes.
I was able to remove a bunch of tests because jest's watcher takes care of things like ignore patterns. Some of the tests were specifically testing for whether the change events were invoked and they are now much more straightforward as well by manually invoking the `processFileChange` methods.
(Relanding a fixed version of D4161662)
Reviewed By: kentaromiura
Differential Revision: D4194378
fbshipit-source-id: 8c008247a911573f6b5f6b0b374d50d38f62a4f5
Summary:
Add note to let users know of the **screen overlay permissions** for the application for a first time run.
Let users know of the **failure to connect** issue also for a first time deployment with a red screen which can be fixed by trying again.
Closes https://github.com/facebook/react-native/pull/10707
Differential Revision: D4184582
fbshipit-source-id: d9a19678b72359547c34109eb118d4aed5c74928
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/10924
Differential Revision: D4181397
Pulled By: ericvicenti
fbshipit-source-id: e5c762937efba3bd65fbe00cc94678e8c1461659
Summary:
The command `react-native run-ios --simulator "iPhone 4s"` wasn't working, and I think it's because there needs to be an equals sign in the command. ie. `react-native run-ios --simulator="iPhone 4s"`
I ran that command again, and it worked for me.
Closes https://github.com/facebook/react-native/pull/10754
Differential Revision: D4175849
Pulled By: hramos
fbshipit-source-id: b11aee955f1f83da2d72e0cb06464ea984cf2002
Summary:
Apple's App Store review guidelines are changing in January 2017. Disabling Apple Transport Security (ATS) will now require reasonable justification to the Apple App Store review board.
The documentation currently suggests disabling ATS completely under certain circumstances. This could cause applications developed with React Native to fail review next year.
The documentation has been updated to give readers a warning about the upcoming changes, allowing them to prepare their servers for HTTPS if necessary.
Screenshot of the change:
![website screenshot](https://cloud.githubusercontent.com/assets/1478253/20237892/d0d5fcb8-a8d6-11e6-917f-e913822f0e59.png)
Closes https://github.com/facebook/react-native/pull/10893
Differential Revision: D4175830
Pulled By: hramos
fbshipit-source-id: 1d9fe50d567151879c7adf7324401f177118d909
Summary:
Currently, to generate a `Release` build in `Android` it is required to get into the `android` directory and run the `react native bundle`with a lot of options and after that run the `gradle` to assemble or install the application with the build type `Release`.
This PR improves the process adding that feature to the `React Native CLI`.
To generate a release build is only required to use the parameter `--configuration` with the value `Release`.
**Examples**
To generate a release build:
```sh
react-native run-android --configuration release
```
To generate a release build for the product flavors staging:
```sh
react-native run-android --configuration release --flavor staging
```
To generate a debug build:
```sh
react-native run-android
```
To generate a debug build for the product flavors staging:
```sh
react-native run-android --flavor staging
```
This PR also removes the option `--install-debug` from the `react-native run-android` because that is always the default value,
Closes https://github.com/facebook/react-native/pull/10867
Differential Revision: D4167203
Pulled By: cpojer
fbshipit-source-id: c5ac07f81feeeea00ee0e8b059b46ef0d258a1a6
Summary:
Method onCreate must be called with parameter - Bundle savedInstanceState. 'savedInstanceState' needed for call super class's implementation of this method. Also, you need to import android.os.Bundle package
Closes https://github.com/facebook/react-native/pull/10045
Differential Revision: D4167919
Pulled By: hramos
fbshipit-source-id: d34d081d08c6615c1ca97ec67a619cf273839c3e
Summary:
If your current android application is targeting the android `api level 23` or greater, displaying the error view will cause a crash in the application. The crash only shows that the system cannot display the view.
Closes https://github.com/facebook/react-native/pull/10479
Differential Revision: D4167801
Pulled By: hramos
fbshipit-source-id: 5f7315038a8a4c36d1513173139d5c4cf50ea868
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 the ["Pull Reques
Closes https://github.com/facebook/react-native/pull/10436
Differential Revision: D4141792
Pulled By: hramos
fbshipit-source-id: b3b460fa2e22a6133865005326b09dddd1c05e29
Summary:
With the current `run-ios` script it is not possible to create/run iOS release builds or any other kind of scheme configuration from the terminal (we need to use `Xcode`). The reason for this is that the `run-ios` script does not expose the scheme configuration option for the `xcodebuild` command. This PR exposes that property and allows the developers to directly create/run release builds from the terminal.
This PR also closes [this](https://productpains.com/post/react-native/create-ios-release-builds-from-terminal) request at `productpains`.
And answers to [this](http://stackoverflow.com/questions/40303229/run-a-react-native-ios-release-build-from-terminal) question at the `stackoverflow`.
**Test plan (required)**
To generate a release build just run:
``` sh
react-native run-ios --configuration Release
```
The output
``` sh
Found Xcode project App.xcodeproj
Launching iPhone 6 (iOS 9.3)...
Building using "xcodebuild -project App.xcodeproj -scheme App -destination id=B0738993-CE4A-4D
Closes https://github.com/facebook/react-native/pull/10637
Differential Revision: D4151793
Pulled By: cpojer
fbshipit-source-id: 5a0fcdd59589977f3e251ec9bb3ba85e8919cffc
Summary:
The RunningOnDeviceAndroid doc had some Linux-specific instructions that are not relevant to macOS/Windows users.
Closes https://github.com/facebook/react-native/pull/10726
Differential Revision: D4139089
Pulled By: JoelMarcey
fbshipit-source-id: cc57c1d7e3c9dec94e123c3597ac78b3efb15dd0
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/10763
Differential Revision: D4139069
Pulled By: JoelMarcey
fbshipit-source-id: ecc36f4e0ff4a44c95d63a256e0cdf67a4d386b3
Summary:
`react-native run-android` will need `adb` in `$PATH` as I explained in issue #10702.
Closes https://github.com/facebook/react-native/pull/10703
Differential Revision: D4118918
fbshipit-source-id: 873e46d044b8cc7acf026aba330ad1dc4ff6f2d3
Summary:
Currently there is a typo in Accessibility.md which will result in an invalid prop type warning if directly adhered to. The instance of `no-hide-descendant` should instead be updated to `no-hide-descendants` (plural) in the documentation.
Closes https://github.com/facebook/react-native/pull/10566
Differential Revision: D4082750
Pulled By: lacker
fbshipit-source-id: 18e2d9db6004767903e9308a2c0a900d2d9055fc
Summary:
Small contribution for MacOS users:
For those users who using zsh with their Mac OS filename to place variables should be different
Closes https://github.com/facebook/react-native/pull/10432
Differential Revision: D4078102
Pulled By: lacker
fbshipit-source-id: 6cbfb81a472f37bfda85964e929c99b438348fd8
Summary:
You may want to double-check that this works perfectly (I am trying to move away from RN-from-source, since my changes were upstreamed), but it seems to build without errors for me. And this has the advantage of working seamlessly with "rnpm", which isn't smart enough to add these excludes when linking modules.
Closes https://github.com/facebook/react-native/pull/9954
Differential Revision: D4074059
fbshipit-source-id: e152945ea66605698c18c1d0d078fbf312f1658e
Summary:
Changes made in React-Native Docs
1. Removed unnecessary imports `Text, View` from `SimpleNavigationApp`
2. Took MyScene propTypes out of the class as `static propTypes = {` throws parsing error via eslint
Closes https://github.com/facebook/react-native/pull/10513
Differential Revision: D4066367
Pulled By: hramos
fbshipit-source-id: f7d0ccd5f20637a043e96e115a4c40ce6121a737
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/10484
Differential Revision: D4057708
Pulled By: javache
fbshipit-source-id: e38216092195e5a38bd3afb43c4521cc4edb66ba