Граф коммитов

333 Коммитов

Автор SHA1 Сообщение Дата
radex 80e6d672f3 UIViewController-based status bar management (#25919)
Summary:
{emoji:26a0} This is a follow up to https://github.com/facebook/react-native/issues/25425 -- which isn't merged yet… See 2a286257a6..125aedbedc for actual diff

Currently, StatusBar native module manages the status bar on iOS globally, using `UIApplication.` APIs. This is bad because:

- those APIs have been deprecated for 4 years
- Apple really, really wants you to have an explicitly defined view controller, and control the status bar there
- it [breaks external native components](https://github.com/facebook/react-native/issues/25181#issuecomment-506792819)
- it's [not compatible with iPadOS 13 multi window support](https://github.com/facebook/react-native/issues/25181#issuecomment-506690818)

for those reasons I we should transition towards view controller-based status bar management.

With that, there is a need to introduce a default React Native root view controller, so I added `RCTRootViewController`. Using it is completely opt-in and there is no breaking change here. However I believe this should be a part of the template for new RN iOS apps.

Additionally, I added `RCTRootViewControllerProtocol` with hooks needed for RCTStatusBarManager to control the status bar. This means apps that want to have total control over their view controller can still opt in to react native VC-based status bar by conforming their root view controller to this protocol.

## Changelog

[iOS] [Added] - Added `RCTRootViewController` and `RCTRootViewControllerProtocol`
[iOS] [Fixed] - `UIViewControllerBasedStatusBarAppearance=YES` no longer triggers an error as long as you use `RCTRootViewController`
[iOS] [Fixed] - Status bar style is now correctly changed in multi-window iPadOS 13 apps if you use `RCTRootViewController` and set `UIViewControllerBasedStatusBarAppearance=YES`
Pull Request resolved: https://github.com/facebook/react-native/pull/25919

Test Plan: - Open RNTester → StatusBar → and check that no features broke

Reviewed By: fkgozali

Differential Revision: D16957766

Pulled By: hramos

fbshipit-source-id: 9ae1384ee20a06933053c4404b8237810f1e7c2c
2020-03-04 14:25:12 -08:00
Pavlos Vinieratos a715decd2d Add xcscheme files back in the template (#28198)
Summary:
Adding `xcscheme` files for iOS template back in. They were removed in https://github.com/facebook/react-native/issues/26471 after https://github.com/facebook/react-native/issues/25451. We have reverted the change on `.gitignore`, as this directory is supposed to be in git, but we didn't revert the removed files. Now they are back as well.

You can also see here that the two files are still missing, they got removed on rc.0 and are still missing on rc.3.
https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.0-rc.3

## Changelog

[iOS] [Changed] - Add `xcscheme` files for iOS template back in.
Pull Request resolved: https://github.com/facebook/react-native/pull/28198

Test Plan: `init` a nre project, and check if the files are there or not. The paths are `ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp.xcscheme` and `ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp-tvOS.xcscheme`

Reviewed By: cpojer

Differential Revision: D20179447

Pulled By: TheSavior

fbshipit-source-id: b0f08c0f32d6bb7630179bc2fe46d9ac10f6c1d7
2020-02-29 01:08:27 -08:00
Jordan Brown 6ea963de6a @allow-large-files deploy 0.119 to xplat
Summary:
Used the deploy_xplat.sh script.

There were a few errors after running the script, so I reverted the changes to those files and the errors went away. This is expected because the new version does not introduce errors, so these errors were caused by the deploy script.

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D20070916

fbshipit-source-id: 56b8f56eab952010f44219ce1b5c4ec66a0b084a
2020-02-26 12:08:51 -08:00
Rachel Nabors c0d8c1db90 Updating the URLs to point at new domain name reactnative.dev
Summary:
We recently updated React Native's docs site to have its own domain reactnative.dev and needed to update the URLs in the source code

CHANGELOG:
[INTERNAL]

Reviewed By: hramos

Differential Revision: D20072842

fbshipit-source-id: 1970d9214c872a6e7abf697d99f8f5360b3b308e
2020-02-24 13:09:11 -08:00
Eloy Durán 4118d79826 Rename autolinking-ios.rb script and bring RNTester and template in line. (#28077)
Summary:
Make the script ready for picking in 0.62.0-rc.3.

* Rename the script to remove ambiguity. “autolinking” is a CLI feature where 3rd-party pods are automatically discovered: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
* Make the Flipper version of the pods configurable, as requested [here](https://github.com/facebook/react-native/pull/28044#discussion_r378662636).
* Make RNTester’s Podfile use the same form as the template–including enabling Flipper by moving the CPP define into the right place in the Xcode project and out of the Podfile.
* Get rid of Podfile.lock thrashing by making the default CDN spec source explicit.

## Changelog

[iOS] [Changed] - Disambiguate autolinking-ios.rb script from CLI’s “autolinking” feature and bring RNTester & template in line.
Pull Request resolved: https://github.com/facebook/react-native/pull/28077

Test Plan: RNTester builds, as does a new application.

Reviewed By: PeteTheHeat

Differential Revision: D19956392

Pulled By: TheSavior

fbshipit-source-id: 6c800ddb646b49fc45c088978e2794cd7b60ea48
2020-02-19 15:19:26 -08:00
Frieder Bluemle d4d8887b50 Update Gradle Wrapper to 6.2 (#28112)
Summary:
Gradle Wrapper to 6.2

https://docs.gradle.org/6.2/release-notes.html

## Changelog

[Android] [Changed] - Update Gradle Wrapper to 6.2
Pull Request resolved: https://github.com/facebook/react-native/pull/28112

Test Plan: Build project

Differential Revision: D19973068

Pulled By: mdvacca

fbshipit-source-id: ec6b72048f671af7df26570872ce5148c9e42bb3
2020-02-19 09:09:58 -08:00
Jason Safaiyeh 0e4bcaa296 Resolve localization warnings (#28046)
Summary:
Resolve Xcode localization warnings in template

## Changelog

[iOS] [Fixed] - Resolve localization warnings
Pull Request resolved: https://github.com/facebook/react-native/pull/28046

Test Plan: Create a fresh template app, localization warnings should not happen.

Differential Revision: D19873686

Pulled By: hramos

fbshipit-source-id: 5db0e7da1048899c4049fe991bc354a6798dfb06
2020-02-18 21:44:16 -08:00
Eloy Durán a1b14deb3e Add androidx.swiperefreshlayout to template build.gradle (#28071)
Summary:
Same as rickhanlonii’s 2c89e51507, but for the application template.

## Changelog

Changelog: [Android] [Fixed] Template instacrash from missing androidx dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/28071

Test Plan: Apps build with the template from v0.62.0-rc.2 don’t instacrash.

Differential Revision: D19908895

Pulled By: mdvacca

fbshipit-source-id: 63337f4c0c0ffeb3b024682744610c7915e2b742
2020-02-14 12:22:14 -08:00
Eloy Durán 619d5d60df Smoothen Flipper iOS integration (#28044)
Summary:
Addresses my feedback [here](https://github.com/facebook/react-native/issues/27565#issuecomment-580950480), [here](https://github.com/facebook/react-native/issues/27565#issuecomment-582490074), and [here](https://github.com/facebook/react-native/issues/27565#issuecomment-585456768).

## Changelog

[iOS] [Changed] - Updated Flipper iOS integration to be included by default in the `Debug` configuration
Pull Request resolved: https://github.com/facebook/react-native/pull/28044

Test Plan:
Manually tested that a new application from this template still works and that the Flipper integration works.

<img width="912" alt="Screenshot 2020-02-13 at 02 09 42" src="https://user-images.githubusercontent.com/2320/74391951-eb6fd800-4e05-11ea-9fde-7e0eb42c1ec4.png">

Differential Revision: D19871482

Pulled By: TheSavior

fbshipit-source-id: a805808fdd0c2dfdfe47dd59ffee02c81f3fdfa7
2020-02-12 18:28:34 -08:00
Chad Smith 29d3dfbd19 add Detox integrations to Android RNTester app
Summary:
This diff adds required Detox integrations to the RNTester app to be able to run Detox end-to-end tests on the Android version of the app.

* Instructions at https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md were followed.
* The `minSdkVersion` version for the app was bumped to 18, as required by Detox.
* I also added build and test configurations in `package.json`
*  The debug app is able to run some of the existing tests, but the release app instacrashes. I do not know the reason for the instacrash at this time.
* CI integrations to build and test the Android app will be added in future diffs

Changelog:
[Internal] add Detox integrations to the RNTester Android app

Reviewed By: TheSavior

Differential Revision: D19566834

fbshipit-source-id: 5dd506bbdbb426a5db18146e5dc7c450a27b1d0c
2020-02-11 10:09:18 -08:00
Pascal Hartig 4bb0b4f205 Remove `pickFirst` arguments (#27964)
Summary:
This is no longer necessary with the new Flipper release.
Pull Request resolved: https://github.com/facebook/react-native/pull/27964

Test Plan:
This was a built-time problem so the CI jobs would catch this.

## Changelog

[Android] [Removed] - pickFirst options for RNTester and template

Differential Revision: D19815829

Pulled By: passy

fbshipit-source-id: d8f66e64e7e922b8ea18ad6eeec3a1c8e6bc77fa
2020-02-10 13:39:22 -08:00
Janic Duplessis a35efb9400 Use autolink script in template on iOS (#27984)
Summary:
We use this for RN tester but it is not currently included in npm releases. It cleans up the podfile a lot and will make adding / removing pods easier in the future since it won't require users to update their project.

## Changelog

[iOS] [Added] - Use autolink script in template on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/27984

Test Plan: Not sure if there is a way to end to end test this but I've been using this autolink script in my fork for a while.

Differential Revision: D19787729

Pulled By: cpojer

fbshipit-source-id: b843ea723085830f13e8f0149833d1beb1efdfac
2020-02-07 02:51:16 -08:00
Sam Goldman cd194b8333 Deploy Flow v0.118
Summary: Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D19784573

fbshipit-source-id: ffd3a25bb947ba139ea800fd1e5d4e84a9e038cb
2020-02-06 22:09:29 -08:00
Jesse Katsumata 82165673fb chore: add eslint back to template (#27983)
Summary:
This PR is part of https://github.com/react-native-community/releases/issues/157#issuecomment-582504146
Adding eslint back to the template package.json

## Changelog

[Internal] [Fixed] - Add eslint back in template
Pull Request resolved: https://github.com/facebook/react-native/pull/27983

Test Plan:
(edited)
- npx react-native init RN062 --version 0.62.0-rc.1
- yarn add -d eslint
- add npm script for lint
- yarn lint

Differential Revision: D19784567

Pulled By: TheSavior

fbshipit-source-id: 9ce24c0b674c2b1ea9fee3ed5614e8922f992f72
2020-02-06 18:52:07 -08:00
Panagiotis Vekris 2a0c4c878e Remove types-first from flowconfig template
Summary:
Removing the experimental types-first flag from RN templates, until these are properly documented in the docs. See https://github.com/facebook/flow/issues/8279 for context.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D19728257

fbshipit-source-id: 8f7473b9c8383bd1eef76b5733ff3a26e2e554fc
2020-02-04 14:15:17 -08:00
Han Lin Yap 82e8239337 Upgrade all dependencies in package.json template (#27928)
Summary:
Upgrade all dependencies in package.json template

## Changelog

[General] [Changed] - Upgrade to latest dependencies in package.json template
Pull Request resolved: https://github.com/facebook/react-native/pull/27928

Differential Revision: D19690590

Pulled By: cpojer

fbshipit-source-id: 6bc1944ee91da9f8fe2a50470c8086c0b51e919f
2020-02-03 02:16:28 -08:00
Eloy Durán 8f93dedc6a Remove empty Swift file for Flipper (#27922)
Summary:
Related to https://github.com/facebook/react-native/issues/27426 & https://github.com/facebook/react-native/issues/27565.

The wish to not include an empty Swift file to trigger the correct Xcode settings was voiced in https://github.com/facebook/react-native/issues/27426 & https://github.com/facebook/react-native/issues/27565.

## Changelog

[iOS] [Fixed] - Remove need for Swift file in the user’s project in order to use Flipper
Pull Request resolved: https://github.com/facebook/react-native/pull/27922

Test Plan:
An application created with the template, like so:

```bash
react-native init --template=~/Code/React/react-native TestFlipper
```

…will successfully build, launch, and have Flipper connect.

Differential Revision: D19690592

Pulled By: cpojer

fbshipit-source-id: ee696e0d747d6338534b0c2d62029e64ece02cd3
2020-02-03 02:10:56 -08:00
Jason Safaiyeh 52cd9cd6fe initalizeFlipper should be set in template app by default (#27569)
Summary:
Issue: https://github.com/facebook/react-native/issues/27565

initalizeFlipper should be set in template app by default.

## Changelog

[iOS] [Changed] - Added Flipper to template app
[Android] [Changed] - Added Flipper to template app
Pull Request resolved: https://github.com/facebook/react-native/pull/27569

Test Plan:
Connect Flipper to the iOS application
Connect Flipper to the Android application

Reviewed By: passy

Differential Revision: D19344704

Pulled By: rickhanlonii

fbshipit-source-id: ca126fd2caab13751ddc2ce6d195bd0c644c704e
2020-01-30 03:09:30 -08:00
Pascal Hartig 939df8a01d Upgrade Flipper version (#27837)
Summary:
Depends on https://github.com/facebook/react-native/issues/27833.

Updates the Flipper version to the most recent release.

## Changelog

[Android] [Changed] - Upgrade Flipper version in default template
Pull Request resolved: https://github.com/facebook/react-native/pull/27837

Test Plan:
This is a bit annoying, but I can't test this against the 0.62-rc.0 version. I tried patching it by running `react-native init --version 0.62.0-rc.0  testproj`, which would fail because of a missing androidx dep. After adding `implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'` to the deps, that was fixed but now after updating, `libfbjni.so` is missing because my PR https://github.com/facebook/react-native/issues/27729 isn't part of the RN dependency yet.

Given that this mirrors the RNTester app, I'm pretty confident that the change here is otherwise correct and will work on top of master with the most recent template changes.

Differential Revision: D19619365

Pulled By: passy

fbshipit-source-id: 5723bd105ab3ab86b7f00e1a26e29e1e9dc58290
2020-01-29 06:29:48 -08:00
Frieder Bluemle 947a5593ec Update Gradle Wrapper to 6.1.1 (#27865)
Summary:
Gradle Wrapper to 6.1.1

https://docs.gradle.org/6.1.1/release-notes.html

## Changelog

[Android] [Changed] - Update Gradle Wrapper to 6.1.1
Pull Request resolved: https://github.com/facebook/react-native/pull/27865

Test Plan: Build project

Differential Revision: D19619679

Pulled By: cpojer

fbshipit-source-id: 8ee80584b59359b5b42f64c19dcdedd2a6e4eb4d
2020-01-29 04:33:04 -08:00
Mike Vitousek 7bc2b91790 Deploy Flow v0.117.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D19596867

fbshipit-source-id: 3fc2ec51672bb453cec0eb6bf3c522f23cf9cd38
2020-01-28 14:36:44 -08:00
Eloy Durán 9c3fa57337 Remove FB copyright notices from iOS template (#27725)
Summary:
Files that are to be part of the user’s project shouldn’t have FB copyright notices.

There’s [one notice left](66601e755f/template/android/app/src/debug/java/com/helloworld/ReactNativeFlipper.java (L2)) in the `android` template, which is in a file that doesn’t seem to be intended to be changed by the user and so that seems fine to me.

## Changelog

[iOS] [Removed] - Remove copyright notices from iOS application template
Pull Request resolved: https://github.com/facebook/react-native/pull/27725

Test Plan:
```bash
npx react-native init TestTemplateUpdates --template ~/Code/ReactNative/react-native
cd ios
xcodebuild -workspace TestTemplateUpdates.xcworkspace \
  -scheme TestTemplateUpdates \
  -destination 'platform=iOS Simulator,OS=latest,name=iPhone 8' build
[…]
** BUILD SUCCEEDED **
```

Differential Revision: D19343386

Pulled By: TheSavior

fbshipit-source-id: a78be5e5d2fdc2477adedb51d6bb3ff19845b75f
2020-01-22 18:08:19 -08:00
David Vacca edcbfb9821 Bump Android build-tools to 29.0.2, compileSdk to 29
Summary:
bump Android build-tools to 29.0.2, compileSdk to 29

changelog: Bump Android build-tools to 29.0.2, compileSdk to 29

Reviewed By: hramos

Differential Revision: D19182040

fbshipit-source-id: f2fc1b953a16c14e33d561078ac50b5a47eaaa13
2020-01-22 17:02:36 -08:00
Frieder Bluemle a89a553532 Update Gradle wrapper to 6.1 (#27800)
Summary:
```
Welcome to Gradle 6.1!

Here are the highlights of this release:
 - Dependency cache is relocatable
 - Configurable compilation order between Groovy, Java & Scala
 - New sample projects in Gradle's documentation

For more details see https://docs.gradle.org/6.1/release-notes.html
```

## Changelog

[Android] [Changed] - Update Gradle wrapper to 6.1
Pull Request resolved: https://github.com/facebook/react-native/pull/27800

Test Plan: Build project

Differential Revision: D19460735

Pulled By: mdvacca

fbshipit-source-id: b5e71cf97c0208947d6e524a74907b74f6a71c8d
2020-01-17 21:10:42 -08:00
Nat Mote c40988cc22 Deploy Flow v0.116 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D19416307

fbshipit-source-id: 32767f24e5bfeb1912f7dd5527eb8c4db7a08a1a
2020-01-16 14:05:49 -08:00
SAEED aa0ef15335 Applied missing changes from bumping Gradle wrapper to 6.0.1 (#27639)
Summary:
This PR is related to https://github.com/facebook/react-native/issues/27290.
I just upgraded my project's Gradle wrapper version to 6.0.1 and I realized some files have some differences with the files in react-native `template` folder. so I create this PR to apply differences.
the main difference is in the `gradlew` file. I'm not familiar with Linux shell scripts but it seems there was a syntax error in `case` items syntax. `(` should not be used in declaring case's items. it may has building error in Linux OS.

## Changelog

[Android] [Fixed] - Applied missing changes from bumping Gradle wrapper to 6.0.1
Pull Request resolved: https://github.com/facebook/react-native/pull/27639

Test Plan: I have no Linux OS right now, so I can't directly test these changes, but because the changes have made by running `gradlew wrapper` command, it should not break CI. (I hope :) )

Differential Revision: D19341671

Pulled By: cpojer

fbshipit-source-id: ccfc3c12af3f5468671737e5ba0b1674b4491590
2020-01-13 12:54:08 -08:00
Dan Abramov 159624d901 React Native sync for revisions 6cff70a...19f6fe1
Summary:
This sync includes the following changes:
- **[19f6fe170](https://github.com/facebook/react/commit/19f6fe170 )**: Revert "Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232)" (#17799) //<Eli White>//
- **[6250462be](https://github.com/facebook/react/commit/6250462be )**: Renamed "ReactDOM-fb" imports to "ReactDOM" in www shims (#17797) //<Brian Vaughn>//
- **[59f21f1b2](https://github.com/facebook/react/commit/59f21f1b2 )**: HostText needs to copy over from current if it is unchanged in persistent  mode (#17538) //<Sebastian Markbåge>//
- **[ccc6100d7](https://github.com/facebook/react/commit/ccc6100d7 )**: Fix comments typos (#17550) //<Nick S. Plekhanov>//
- **[1b9328cd9](https://github.com/facebook/react/commit/1b9328cd9 )**: Null stateNode after unmount (#17666) //<Brian Vaughn>//
- **[897976600](https://github.com/facebook/react/commit/897976600 )**: [ESLint] Allow partial matches for custom Effect Hooks (#17663) //<Dan Abramov>//
- **[72592310a](https://github.com/facebook/react/commit/72592310a )**: Create packages/dom-event-testing-library (#17660) //<Nicolas Gallagher>//
- **[a5e951d4c](https://github.com/facebook/react/commit/a5e951d4c )**: [react-interactions] Event testing library improvements (#17614) //<Nicolas Gallagher>//
- **[7dc974542](https://github.com/facebook/react/commit/7dc974542 )**: [Flight] Chunks API (#17398) //<Sebastian Markbåge>//
- **[9354dd275](https://github.com/facebook/react/commit/9354dd275 )**: Make HostComponent inexact (#17412) //<Eli White>//
- **[4c270375e](https://github.com/facebook/react/commit/4c270375e )**: Favor fallthrough switch instead of case statements for work tags (#17648) //<Sebastian Markbåge>//
- **[6fef7c47a](https://github.com/facebook/react/commit/6fef7c47a )**: Add a regression test for switching from Fragment to a component (#17647) //<Dan Abramov>//
- **[9fe103124](https://github.com/facebook/react/commit/9fe103124 )**: [react-interactions] Rename Flare APIs to deprecated and remove from RN (#17644) //<Dominic Gannaway>//
- **[4b0cdf29a](https://github.com/facebook/react/commit/4b0cdf29a )**: Build FB RN targets only in experimental mode (#17641) //<Dan Abramov>//
- **[7309c5f93](https://github.com/facebook/react/commit/7309c5f93 )**: Use zero-fill right shift instead of Math.floor (#17616) //<伊撒尔>//
- **[3c54df091](https://github.com/facebook/react/commit/3c54df091 )**: Fix missing stacks in WWW warnings (#17638) //<Dan Abramov>//
- **[b66e86d95](https://github.com/facebook/react/commit/b66e86d95 )**: react-refresh@0.7.1 //<Dan Abramov>//
- **[c2d1561c6](https://github.com/facebook/react/commit/c2d1561c6 )**: [Fast Refresh] Support injecting runtime after renderer executes (#17633) //<Dan Abramov>//
- **[f42431abe](https://github.com/facebook/react/commit/f42431abe )**: Revert "Remove renderPhaseUpdates Map (#17484)" (#17623) //<Dan Abramov>//
- **[0b5a26a48](https://github.com/facebook/react/commit/0b5a26a48 )**: Rename toWarnDev -> toErrorDev, toLowPriorityWarnDev -> toWarnDev (#17605) //<Dan Abramov>//
- **[0cf22a56a](https://github.com/facebook/react/commit/0cf22a56a )**: Use console directly instead of warning() modules (#17599) //<Dan Abramov>//
- **[b6c423daa](https://github.com/facebook/react/commit/b6c423daa )**: Use matching test command for equivalence tests (#17604) //<Dan Abramov>//
- **[8a347ed02](https://github.com/facebook/react/commit/8a347ed02 )**: Remove renderPhaseUpdates Map (#17484) //<Sebastian Markbåge>//
- **[be603f5a5](https://github.com/facebook/react/commit/be603f5a5 )**: [react-events] Remove lastNativeEvent in favor of SystemFlags (#17585) //<Dominic Gannaway>//
- **[b15bf3675](https://github.com/facebook/react/commit/b15bf3675 )**: Add component stacks to (almost) all warnings (#17586) //<Dan Abramov>//
- **[2afeebdcc](https://github.com/facebook/react/commit/2afeebdcc )**: [react-interactions] Remove responder root event types + revert commit phase change (#17577) //<Dominic Gannaway>//
- **[9ac42dd07](https://github.com/facebook/react/commit/9ac42dd07 )**: Remove the condition argument from warning() (#17568) //<Laura buns>//
- **[7bf40e1cf](https://github.com/facebook/react/commit/7bf40e1cf )**: Initialize update queue object on mount (#17560) //<Andrew Clark>//
- **[e039e690b](https://github.com/facebook/react/commit/e039e690b )**: Revert Update Queue Refactor //<Andrew Clark>//
- **[b617db3d9](https://github.com/facebook/react/commit/b617db3d9 )**: Refactor Update Queues to Fix Rebasing Bug //<Andrew Clark>//
- **[b43eec7ea](https://github.com/facebook/react/commit/b43eec7ea )**: Replace `wrap-warning-with-env-check` with an eslint plugin (#17540) //<Laura buns>//
- **[acfe4b21b](https://github.com/facebook/react/commit/acfe4b21b )**: [react-interactions] Upgrade passive event listeners to active listeners (#17513) //<Dominic Gannaway>//
- **[5064c7f6a](https://github.com/facebook/react/commit/5064c7f6a )**: Revert Rerender Error Check (#17519) //<Sebastian Markbåge>//
- **[6d105ad3f](https://github.com/facebook/react/commit/6d105ad3f )**: [react-interactions] Move Flare event registration to commit phase (#17518) //<Dominic Gannaway>//
- **[dc18b8b8d](https://github.com/facebook/react/commit/dc18b8b8d )**: Don't group Idle/Offscreen work with other work (#17456) //<Sebastian Markbåge>//
- **[f523b2e0d](https://github.com/facebook/react/commit/f523b2e0d )**: Use fewer global variables in Hooks (#17480) //<Sebastian Markbåge>//
- **[d75323f65](https://github.com/facebook/react/commit/d75323f65 )**: Remove case that only exists for createBatch (#17506) //<Sebastian Markbåge>//
- **[79572e34d](https://github.com/facebook/react/commit/79572e34d )**: Adjust SuspenseList CPU bound heuristic (#17455) //<Sebastian Markbåge>//
- **[969f4b5bb](https://github.com/facebook/react/commit/969f4b5bb )**: Change DevTools hook warning message (#17478) //<Dan Abramov>//
- **[6470e0f16](https://github.com/facebook/react/commit/6470e0f16 )**: [Fresh] Make all errors recoverable (#17438) //<Dan Abramov>//

Changelog:
[General][Changed] - React sync for revisions 6cff70a...19f6fe1

Reviewed By: TheSavior

Differential Revision: D19318286

fbshipit-source-id: acaa5224f7162a274c395a62e54da82199001005
2020-01-09 11:18:06 -08:00
Panagiotis Vekris 15ce226f5f v0.115 in xplat/js
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/Updating_Internal_Repositories/#update-xplat-js

reverted manually:
```
RKJSModules/Apps/Jobs/top_level_components/JobsCandidateDetailView.js
RKJSModules/Apps/MobileHome/ui/sevs/v2/MobileHomeSevsDetailsEscalationLogRow.js
RKJSModules/Apps/MobileHome/ui/sevs/v2/MobileHomeSevsDetailsHeaderMetadata.js
RKJSModules/Apps/MobileHome/ui/user/MobileHomeUserDetails.js
RKJSModules/Apps/Profile/ProfileEdit/apps/ProfileEditCollegeApp.js
RKJSModules/Apps/Profile/ProfileEdit/apps/ProfileEditWorkApp.js
metro/packages/metro/src/cli.js
RKJSModules/Apps/AdsLWI/Surfaces/AdsLWICallToActionEditorSurface.js
react-native-github/jest/preprocessor.js
```

Changelog: [Internal]

allow-large-files

Reviewed By: jbrown215

Differential Revision: D19292958

fbshipit-source-id: 4aa969bf2d0f2f5857e68a7e31ff4dcaf29e67cd
2020-01-06 18:06:26 -08:00
Kevin Gozali 829a2237d2 iOS/tvOS 9.0 ==> 10.0 in .xcodeproj
Summary:
Updated leftover configs to require iOS/tvOS 10.0+.

Changelog: [iOS] [Deprecated] - Deprecated iOS/tvOS 9.x support

Reviewed By: mmmulani

Differential Revision: D19269953

fbshipit-source-id: e4a60b744c1424094922bd47bcccc93a165c3d9b
2020-01-03 10:42:25 -08:00
Kevin Gozali 674b591809 iOS: Deprecate iOS 9 / tvOS 9 SDK support
Summary:
It is time to target SDK version 10.0+.

Changelog: [iOS] [Deprecated] - Deprecating support for iOS/tvOS SDK 9.x, 10.0+ is now required

Reviewed By: mdvacca

Differential Revision: D19265731

fbshipit-source-id: 93b6f9e8f61c5b36ff69e80d3f18256aa96cc2c0
2020-01-02 12:52:12 -08:00
George Zahariev 87370c4c05 Remove use of inexact-spread Flow lint
Summary:
After changes to the semantics of spread, this lint is no longer relevant and will be removed in an upcoming version of Flow.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D19241147

fbshipit-source-id: 2cad93725055601f2ceaa2379ed3643f136ff69b
2020-01-02 10:56:36 -08:00
Max Thirouin 98ebc1ea25 Adjust HelloWorld-tvOSTests/Info.plist `CFBundleIdentifier` to use PR ODUCT_BUNDLE_IDENTIFIER (#27601)
Summary:
In other part of the hello world, this replacement has been made already. The only place left this way (which make sense) is in `HelloWorld.xcodeproj/project.pbxproj`.

## Changelog

[General] [Fixed] - Adjust HelloWorld-tvOSTests/Info.plist `CFBundleIdentifier` to use PRODUCT_BUNDLE_IDENTIFIER
Pull Request resolved: https://github.com/facebook/react-native/pull/27601

Test Plan: I made this change locally on a project. No big deal as this is a test piece, not going to go on any kind of real world environment.

Differential Revision: D19235760

Pulled By: cpojer

fbshipit-source-id: 95b9936acc1eaddf3f5a86c733f46c5a80ac6423
2019-12-26 23:00:10 -08:00
Pavlos Vinieratos 7980615d37 remove `xcshareddata` from gitignore (#27563)
Summary:
Files that are inside `xcshareddata` are meant to be "shared", and that means committed to git. These files are for example `ios/RnDiffApp.xcodeproj/xcshareddata/xcschemes/RnDiffApp.xcscheme`, and if ignored that means they are removed from the repo or are missing when cloning. These should be present. They are the shared schemes so Xcode knows what and how to build, on everyone's machine.

I noticed it being there in a new project on 0.62.0-rc.0.

## Changelog

[iOS] [Changed] - Remove the xcshareddata from .gitignore
Pull Request resolved: https://github.com/facebook/react-native/pull/27563

Differential Revision: D19166364

Pulled By: TheSavior

fbshipit-source-id: 0377dc5b08ba04d121f9ed5e4027942a7a9f463f
2019-12-18 14:17:20 -08:00
Pascal Hartig 68bf0e32e7 Fix RNTester integration with Flipper (#27482)
Summary:
There was a reflective call to a non-existent class. It did, however,
exist in the template, so I copied it over from there and updated
the references accordingly.
Pull Request resolved: https://github.com/facebook/react-native/pull/27482

Test Plan:
Built it and ran it. Works again with the latest Flipper desktop app.

![Screenshot 2019-12-11 16 02 40](https://user-images.githubusercontent.com/9906/70637975-02405580-1c30-11ea-9fec-23860c59cdb6.png)

Reviewed By: rickhanlonii

Differential Revision: D18933530

Pulled By: passy

fbshipit-source-id: 4515d7baaad9a9fff9a4b66e1cbf8a75889e6e45
2019-12-16 03:14:49 -08:00
Marshall Roch aa78457343 v0.114.0
Summary: Changelog: [General] [Changed] Upgraded to Flow v0.114.0

Reviewed By: dsainati1

Differential Revision: D19042657

fbshipit-source-id: 04840f769207442be45e82cda39a7611784a6ce2
2019-12-13 16:28:39 -08:00
brotsky f11b4895d6 Edits to flipper pods comments (#27485)
Summary:
grammar edits

## Changelog

[Internal] [Fixed] - Edits to flipper pods comments
Pull Request resolved: https://github.com/facebook/react-native/pull/27485

Differential Revision: D18962196

Pulled By: hramos

fbshipit-source-id: d8eb8b852130b9ceee8ab9b668f94d9d4d11a217
2019-12-12 14:56:11 -08:00
SAEED e1e081b00e Update Android Gradle plugin to 3.5.3 (#27462)
Summary:
Android Studio 3.5.3 is now available in the stable channel

https://androidstudio.googleblog.com/2019/12/android-studio-353-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.3
Pull Request resolved: https://github.com/facebook/react-native/pull/27462

Test Plan: Build project

Differential Revision: D18936678

Pulled By: mdvacca

fbshipit-source-id: 6001a3b23561f249d4690f0f4e41d397e69c7b70
2019-12-11 11:27:04 -08:00
Nicolas Charpentier 898b1db6d0 Fix Flipper integration on iOS and update it (#27426)
Summary:
The integration of Flipper on iOS was crashing the template, and `test_ios_e2e` were failing because of it.

Flipper integration must be wrapped inside `FB_SONARKIT_ENABLED`.

Flipper's issues with Yoga and YogaKit were solved in Flipper 0.28.0, so let's update our integration to it, and we'll need to use Swift.

We will be able to ship this in 0.62 (cc grabbou, axe-fb, priteshrnandgaonkar), and it should fix `test_ios_e2e` (cc hramos) � .
## Changelog

[iOS] [Fixed] - Fix Flipper integration on and update Flipper to 0.30.0
Pull Request resolved: https://github.com/facebook/react-native/pull/27426

Test Plan:
- Initialized an app with my branch as source.
- Added `[AppDelegate initializeFlipper:application];` to `didFinishLaunchingWithOptions`.
- Launched Flipper.
- Ran the app (debug).

![image](https://user-images.githubusercontent.com/7189823/70277734-ef85d680-1780-11ea-876c-1c08e6ed5804.png)

- Ran the app (release).
- Everything succeeds, no Flipper connection available in release.

Reviewed By: hramos

Differential Revision: D18841468

Pulled By: axe-fb

fbshipit-source-id: 73bb4810d1fbb6a96102848f8700ebb7c23a615b
2019-12-06 11:10:24 -08:00
Eli White e362470305 Convert easy files to flow strict-local
Summary:
This diff was generated by this script used by WWW
https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/scripts/flow/upgrade_to_flow_strict_local.sh?lines=0

Changelog:
[Internal] Upgrade flow to flow strict-local

Reviewed By: zackargyle, rickhanlonii

Differential Revision: D18833630

fbshipit-source-id: e64d4e9a49a0db5e6bf70a0c489567862b578d7f
2019-12-05 16:06:46 -08:00
Dulmandakh 2fd50882b5 fix build failure due to duplicate libc++_shared.so (#27417)
Summary:
This PR fixes build failure caused by duplicate libc++_shared.so, because dependencies (like Flipper) might include one in addition to RN.

## Changelog

[Android] [Changed] - fix build failure due to duplicate libc++_shared.so
Pull Request resolved: https://github.com/facebook/react-native/pull/27417

Test Plan: Create a project from master, then build and run. Build will fail without the patch, and succeed with the patch.

Differential Revision: D18827583

Pulled By: mdvacca

fbshipit-source-id: 1272cedd299278403f87215c36aaf58217eae3c5
2019-12-04 23:25:47 -08:00
George Zahariev 15e2dcfff9 Release 0.113 to xplat
Summary:
Release 0.113 to xplat

Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D18790262

fbshipit-source-id: ac3ad40c24010aab1c0d43947843dd581a17d3cf
2019-12-04 09:17:34 -08:00
Dulmandakh 7a42596438 MainActivity launchMode is singleTask (#27373)
Summary:
Most RN apps have single activity, and developers expect to resume application from background when app icon pressed. But Android default configuration creates a new activity instance, which confuses developers, see https://github.com/facebook/react-native/issues/27370 and https://github.com/facebook/react-native/issues/27368.

This PR changes template manifest so that when app icon pressed, background app will resume instead of creating a new activity, therefore match developers expectations. Also it's required to make Linking work.

## Changelog

[Android] [Changed] - MainActivity launchMode is singleTask
Pull Request resolved: https://github.com/facebook/react-native/pull/27373

Test Plan: RNTester will resume background app, instead of creating a new instance when app icon pressed

Differential Revision: D18766373

Pulled By: mdvacca

fbshipit-source-id: 697e9c5bf92ec958de265b060dffb50f7b74d157
2019-12-02 11:39:55 -08:00
Dulmandakh 701e66bde4 bump gradle to 6.0.1 (#27290)
Summary:
Bump Gradle to 6.0.1, which has Java 13 support and many improvements. But also it'll help us to clean up deprecation warnings.

## Changelog

[Android] [Changed] - bump Gradle to 6.0.1
Pull Request resolved: https://github.com/facebook/react-native/pull/27290

Test Plan: RNTester app builds and runs as expected

Differential Revision: D18646942

Pulled By: mdvacca

fbshipit-source-id: 3ade353446cee315447b80011d05065ad6557d2d
2019-11-21 15:25:50 -08:00
Dan Abramov 1edce56a9d React Native sync for revisions 4eeee35...6cff70a
Summary:
Changelog: [General][Changed] - React sync for revisions 0b61e2698...6cff70a74 (Includes React 16.11.0)

This sync includes the following changes:
- **[6cff70a74](https://github.com/facebook/react/commit/6cff70a74 )**: [react-interactions]
Expost host instance to Scope Query function (#17341) //<Dominic Gannaway>//
- **[b8f825877](https://github.com/facebook/react/commit/b8f825877 )**: Split ReactDOM entry
point (#17331) //<Dan Abramov>//
- **[a7b4d51a2](https://github.com/facebook/react/commit/a7b4d51a2 )**: Warn when doing creat
eRoot twice on the same node (another approach) (#17329) //<Dan Abramov>//
- **[be3bfa6fa](https://github.com/facebook/react/commit/be3bfa6fa )**: [Flight] Basic Integr
ation Test (#17307) //<Dan Abramov>//
- **[6cb6b1d66](https://github.com/facebook/react/commit/6cb6b1d66 )**: Add yarn build --unsa
fe-partial (#17316) //<Dan Abramov>//
- **[38dd17ab9](https://github.com/facebook/react/commit/38dd17ab9 )**: [RN] Hoist static dee
pDiffer options object (#17303) //<Moti Zilberman>//
- **[61d3dd0e0](https://github.com/facebook/react/commit/61d3dd0e0 )**: Update deepDiffer usa
ge in React Native renderer (#17282) //<Moti Zilberman>//
- **[e701632ad](https://github.com/facebook/react/commit/e701632ad )**: [react-interactions] Change unmount blur logic to a dedicated event (#17291) //<Dominic Gannaway>//
- **[ce4b3e998](https://github.com/facebook/react/commit/ce4b3e998 )**: [react-interactions] Add optional searchNodes to Scope.queryAllNodes (#17293) //<Dominic Gannaway>//
- **[dee03049f](https://github.com/facebook/react/commit/dee03049f )**: [Flight] Basic Streaming Suspense Support (#17285) //<Sebastian Markbåge>//
- **[f50f39b55](https://github.com/facebook/react/commit/f50f39b55 )**: [Flight] Better compat with http.createServer (#17289) //<Dan Abramov>//
- **[345270630](https://github.com/facebook/react/commit/345270630 )**: DevTools cleanup (#17283) //<Brian Vaughn>//
- **[cd1bdcd06](https://github.com/facebook/react/commit/cd1bdcd06 )**: [react-interactions] Prevent duplicate onPress firing for keyboard Enter (#17266) //<Dominic Gannaway>//
- **[4f02c93c7](https://github.com/facebook/react/commit/4f02c93c7 )**: Fix devtools displaying Anonymous for memo of ref-forwarding components (#17274) //<Waseem Dahman>//
- **[053cf0fed](https://github.com/facebook/react/commit/053cf0fed )**: Fix react-is memo and lazy type checks (#17278) //<Brian Vaughn>//
- **[0f3838a01](https://github.com/facebook/react/commit/0f3838a01 )**: Remove `debugRenderPhaseSideEffects` flag (#17270) //<Andrew Clark>//
- **[cb09dbe0a](https://github.com/facebook/react/commit/cb09dbe0a )**: [react-interactions] Add handleSimulateChildBlur upon DOM node removal (#17225) //<Dominic Gannaway>//
- **[6095993d4](https://github.com/facebook/react/commit/6095993d4 )**: Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> (#17265) //<Eli White>//
- **[62ef25077](https://github.com/facebook/react/commit/62ef25077 )**: Avoid bundling in ponyfill for Object.assign in use-subscription package (#17259) //<Mateusz Burzyński>//
- **[f4148b256](https://github.com/facebook/react/commit/f4148b256 )**: [Flight] Move around the Server side a bit (#17251) //<Sebastian Markbåge>//
- **[fadc97167](https://github.com/facebook/react/commit/fadc97167 )**: [Flight] Add Client Infrastructure (#17234) //<Sebastian Markbåge>//
- **[36fd29f09](https://github.com/facebook/react/commit/36fd29f09 )**: Don't show empty (no work) commits in Profiler (#17253) //<Brian Vaughn>//
- **[a2e05b6c1](https://github.com/facebook/react/commit/a2e05b6c1 )**: [Scheduler] Delete old rAF implementation (#17252) //<Andrew Clark>//
- **[6dc2734b4](https://github.com/facebook/react/commit/6dc2734b4 )**: Codemod tests to `it.experimental` (#17243) //<Andrew Clark>//
- **[273679a78](https://github.com/facebook/react/commit/273679a78 )**: DevTools standalone shell changes: (#17213) //<Brian Vaughn>//
- **[d0fc0ba0a](https://github.com/facebook/react/commit/d0fc0ba0a )**: Revert "Dispatch commands to both UIManagers from both renderers (#17211)" (#17232) //<Eli White>//
- **[bdcdb69a2](https://github.com/facebook/react/commit/bdcdb69a2 )**: Rename findHostInstance_deprecated to findHostInstance_DEPRECATED (#17228) //<Eli White>//
- **[515746c21](https://github.com/facebook/react/commit/515746c21 )**: Add findHostInstance_deprecated to the React Native Renderer (#17224) //<Eli White>//
- **[9a35adc96](https://github.com/facebook/react/commit/9a35adc96 )**: Only call Profiler onRender when a descendant had work (#17223) //<Brian Vaughn>//
- **[8eee0eb01](https://github.com/facebook/react/commit/8eee0eb01 )**: Dispatch commands to both UIManagers from both renderers (#17211) //<Eli White>//
- **[f4e974d26](https://github.com/facebook/react/commit/f4e974d26 )**: Add Experimental Flight Infrastructure (#16398) //<Sebastian Markbåge>//
- **[6cd365cac](https://github.com/facebook/react/commit/6cd365cac )**: Don't treat the last row in hidden as deleted if already mounted (#17206) //<Sebastian Markbåge>//
- **[048879eda](https://github.com/facebook/react/commit/048879eda )**: [react-interactions] Ensure props on scope query function is always object (#17212) //<Dominic Gannaway>//
- **[3497ccc14](https://github.com/facebook/react/commit/3497ccc14 )**: Add guard to handle modified React elements with non-string keys (#17164) //<Brian Vaughn>//
- **[3f9c03675](https://github.com/facebook/react/commit/3f9c03675 )**: Typo fix in comment (#17111) //<Deniz Susman>//
- **[f6b8d31a7](https://github.com/facebook/react/commit/f6b8d31a7 )**: Rename createSyncRoot to createBlockingRoot (#17165) //<Dan Abramov>//
- **[9c02d2654](https://github.com/facebook/react/commit/9c02d2654 )**: docs: Fixed a typo in readme.md (#17119) //<Wilco Fiers>//
- **[8075c8505](https://github.com/facebook/react/commit/8075c8505 )**: Update local package versions for 16.10 release //<Andrew Clark>//
- **[5faf377df](https://github.com/facebook/react/commit/5faf377df )**: Fixed a style bug in props editor (#17162) //<Brian Vaughn>//
- **[f7ec65eeb](https://github.com/facebook/react/commit/f7ec65eeb )**: [react-interactions] Make events non-passive to allow preventDefault (#17136) //<Dominic Gannaway>//
- **[1022ee0ec](https://github.com/facebook/react/commit/1022ee0ec )**: Read current time without marking event start time (#17160) //<Andrew Clark>//
- **[349cf5acc](https://github.com/facebook/react/commit/349cf5acc )**: Experimental test helper: `it.experimental` (#17149) //<Andrew Clark>//
- **[edc234c73](https://github.com/facebook/react/commit/edc234c73 )**: Build script should default to experimental (#17144) //<Andrew Clark>//
- **[3cc564547](https://github.com/facebook/react/commit/3cc564547 )**: SuspenseList support in DevTools (#17145) //<Sebastian Markbåge>//
- **[68fb58029](https://github.com/facebook/react/commit/68fb58029 )**: Remove unstable_ prefix in various internal uses (#17146) //<Sebastian Markbåge>//
- **[7082d5a2d](https://github.com/facebook/react/commit/7082d5a2d )**: Don't build non-experimental www bundles (#17139) //<Andrew Clark>//
- **[c47f59331](https://github.com/facebook/react/commit/c47f59331 )**: Move SuspenseList to experimental package (#17130) //<Andrew Clark>//
- **[685ed561f](https://github.com/facebook/react/commit/685ed561f )**: Migrate useDeferredValue and useTransition (#17058) //<Luna Ruan>//
- **[0b61e2698](https://github.com/facebook/react/commit/0b61e2698 )**: Update RN typings for a shim (#17138) //<Dan Abramov>//

Reviewed By: threepointone

Differential Revision: D18428149

fbshipit-source-id: 28273be4d7a4c7ec0fe0451cea134ee09a3b4d86
2019-11-19 08:52:37 -08:00
Daniel Sainati 0f8ad31745 @allow-large-files deploy Flow v0.112 to xplat
Summary: Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D18466454

fbshipit-source-id: 83c76ba06822a378cb0a8ea72cd0fb9d19f81a4b
2019-11-13 11:18:41 -08:00
Jordan Brown 9d0707c409 deploy v0.111 to xplat
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D18342672

fbshipit-source-id: ae6933344e4545ae8f650a4d14cfe55c34f43ad9
2019-11-06 10:02:29 -08:00
Frieder Bluemle b41b5ce8ae Update Android Gradle plugin to 3.5.2 (#27125)
Summary:
Android Studio 3.5.2 is now available in the stable channel

https://androidstudio.googleblog.com/2019/11/android-studio-352-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.2
Pull Request resolved: https://github.com/facebook/react-native/pull/27125

Test Plan: Build project

Differential Revision: D18346480

Pulled By: cpojer

fbshipit-source-id: 92121406e91dc66146a1ff2125942355d188e6e4
2019-11-06 02:26:55 -08:00
Frieder Bluemle 928f4434b9 Update Gradle wrapper to 5.6.4 (#27092)
Summary:
Gradle wrapper `5.6.4`

See [release notes](https://docs.gradle.org/5.6.4/release-notes.html) for list of fixes/improvements.

## Changelog

[Android] [Changed] - Gradle wrapper 5.6.4
Pull Request resolved: https://github.com/facebook/react-native/pull/27092

Test Plan: Builds successfully.

Differential Revision: D18323675

Pulled By: cpojer

fbshipit-source-id: c96fddbfba4b3598ea88997ac66349c83c6ceca7
2019-11-05 02:59:49 -08:00
Andrew Bastin 018b7485eb Updated Jitpack URL in android template to fix gradle errors (#26660)
Summary:
Running `react-native run-android` fails for me with the error saying connection timed out for fetching a library from jitpack. This seems to be a well known issue mentioned around. The issue is resolved by updating the url from `https://jitpack.io` to `https://www.jitpack.io` .

## Changelog

[Android] [Fixed] - Updated template/android/build.gradle with a modified jitpack URL
Pull Request resolved: https://github.com/facebook/react-native/pull/26660

Test Plan:
1. Create a new react-native app with `react-native init <app-name>`
2. Run `react-native run-android`
3. App runs without modifications!

Differential Revision: D18189653

Pulled By: cpojer

fbshipit-source-id: 3c73bb9b7108755bd82444149c997a927965f3e9
2019-10-28 16:10:55 -07:00
Panagiotis Vekris d9b84450a1 Turn on types-first on xplat/js
Summary: Changelog: [Internal]

Differential Revision: D18088767

fbshipit-source-id: edf6e4537e8c398207a25aae2733fb1a9bf79d16
2019-10-23 16:02:22 -07:00
Sam Goldman def3ebe3fd @allow-large-files Deploy Flow v0.110.0
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D18054545

fbshipit-source-id: 80d88a8004cb3172e4079ff10a4c11741adf2a6f
2019-10-21 22:30:39 -07:00
Frieder Bluemle ff6b2ff325 Update Gradle wrapper to 5.6.3 (#26915)
Summary:
Gradle wrapper `5.6.3`

## Changelog

[Android] [Changed] - Gradle wrapper 5.6.3
Pull Request resolved: https://github.com/facebook/react-native/pull/26915

Test Plan: Builds successfully.

Differential Revision: D18045686

Pulled By: mdvacca

fbshipit-source-id: b2cbe91c42c61aa340c1169d2555c9d821fcf11f
2019-10-21 13:30:52 -07:00
Maksym Rusynyk a0d8740878 Android template: Allow overriding default "index.js" entry file (#26769)
Summary:
- Using "System.getenv" allows to specify any entry file using environment variables and without modifying gradle file. Example:

    export ENTRY_FILE="another_entry_file.js"
    ./gradlew assembleDebug

- This functionality is also more align with iOS implementation that uses 'if [[ "$ENTRY_FILE" ]]; then'. See https://github.com/facebook/react-native/pull/23667 for more details.

- Possibility to define entry file on CI without modifying sources (Example: project like [pixels-catcher](https://www.npmjs.com/package/pixels-catcher) requires different entry file)

## Changelog:

[Android] [Added]  - Custom entry file on android using `ENTRY_FILE` environment variable
Pull Request resolved: https://github.com/facebook/react-native/pull/26769

Test Plan:
- Create a project from template

- Define `ENTRY_FILE` environment variable

```
export ENTRY_FILE="anotherIndexFile.js"
```

- Build android

```
./gradlew assembleDebug
```

Expected result: App contains bundle file that starts from `anotherIndexFile.js` file.

Differential Revision: D17903165

Pulled By: cpojer

fbshipit-source-id: 6b7cdf229918d101c170aa5fbdca6f3ef293d41c
2019-10-13 23:41:15 -07:00
Daniel Sainati b786cd6d69 v0.109.0 in xplat
Summary:
flowboi

allow-large-files

Reviewed By: gabelevi

Differential Revision: D17729593

fbshipit-source-id: 20575b072540497b64fbe63a92d4827eaab78fc4
2019-10-04 16:42:08 -07:00
Frieder Bluemle 6aae8e0756 Update Android Gradle plugin to 3.5.1 (#26694)
Summary:
Android Studio 3.5.1 is now available in the stable channel

https://androidstudio.googleblog.com/2019/10/android-studio-351-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.1
Pull Request resolved: https://github.com/facebook/react-native/pull/26694

Test Plan: Build project

Differential Revision: D17729849

Pulled By: cpojer

fbshipit-source-id: 0a0ba7a38ff5be096b56a6470c3ea4912a053d94
2019-10-02 17:44:29 -07:00
Frieder Bluemle d98ff02433 Fix template whitespace error (#26631)
Summary:
Very small update here. 0fcaca8e26 accidentally introduced a whitespace error (trailing whitespace) in an iOS test file - This whitespace error is now propagated into all new projects generated by `react-native init`. This fixes it.

## Changelog

[iOS] [Fixed] - Template whitespace error
Pull Request resolved: https://github.com/facebook/react-native/pull/26631

Test Plan: N/A

Differential Revision: D17661040

Pulled By: cpojer

fbshipit-source-id: 1858d2fe238d139894738187ec73f1e27e306294
2019-09-29 18:03:35 -07:00
Han Lin Yap babf67f11c Upgrade all dependencies in package.json template (#26563)
Summary:
Upgrade all dependencies in package.json template

## Changelog

[General] [Changed] - Upgrade to latest dependencies in package.json template
Pull Request resolved: https://github.com/facebook/react-native/pull/26563

Differential Revision: D17589559

Pulled By: cpojer

fbshipit-source-id: edbc9da11a850e01d00e77d9e689d9278a05f6fd
2019-09-25 22:03:45 -07:00
Mats Byrkjeland 46090b0e56 Make RelativeImageStub regex match images in scoped packages (#26567)
Summary:
I am importing an image from a scoped package and I expected this to be recognized by the `module.name_mapper` and treated as a `RelativeImageStub`. But since there's an `@` in the path, the string does not match the regex pattern as it is defined today. Therefore I added the possibility of a `@` in the start of the path to the regex pattern.

Example import not recognized by the name_mapper today:
```
import NicePicture from 'example-pkg/assets/nice-picture.png'
```

## Changelog

[General] [Fixed] - Make RelativeImageStub regex match images in scoped packages
Pull Request resolved: https://github.com/facebook/react-native/pull/26567

Test Plan:
* I have run `yarn flow` in the `react-native` project
* I tested that it resolves my issue with images in scoped packages in my own app's repo

Differential Revision: D17589473

Pulled By: cpojer

fbshipit-source-id: d0c18f2b36456fd974012a0605f3d9ceff0ad744
2019-09-25 18:27:27 -07:00
Mike Vitousek d34bc5fa64 Upgrade to Flow v0.108.0
Reviewed By: gabelevi

Differential Revision: D17488182

fbshipit-source-id: e67c5bcbd9f0bda49d52531387d92d7c83a01f21
2019-09-20 13:37:25 -07:00
Ramanpreet Nara 4c998fd05d Rename JSCallInvoker{,Holder} to CallInvoker{,Holder}
Summary:
## Motivation
The concept behind JSCallInvoker doesn't necessarily have to apply only to the JS thread. On Android, we need to re-use this abstraction to allow execution of async method calls on the NativeModules thread.

Reviewed By: PeteTheHeat

Differential Revision: D17377313

fbshipit-source-id: 3d9075cbfce0b908d800a366947cfd16a3013d1c
2019-09-20 10:52:56 -07:00
Frieder Bluemle 3e4c5c09c3 Remove ignored iOS schemes from template (#26471)
Summary:
The merge of https://github.com/facebook/react-native/issues/25451 added `xcshareddata` to the .gitignore file in `template`. Two xcscheme files in the `xcschemes` subfolder were still left in the template and should have been removed at the same time.

The project opens and builds fine without the xcscheme files both from command line and in Xcode.

## Changelog

[iOS] [Changed] - Remove ignored iOS schemes from template
Pull Request resolved: https://github.com/facebook/react-native/pull/26471

Test Plan:
Generate new project, remove files, verify that project builds, and opens correctly in Xcode.

Please review karanjthakkar satya164 kelset

Differential Revision: D17491748

Pulled By: cpojer

fbshipit-source-id: 391545293c2d09d52f78f56cd91cef5dcf036a9a
2019-09-19 17:26:24 -07:00
sunnylqm 811401bcac Bump hermes to v0.2.1 (#26451)
Summary:
Bump hermes to v0.2.1

allow-large-files

## Changelog

See https://github.com/facebook/hermes/releases/tag/v0.2.1

[Android] [Changed] - Bump hermes to v0.2.1
Pull Request resolved: https://github.com/facebook/react-native/pull/26451

Test Plan: RNTester builds and runs as expected

Differential Revision: D17394921

Pulled By: cpojer

fbshipit-source-id: 07ce5da3517b7aa24bfb5e1f6eefed6cdc9f5cb5
2019-09-18 04:40:38 -07:00
Kacper Wiszczuk 83a16b16c9 fix: prevent activity recreation on theme change (#26413)
Summary:
On Android 10 whole activity is recreated when the user changes system theme. We should prevent it by adding `uiMode` in `android:configChanges` key in the default template.

## Changelog

[Android] [Fixed] - Android 10: Prevent activity recreation on theme change
Pull Request resolved: https://github.com/facebook/react-native/pull/26413

Test Plan: NOOP

Differential Revision: D17342811

Pulled By: cpojer

fbshipit-source-id: 2bed9b5f91e1b67451fefe34b02a1129d6c80d15
2019-09-12 05:10:58 -07:00
Christoph Nakazawa e54ecf907e Move `react-native-implementation.js` to `index.js`
Summary: I am unsure whether there was a reason not to use an `index.js` file from the beginning. It always struck me as confusing and odd to have the main API hidden in a folder somewhere. This changes RN to use the standard `index.js` file that is common in almost all JavaScript packages.

Reviewed By: yungsters, rubennorte

Differential Revision: D17314423

fbshipit-source-id: 10eaf4fddd41e91163de7d10c0879b623dab00d7
2019-09-12 03:29:51 -07:00
Jakob Krigovsky cc35d0f1bc Fix typos in comments about use_frameworks! (#26381)
Summary:
Fixes typos in code comments about CocoaPods’s `use_frameworks!`.

## Changelog

[Internal] [Fixed] - Fix typos in comments about `use_frameworks!`
Pull Request resolved: https://github.com/facebook/react-native/pull/26381

Test Plan: Considering this only changes code comments, I don’t think this pull request needs a test plan.

Differential Revision: D17258856

Pulled By: cpojer

fbshipit-source-id: fd9a7253ef9744685c233ebbec7df9eea50a8d28
2019-09-09 07:23:59 -07:00
Max Thirouin e6b2cf0418 Fix incorrect `module.name_mapper` in template .flowconfig (#26330)
Summary:
Has explained in https://github.com/facebook/react-native/issues/26233, current template is incorrect & can create error, like having require() of png that are considered as `string` instead of `number. This can probably hide tons of similar mistakes.

The change in this PR should resolve the previous behavior (& for example, some places in previous version of the flowconfig have the full path like here 35300147ca/template/_flowconfig (L61))

Closes https://github.com/facebook/react-native/issues/26233

## Changelog

```
[General] [Fixed] Fix incorrect `module.name_mapper` in template .flowconfig
```

Alternatively, message could be

```
[General] [Internal] Fix incorrect `module.name_mapper` in template .flowconfig
```

As it hasn't this "bug" hasn't been released in a public stable release. You decide
Pull Request resolved: https://github.com/facebook/react-native/pull/26330

Test Plan: I just tested this in my project, thymikee might be able to confirm & approve this PR.

Differential Revision: D17258891

Pulled By: cpojer

fbshipit-source-id: 3904ffbc6f076ee0e435311249d694b8604fc7b8
2019-09-09 06:45:38 -07:00
Frieder Bluemle 87f94d5587 Skip lint check for dynamic react-native version (#26222)
Summary:
The `dependencies` section in the `build.gradle` Android template contains this line:

    implementation "com.facebook.react:react-native:+"  // From node_modules

It causes the following Gradle Lint warning:

> Avoid using '+' in version numbers, can lead to unpredictable or unrepeatable builds

In this case, as the `// From node_modules` comment suggests, the version is _not_ determined by Gradle but by the version specified in `package.json` - Using "+" is completely fine and intentional.

Therefore it can safely be ignored, which is what the added `//noinspection` comment does.

## Changelog

[Android] [Fixed] - Skip lint check for dynamic react-native version
Pull Request resolved: https://github.com/facebook/react-native/pull/26222

Test Plan: Projects generated with the new template no longer cause the warning anymore.

Differential Revision: D17091476

Pulled By: osdnk

fbshipit-source-id: 910b4ecf22ccd11cade9427af68087ffcce8bc8e
2019-09-09 06:33:06 -07:00
Ram N e8541e03f4 Add React Dev tools to the default template
Reviewed By: PeteTheHeat

Differential Revision: D17222891

fbshipit-source-id: ea3ce9b2285f67dc01cd11c66ce4a41a4c4ea958
2019-09-06 19:42:30 -07:00
Ram N 04a011236b Fix Imports in React Native template
Summary: Looks like some of the imports went missing when merging. Found this when testing this again.

Reviewed By: mdvacca

Differential Revision: D17200737

fbshipit-source-id: ded39493786d4999317c5e29be270e5990601b06
2019-09-06 19:39:40 -07:00
Nat Mote 20a4ac9854 Upgrade to v0.107.0
Reviewed By: gabelevi

Differential Revision: D17219316

fbshipit-source-id: c654fd51f8a575a7d810759893273cb6a2b501d6
2019-09-06 11:07:05 -07:00
Frieder Bluemle b1c954b1f1 Update Gradle wrapper to 5.6.2 (#26349)
Summary:
Gradle wrapper `5.6.2`

Supersedes and closes https://github.com/facebook/react-native/issues/26227

## Changelog

[Android] [Changed] - Gradle wrapper 5.6.2
Pull Request resolved: https://github.com/facebook/react-native/pull/26349

Test Plan: Builds successfully (just like the current `master` branch, **only** after either reverting 4763000554 **or** cherry-picking 7f238785ec898560c276d1d37b4c88b7018c245b from https://github.com/facebook/react-native/issues/26314)

Differential Revision: D17224299

Pulled By: mdvacca

fbshipit-source-id: cbd1b3d5d686e284fdc8e3f6faaeaa93654b301d
2019-09-06 00:25:53 -07:00
Ram N 24de443bac Add Fresco Image Plugin
Reviewed By: mdvacca

Differential Revision: D15751118

fbshipit-source-id: 75a8b65b276968462f8e3e3cff6d8f95fd62e8cd
2019-09-03 16:59:33 -07:00
Ram N 70274f4e91 Add code to enable Flipper in React Native iOS Template
Reviewed By: rickhanlonii

Differential Revision: D6997542

fbshipit-source-id: c8f7280b52febabb0a987df5dffadf957dadd1fb
2019-09-03 16:33:11 -07:00
Ram N 755ad3b33a Move ReactNativeFlipper class to template
Reviewed By: mdvacca

Differential Revision: D6101369

fbshipit-source-id: e1ae8f57136dd568b7c14fa873a50bb490d73808
2019-09-03 16:28:24 -07:00
glevi@fb.com b31056d802 Deploy v0.106.3 to xplat/js
Reviewed By: jbrown215

Differential Revision: D17120458

fbshipit-source-id: b1f097acffcf277b624910a3c4d7141ef5f352ad
2019-08-30 08:18:13 -07:00
Ram N 82a8080f07 Change podspec name of yoga to Yoga
Summary:
Needed to capitalize the name, since this is the convention used elsewhere too

## Changelog:

[iOS] [Changed] - Renamed yoga podspec to Yoga

Reviewed By: shergin

Differential Revision: D17127104

fbshipit-source-id: 14047bf452edda000037701f4ba7f4a02a0e717b
2019-08-30 07:12:34 -07:00
Dulmandakh 4763000554 bump android gradle plugin to 3.5.0 (#26129)
Summary:
Android Gradle Plugin 3.5.0 released with a lot of improvements and bug fixes. It's important to have this change merged before 0.61 release. See https://developer.android.com/studio/releases/gradle-plugin

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.5.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26129

Test Plan: RNTester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D17091520

Pulled By: osdnk

fbshipit-source-id: 232b9209526e62a7344d74422fd8471a03dec7f4
2019-08-29 07:35:41 -07:00
Frieder Bluemle be2a2529af Update Gradle wrapper to 5.6 (#26079)
Summary:
```
Welcome to Gradle 5.6!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6/release-notes.html
```

## Changelog

[Android] [Changed] - Gradle wrapper 5.6
Pull Request resolved: https://github.com/facebook/react-native/pull/26079

Test Plan: Ran build and tests locally.

Differential Revision: D17054310

Pulled By: mdvacca

fbshipit-source-id: de7ba3a6d04058e51b8bc6a21d5a3f828ef8bc25
2019-08-26 12:13:37 -07:00
glevi@fb.com 97b42bb142 Deploy v0.106.0 to xplat/js
Reviewed By: mroch

Differential Revision: D16979246

fbshipit-source-id: 995fbd391823eaf0c9e3a673cf8fbe061ce0545a
2019-08-23 08:06:44 -07:00
Ram N bb272bacca Don't enable Flipper in React Native by default
Summary:
Removing default integration of Flipper from OSS till discussions happen.

To enable Flipper, just download the Flipper desktop app and uncomment the line in MainApplication.java. Flipper should automatically connect to your app.

Reviewed By: rickhanlonii

Differential Revision: D6654890

fbshipit-source-id: 692cf04fec3273703c0571d04f0100c0dbb8269b
2019-08-19 07:35:47 -07:00
Ram N 3a66fc7dcb Add Flipper to React Native OSS by default
Reviewed By: passy

Differential Revision: D6723578

fbshipit-source-id: f34442689f99cd94220335a171010224a12132a8
2019-08-12 14:56:02 -07:00
iyegoroff 1a92cf9b2a Added jitpack repository to template (#25987)
Summary:
This PR will eliminate additional manual installation step for third-party RN libraries that include jitpack-published dependencies.

## Changelog

[Android] [Added] - Added jitpack repository to template
Pull Request resolved: https://github.com/facebook/react-native/pull/25987

Test Plan: No testing required.

Differential Revision: D16763401

Pulled By: cpojer

fbshipit-source-id: 72ff0146bd20c61a27b244f2dc7fea50781a4d1a
2019-08-12 07:32:36 -07:00
Jakob Krigovsky 9b0adb5ad1 Fix indentation in Gradle files (#26012)
Summary:
Fixes indentation in `*.gradle` files by using four-space indents [as specified in `.editorconfig`](0ccedf3964/.editorconfig (L13-L14)).

## Changelog

[Internal] [Fixed] - Fix indentation in Gradle files
Pull Request resolved: https://github.com/facebook/react-native/pull/26012

Test Plan: Considering [the diff consists of whitespace changes only](https://github.com/facebook/react-native/compare/master...sonicdoe:gradle-indentation?w=1), I think this is safe to merge if the test suite passes.

Differential Revision: D16761514

Pulled By: cpojer

fbshipit-source-id: 9b035b5c6b35a70b2b54fe35416840fb90a0c6b1
2019-08-12 02:45:57 -07:00
Avik Chaudhuri b1ca5be68a @allow-large-files flow 0.105 xplat deploy
Summary:
bypass-lint
allow_many_files

Reviewed By: jbrown215

Differential Revision: D16753543

fbshipit-source-id: 1db37b56c1bb84b547e302dfe13ea0c9787deace
2019-08-11 00:22:31 -07:00
Logan Daniels 9127fb51fc Manual fixes for xplat/js/react-native-github
Summary:
Need to add explicit type annotations in these areas to unblock types-first architecture for Flow. These are locations the codemod could not automatically handle.

I'll call out areas I need a close eye on in the comments.

Reviewed By: panagosg7

Differential Revision: D16659053

fbshipit-source-id: 167dd2abe093019b128676426374c1c62cf71e7f
2019-08-09 10:11:15 -07:00
Kid Commit 7cac6a4b6c Update App.js (#25905)
Summary:
use "shorthand" of `Fragment`

No need to import `Fragment` as it can be used via `<></>` vs `<Fragment><Fragment />`

## Changelog
Use shorthand for Fragment in App.js

[General] [Changed] - Use shorthand for Fragment in App.js
Pull Request resolved: https://github.com/facebook/react-native/pull/25905

Test Plan: Ci Tests should be sufficient

Differential Revision: D16666166

Pulled By: cpojer

fbshipit-source-id: 70e2c9793087bf8f5e0a5477c75f178134cbd6a1
2019-08-06 03:58:13 -07:00
sunnylqm c21e36db45 Bump hermes to v0.1.1 (#25908)
Summary:
Hermes has been updated to [v0.1.1](https://github.com/facebook/hermes/releases/tag/v0.1.1) and [renamed from 'hermesvm' to 'hermes-engine'](c74842ee5c)

## Changelog

[Android] [Changed] - Bump hermes to v0.1.1
Pull Request resolved: https://github.com/facebook/react-native/pull/25908

Test Plan: RNTester builds and runs as expected

Differential Revision: D16645811

Pulled By: cpojer

fbshipit-source-id: 4fb6a3160df2c6d08140dd1fee51acf9ff8baffc
2019-08-05 12:58:25 -07:00
Marshall Roch 59db059dbd upgrade to flow v0.104.0
Reviewed By: dsainati1

Differential Revision: D16523758

fbshipit-source-id: 8816a6b93415b9967888217dd6d0642830d5ed1d
2019-07-26 19:21:32 -07:00
cpojer d7f5153cd8 Add Hermes support to React Native on Android (#25613)
Summary:
Yesterday we shipped hermesengine.dev as part of the current 0.60 release. This PR brings those changes to master.

## Changelog

[General] [Added] - Added support for Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/25613

Test Plan:
* CI is green both on GitHub and at FB
* Creating a new app from source can use Hermes on Android

Reviewed By: cpojer

Differential Revision: D16221777

Pulled By: willholen

fbshipit-source-id: aa6be10537863039cb666292465ba2e1d44b64ef
2019-07-25 23:05:53 -07:00
Kid Commit fee7f0617e build(gradle): update build.gradle (#25810)
Summary:
Remove obsolete supportLibVersion - no longer required with AndroidX

Removing the `supportLibVersion` variable that was used in `app/build.gradle` to suffix version numbers on android support libraries.
As react-native moved to androidX with the release of `0.60` this is no longer necessary.

## Changelog

[Android] [Removed] - Remove supportLibVersion variable in build.gradle
Pull Request resolved: https://github.com/facebook/react-native/pull/25810

Test Plan: No tests were run locally

Reviewed By: cpojer

Differential Revision: D16498431

Pulled By: osdnk

fbshipit-source-id: 95e77304549c3f7b7ebdaeb363b72dd21d686595
2019-07-25 18:38:29 -07:00
Anders Bondehagen d55025694b Adding the debug.keystore file back (#25807)
Summary:
Fixes https://github.com/facebook/react-native/issues/25629 that happened after v60 upgrade when using the diff tool https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.4

When following the diff for upgrading to react native 60. The debug.keystore is missing. It's added in the repository but ignored in the .gitignore, so it does not show. This adds an exception for this file.

## Changelog

[Android] [Fixed] - Add exception in .gitignore for `debug.keystore` to the android template.
Pull Request resolved: https://github.com/facebook/react-native/pull/25807

Test Plan: Create a new project from template and check that debug.keystore will be checked in when committing.

Reviewed By: cpojer

Differential Revision: D16462897

Pulled By: mdvacca

fbshipit-source-id: 18c0e8aee7f5cf8ed0d3544f88dc1621ad17f30f
2019-07-25 15:09:25 -07:00
James Treanor ca9e108110 Remove 's.static_framework = true' requirement for podspec (#25816)
Summary:
As part of the fix for https://github.com/facebook/react-native/issues/25349 I added `s.static_framework = true` to each podspec in repo (see https://github.com/facebook/react-native/pull/25619#discussion_r306993309 for more context).

This was required to ensure the existing conditional compilation with `#if RCT_DEV` and `__has_include` still worked correctly when `use_frameworks!` is enabled.

However, fkgozali pointed out that it would be ideal if we didn't have this requirement as it could make life difficult for third-party libraries.

This removes the requirement by moving `React-DevSupport.podspec` and `React-RCTWebSocket.podspec` into `React-Core.podspec` as subspecs. This means the symbols are present when `React-Core.podspec` is built dynamically so `s.static_framework = true` isn't required.

This means that any `Podfile` that refers to `React-DevSupport` or `React-RCTWebSocket` will need to be updated to avoid errors.

## Changelog

I don't think this needs a changelog entry since its just a refinement of https://github.com/facebook/react-native/pull/25619.
Pull Request resolved: https://github.com/facebook/react-native/pull/25816

Test Plan:
Check `RNTesterPods` still works both with and without `use_frameworks!`:

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: hramos

Differential Revision: D16495030

Pulled By: fkgozali

fbshipit-source-id: 2708ac9fd20cd04cb0aea61b2e8ab0d931dfb6d5
2019-07-25 11:46:43 -07:00
James Treanor 8131b7bb7b CocoaPods frameworks compatibility: Step 2 (#25619)
Summary:
This is my proposal for fixing `use_frameworks!` compatibility without breaking all `<React/*>` imports I outlined in https://github.com/facebook/react-native/pull/25393#issuecomment-508457700. If accepted, it will fix https://github.com/facebook/react-native/issues/25349.

It builds on the changes I made in https://github.com/facebook/react-native/pull/25496 by ensuring each podspec has a unique value for `header_dir` so that framework imports do not conflict. Every podspec which should be included in the `<React/*>` namespace now includes it's headers from `React-Core.podspec`.

The following pods can still be imported with `<React/*>` and so should not have breaking changes: `React-ART`,`React-DevSupport`, `React-CoreModules`, `React-RCTActionSheet`, `React-RCTAnimation`, `React-RCTBlob`, `React-RCTImage`, `React-RCTLinking`, `React-RCTNetwork`, `React-RCTPushNotification`, `React-RCTSettings`, `React-RCTText`, `React-RCTSettings`, `React-RCTVibration`, `React-RCTWebSocket` .

There are still a few breaking changes which I hope will be acceptable:

- `React-Core.podspec` has been moved to the root of the project. Any `Podfile` that references it will need to update the path.
- ~~`React-turbomodule-core`'s headers now live under `<turbomodule/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- ~~`React-turbomodulesamples`'s headers now live under `<turbomodulesamples/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- ~~`React-TypeSaferty`'s headers now live under `<TypeSafety/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511040967.
- ~~`React-jscallinvoker`'s headers now live under `<jscallinvoker/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- Each podspec now uses `s.static_framework = true`. This means that a minimum of CocoaPods 1.5 ([released in April 2018](http://blog.cocoapods.org/CocoaPods-1.5.0/)) is now required. This is needed so that the ` __has_include` conditions can still work when frameworks are enabled.

Still to do:

- ~~Including `React-turbomodule-core` with `use_frameworks!` enabled causes the C++ import failures we saw in https://github.com/facebook/react-native/issues/25349. I'm sure it will be possible to fix this but I need to dig deeper (perhaps a custom modulemap would be needed).~~ Addressed by 33573511f0.
- I haven't got Fabric working yet. I wonder if it would be acceptable to move Fabric out of the `<React/*>` namespace since it is new? �

## Changelog

[iOS] [Fixed] - Fixed compatibility with CocoaPods frameworks.
Pull Request resolved: https://github.com/facebook/react-native/pull/25619

Test Plan:
### FB

```
buck build catalyst
```

### Sample Project

Everything should work exactly as before, where `use_frameworks!` is not in `Podfile`s. I have a branch on my [sample project](https://github.com/jtreanor/react-native-cocoapods-frameworks) here which has `use_frameworks!` in its `Podfile` to demonstrate this is fixed.

You can see that it works with these steps:

1. `git clone git@github.com:jtreanor/react-native-cocoapods-frameworks.git`
2. `git checkout fix-frameworks-subspecs`
3. `cd ios && pod install`
4. `cd .. && react-native run-ios`

The sample app will build and run successfully. To see that it still works without frameworks, remove `use_frameworks!` from the `Podfile` and do steps 3 and 4 again.

### RNTesterPods

`RNTesterPodsPods` can now work with or without `use_frameworks!`.

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: PeteTheHeat

Differential Revision: D16465247

Pulled By: PeteTheHeat

fbshipit-source-id: cad837e9cced06d30cc5b372af1c65c7780b9e7a
2019-07-24 23:27:09 -07:00
zhongwuzw 0fcaca8e26 Fixes template build failed in release mode (#25751)
Summary:
Fixes https://github.com/facebook/react-native/issues/25745, Xcode stripped dead code in Release mode, and in template test code, it should only run in Debug mode, so we can use a macro to fix this issue.

## Changelog

[iOS] [Fixed] - Fixes template build failed in release mode
Pull Request resolved: https://github.com/facebook/react-native/pull/25751

Test Plan:
1. Create a new project using `react-native init AwesomProject`.
2. Change project target scheme to `Release`.
3. Build and it should success.

Differential Revision: D16442643

Pulled By: TheSavior

fbshipit-source-id: f08ed70523aa1aa418064465f8df367a06e8974f
2019-07-23 11:08:41 -07:00
George Zahariev 9984ac4786 Deploy Flow 0.103 to xplat
Summary:
Deploy Flow 0.103 to xplat

bypass-lint

Reviewed By: panagosg7

Differential Revision: D16374740

fbshipit-source-id: e0d67e0bc9a209dd75d78bcf257c6af821ed04d1
2019-07-19 21:43:05 -07:00
Christoph Nakazawa ba8f88d1ab Rename HMRLoadingView to LoadingView
Summary:
This view will be re-used for bundle splitting so I'm changing the name to be more generic as it can be used for informing users of any loading activity.

I also cleaned up the files a bit from a class to just an object.

Reviewed By: gaearon

Differential Revision: D16281367

fbshipit-source-id: 5c2ee7790d29ccba473bd6e90737d2f0581e6291
2019-07-18 03:06:49 -07:00
JP Driver 7254bab0b3 Fresh RN projects fails ESLint / Prettier by default (#25478)
Summary:
Fixes https://github.com/facebook/react-native/issues/25477

This PR adds a `.prettierrc.js` config file to the HelloWorld template.

`eslint-config-react-native-community` includes custom settings for some rules which conflict with Prettier's default settings.

Consequently, if you run `eslint` immediately after scaffolding a new app you get errors (see linked issue).

This PR configures Prettier to be compatible with both the existing ESLint config and the existing project template (with no code changes to the latter).

## Changelog

[General] [Changed] - Added a default Prettier config for new projects
Pull Request resolved: https://github.com/facebook/react-native/pull/25478

Test Plan:
- The following screenshots show the output of `yarn lint` before and after these changes
- These were run immediate after running `npx react-native-cli init RN060`

### Without these changes

- Linting errors on new projects
- Unfixable automatically due to conflicting rules
<img width="1116" alt="Screenshot 2019-07-03 at 17 44 55" src="https://user-images.githubusercontent.com/2393035/60610078-f6b44d00-9dba-11e9-826f-1524b949e4fd.png">
<img width="1116" alt="Screenshot 2019-07-03 at 17 45 07" src="https://user-images.githubusercontent.com/2393035/60610085-fb790100-9dba-11e9-9a9c-33f4cfefd51e.png">

### With these changes

- Brand new projects will not produce lint errors out of the box
<img width="1116" alt="Screenshot 2019-07-03 at 17 48 25" src="https://user-images.githubusercontent.com/2393035/60610266-57dc2080-9dbb-11e9-8a55-fd09f3549c17.png">

Differential Revision: D16223094

Pulled By: cpojer

fbshipit-source-id: bd2c00b1fcf27b1afcad8c18b357b95a3900bdf7
2019-07-15 02:09:59 -07:00
Dulmandakh eb48ed1f19 bump Android Gradle Plugin to 3.4.2 (#25652)
Summary:
Bump Android Gradle Plugin to 3.4.2, includes bug fixes and improvements

## Changelog

[Android][Changed] - bump Android Gradle Plugin to 3.4.2
Pull Request resolved: https://github.com/facebook/react-native/pull/25652

Test Plan: RNTester builds and runs as expected

Differential Revision: D16258865

Pulled By: mdvacca

fbshipit-source-id: c20600e3c7fc44793f42a0061bbb22a6ead9f0e4
2019-07-14 23:48:34 -07:00
Kevin Gozali c1b0f398e6 TM iOS: move jscallinvoker under ReactCommon podspec
Summary:
This essentially changes the header namespace to `<ReactCommon/`
Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: PeteTheHeat

Differential Revision: D16233125

fbshipit-source-id: 83eda4cc50ebb01efd1ce3eb18f47c97a049cffa
2019-07-12 22:44:20 -07:00
Kevin Gozali 6e7ce9c082 TM iOS: refactor header dir for TM
Summary:
For better cocoapods compatibility, refactored TM podspec to be a subspec of ReactCommon, then use `<ReactCommon/` header prefix for all TM files.

Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: hramos

Differential Revision: D16231697

fbshipit-source-id: 38d3418b19978ff54aa0c61b064ac45ac0e1c36c
2019-07-12 22:44:20 -07:00
Kevin Gozali 0c8c95f4ae iOS: Use RCTTypeSafety header namespace instead of React
Summary: For better compatibility re: https://github.com/facebook/react-native/pull/25393, this target should just use `RCTTypeSafety`

Reviewed By: PeteTheHeat

Differential Revision: D16210888

fbshipit-source-id: 6a55d631453cc420909247a7d5a64379587225b7
2019-07-12 14:30:11 -07:00
satyajit.happy afe06e5831 Add package.json scripts ro run android and ios in template (#25618)
Summary:
Currently users have to use the global `react-native` command or run `yarn react-native run-x` which isn't very nice.

This PR adds `android` and `ios` scripts to `package.json` so users can run `yarn android` or `yarn ios` directly.
Pull Request resolved: https://github.com/facebook/react-native/pull/25618

Differential Revision: D16223229

Pulled By: cpojer

fbshipit-source-id: 69b082760ff2ee31ab0406251f9a50339fd227bf
2019-07-12 09:05:12 -07:00
Christoph Nakazawa ba03e4e7bb Use babel-core 7.5+ in new RN Apps
Summary:
We are running into some problems with the spread operator. The solution is to ask for a newer minimum babel version.

See https://github.com/babel/babel/issues/10179

Note: this doesn't actually change behavior. When creating a new app a new babel version will already be used. This simply ensures that the minimum version fulfills the requirements.

Reviewed By: axe-fb

Differential Revision: D16181111

fbshipit-source-id: f5207318b3a7bd9f092c0e64a8065d0f713012da
2019-07-10 07:12:58 -07:00
Kevin Gozali 6853b9bdfa Fixed iOS Podfile template to add React-CoreModules and its deps
Summary:
With React-CoreModules separated from React-Core, the Podfile needs updating to sync with https://github.com/facebook/react-native/blob/master/scripts/autolink-ios.rb
See fde8a4cf93 for the original change.

Note: the template Podfile should be updated to use the same autolink scripts

This fixes the CI failure like this: https://circleci.com/gh/facebook/react-native/99956

Reviewed By: hramos

Differential Revision: D16114264

fbshipit-source-id: d75dff570310f21eb8fbdf030439532a0abe978d
2019-07-04 11:21:56 -07:00
Karan Thakkar d57cdac62b Add generated `xcshareddata` folder to gitignore (#25451)
Summary:
A new project created with `0.60.0-rc.3` generates an `xcshareddata` when you open the workspace in Xcode at `ios/ProjectName.xcworkspace/xcshareddata`. This does not need to be tracked in git.

## Changelog

[IOS] [ADDED] - Add generated `xcshareddata` folder to gitignore
Pull Request resolved: https://github.com/facebook/react-native/pull/25451

Test Plan: N/A

Differential Revision: D16110125

Pulled By: hramos

fbshipit-source-id: 52ac4d2d7734956817f875c3c7bbf341cba2ea28
2019-07-03 16:29:47 -07:00
Nicolas Charpentier 029aad3a4a Upgrade Gradle to 5.5 (#25461)
Summary:
Upgrade Gradle to 5.5, changelog is available here: https://docs.gradle.org/5.5/release-notes.html

```
./gradlew wrapper --gradle-version 5.5 --distribution-type all
```

## Changelog

[Android] [Changed] - Upgrade Gradle to 5.5
Pull Request resolved: https://github.com/facebook/react-native/pull/25461

Test Plan: Ran RNTester, everything is working as expected.

Differential Revision: D16106927

Pulled By: cpojer

fbshipit-source-id: 3fca03b6c7ad8989a9a1c707dea980c831cc1872
2019-07-03 02:29:47 -07:00
Oleksandr Melnykov 6c0f73b322 Format Java code in xplat/js/react-native-github
Summary:
This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time.

```arc f --paths-cmd 'hg files -I "**/*.java"'```

drop-conflicts

Reviewed By: cpojer

Differential Revision: D16071725

fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
2019-07-02 04:16:46 -07:00
Panagiotis Vekris 454bbff3ba Flow v0.102 in xplat/js
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/Updating_Internal_Repositories/#update-xplat-js

allow-large-files

Reviewed By: jbrown215

Differential Revision: D16013696

fbshipit-source-id: 1a6185dafd14ef9c9e1aa214cdbf8cf9c573b08f
2019-06-26 19:07:39 -07:00
Michał Pierzchała 86a97e7830 – Bring back autolinking to the iOS template (#25314)
Summary:
Bringing back iOS autolinking to the template after reverting: 261197d857 (commitcomment-33479829)

## Changelog

[iOS] [Added] – Bring back autolinking to the iOS template
Pull Request resolved: https://github.com/facebook/react-native/pull/25314

Test Plan: `test_ios_e2e` should still pass

Differential Revision: D15938862

Pulled By: cpojer

fbshipit-source-id: 4cd948b280a90229fd128b0f6901f7f89c647204
2019-06-21 03:13:38 -07:00
Mehdi Mulani 46bdb4161c Delete fishhook
Summary: Fishhook was used to try to hide the log messages from RCTReconnectingWebSocket but that doesn't really work anymore. Deleting it now to unblock people trying to build for iOS 13.

Reviewed By: cpojer

Differential Revision: D15779390

fbshipit-source-id: ef18575d5d92ac374e189b1267dee3a9befc3551
2019-06-12 06:19:32 -07:00
Jordan Brown dec9698d1c @allow-large-files Deploy v0.101.0 to xplat
Summary: Deploy v0.101.0 to xplat

Reviewed By: gabelevi

Differential Revision: D15765260

fbshipit-source-id: 8535438131ee47eaa94bd3a735c30eaf13a732ff
2019-06-11 15:22:23 -07:00
James Ide bf8d918681 Make Flow configs use path-based imports instead of Haste (#24812)
Summary:
**Depends on https://github.com/facebook/react-native/pull/25100**

This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options.

Additionally, it maps `react-native` to import from within this module to match Node's module resolution behavior. It also adds `<PROJECT_ROOT>` to the image name mapper so that the mapped name doesn't rely on Haste.

## Changelog

[General] [Changed] - Make Flow configs use path-based imports instead of Haste
Pull Request resolved: https://github.com/facebook/react-native/pull/24812

Differential Revision: D15659189

Pulled By: cpojer

fbshipit-source-id: d0efaa2884485a492dcdef8d94061129cebc2566
2019-06-05 16:00:52 -07:00
Sam Goldman b3a50ec0de Deploy Flow v0.100 to xplat/js
Reviewed By: dsainati1

Differential Revision: D15617077

fbshipit-source-id: b88325dd80d167473d3c4cc7bb93c27ea71e654b
2019-06-03 23:03:41 -07:00
Sam Goldman 87b31bccdf @allow-large-files Deploy Flow v0.99.0 to xplat/js
Reviewed By: dsainati1

Differential Revision: D15541620

fbshipit-source-id: e19795e13d47dca58c5603b308b7cd60ba67ef86
2019-05-29 18:11:43 -07:00
Dulmandakh fbc6d8caff bump android gradle plugin to 3.4.1 (#24883)
Summary:
bump android gradle plugin to 3.4.1, includes many fixes and improvements.

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/24883

Differential Revision: D15474556

Pulled By: hramos

fbshipit-source-id: 8d1eb91855b9f416ed3380c61f34672deded26c1
2019-05-24 11:53:17 -07:00
nossbigg 30a0a03b80 Fix ios/android e2e tests (#24974)
Summary:
Fixes broken ios/android e2e tests for CI.

Changes:
1. Use `npm pack` instead of `yarn pack` during e2e test
2. Update test string assertions in ios/android e2e tests
3. Use `Step One` as candidate for source code replacement to test for page changes (since the "Welcome to React Native" string exists in the `Header` component instead of being on `App.js`)

## Changelog

[Internal] [Fixed] - Fix ios/android e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/24974

Differential Revision: D15431539

Pulled By: cpojer

fbshipit-source-id: 054af2c2fff6bbdb2263c15d7f5cd416aaa507fd
2019-05-21 05:44:29 -07:00
Orta Therox ad4a5d9a3e Improves the copy for the new app screen (#24918)
Summary:
1. Consistency with full stops  (you can see screenshots in https://github.com/facebook/react-native/pull/24783 )
2. Improvements to the wording, describing what you're going to see

## Changelog

[Internal] [Fixed] - Improves the copy for the new app screen
Pull Request resolved: https://github.com/facebook/react-native/pull/24918

Differential Revision: D15391421

Pulled By: cpojer

fbshipit-source-id: 2ec6d2d5bd4845c5f4c699838ae865ab4217e49e
2019-05-17 03:49:21 -07:00
Lucas Bento a9e8a71e53 Add `SafeAreaView` to not have content behind `StatusBar` in iOS (#24868)
Summary:
This PR fixes the content being shown behind the `StatusBar` in the new app template, was only happening in iOS.

## Changelog

[General] [Changed] - Fix content being shown behind `StatusBar` in the new app template.
Pull Request resolved: https://github.com/facebook/react-native/pull/24868

Differential Revision: D15353748

Pulled By: cpojer

fbshipit-source-id: 4c84a65d9f8e85e5558d447533e381126c971e38
2019-05-15 08:31:49 -07:00
Eli Perkins fe88e9e48c Replace new app template with new app screen (#24805)
Summary:
This replaces the "new app screen" in the template with the new design from https://github.com/react-native-community/discussions-and-proposals/issues/122

This uses components that are shipped as part of the `react-native` module, but not necessarily as proper components exported by the main `react-native` module. To use these, we use absolute imports to those components.

Related to #24760

[General] [Changed] - Updated new app template design 💖
Pull Request resolved: https://github.com/facebook/react-native/pull/24805

Differential Revision: D15334459

Pulled By: cpojer

fbshipit-source-id: d0b67d08f936eeabd9e93d4e0ff78302b4d6429f
2019-05-14 05:52:03 -07:00
Héctor Ramos da7d3dfc7d Partially back out #24506, fixing iOS e2e tests (#24788)
Summary:
The iOS End-to-End tests started failing with the updates made to the iOS template's Podfile in 261197d857. Undoing these gets our CI iOS e2e test step back to green.

[iOS] [Removed] - Revert auto-linking related changes to the iOS template Podfile
Pull Request resolved: https://github.com/facebook/react-native/pull/24788

Differential Revision: D15317895

Pulled By: cpojer

fbshipit-source-id: a1f3b84b39c6d341740f742d83fd05a1ab841184
2019-05-13 07:37:07 -07:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Kudo Chien 509a07b207 Remove unreliable packagingOptions.pickFirst for libc++_shared.so and libjsc.so (#24672)
Summary:
packagingOptions.pickFirst is unreliable that we could not specify which library will be used.
If user have other third party libraries, the story is more complicated.
From the framework point of view, it is better to drop the pickFirst.

In jsc-android 241213.1.0, we did two things:
1. Remove libc++_shared.so in AAR to prevent the conflict with RN.
2. Build by NDK r17c, which aligned with current RN NDK version.

In this commit, I also revert the pickFirst for JSC.
pickFirst JSC also makes upgrade JSC unreliable.
Currently a lot of user report JSC crash issues, those crash issues may relate to JIT and hard to reproduce in-house.
My plan is to make sure user could choose another JSC build easier,
i.e. only to `yarn add 'jsc-android@latest'`.
We could then propose some experimented JSC build for user to check
if the build could help them to fix the crash issue.

[Android] [Fixed] - Remove unreliable packagingOptions.pickFirst for libc++_shared.so and libjsc.so
NOTE that this may not need to add the changelog, as RN 0.59 does not have pickFirst.
This will also reduce a breaking change for upgrade from RN 0.59 or before.
Pull Request resolved: https://github.com/facebook/react-native/pull/24672

Differential Revision: D15164536

Pulled By: cpojer

fbshipit-source-id: 9fc897a77409173a5841f325b38e2836bb07f599
2019-05-07 07:13:33 -07:00
Nat Mote 0e1dfd4369 Upgrade to Flow v0.98
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

allow-large-files

Reviewed By: avikchaudhuri

Differential Revision: D15149545

fbshipit-source-id: 85b6107c058d50d9fe80fd277fcdd005faccea8e
2019-05-03 11:43:10 -07:00
Dulmandakh 30348f7899 bump android gradle plugin to 3.4.0 (#24463)
Summary:
This PR bumps Android Gradle Plugin to 3.4.0, which enables R8 shrinker by default and improves build performance significantly.

Disabled R8 for ReactAndroid because it'll strip out AndroidX and other libraries bundled in ReactAndroid.

[Android] [Changed] - bump Android Gradle plugin to 3.4.0
Pull Request resolved: https://github.com/facebook/react-native/pull/24463

Differential Revision: D15107117

Pulled By: hramos

fbshipit-source-id: 35a03dc9955e889c9399faeaf9a862e0fc044fc4
2019-04-27 09:43:19 -07:00
Dulmandakh 6976a93126 bump Gradle to 5.4.1 (#24542)
Summary:
Bump Gradle to 5.4.1, includes many improvements and fixes.

[Android] [Changed] - Bump Gradle to 5.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/24542

Differential Revision: D15107106

Pulled By: hramos

fbshipit-source-id: aeae0413a720466f1eef00ad8e80d59c406ecd80
2019-04-27 00:10:04 -07:00
Salakar 261197d857 Implement changes to enable native modules auto linking (#24506)
Summary:
Replaces #24099 (original PR became detached for some reason)

Implements the template changes required to enable native modules auto-linking for both Android & iOS.

Requires the following to be merged first and an updated CLI to be published:

- [x] https://github.com/react-native-community/react-native-cli/pull/254
- [x] https://github.com/react-native-community/react-native-cli/pull/256
- [x] https://github.com/react-native-community/react-native-cli/pull/258

cc grabbou thymikee orta for review

- [ ] https://github.com/facebook/react-native/pull/24517 update CLI version)

[TEMPLATE] [FEATURE] - Enable auto-initialization/linking of react native modules for new projects
Pull Request resolved: https://github.com/facebook/react-native/pull/24506

Differential Revision: D15062701

Pulled By: cpojer

fbshipit-source-id: 65296cbec2925405fe8033de71910325e0c719bc
2019-04-24 06:17:05 -07:00
Jonny Burger 0851d5facb Default textColor of #000000 on Android (#24540)
Summary:
By default, the text color is `#000000` on iOS and different on Android, e.g. `#808080`, depending on the manufactorer.

This PR changes it so that newly created projects all have the text color `#000000` by default on both iOS and Android.

The argument for this is to make the app by default be more consistent between platforms.

Expo also does this: https://github.com/expo/expo/blob/master/android/expoview/src/main/res/values/styles.xml#L31

 ---

For context and for your consideration, I have started a discussion here with the topic of whether React Native should try to use OS defaults or be consistent between platforms:

https://github.com/react-native-community/discussions-and-proposals/issues/121

[Android] [Changed] - New projects have a `#000000` by default.
Pull Request resolved: https://github.com/facebook/react-native/pull/24540

Differential Revision: D15044898

Pulled By: cpojer

fbshipit-source-id: 3197266504e1061ac7027bec3100e39e39a4406a
2019-04-23 03:34:28 -07:00
Mike Diarmid 7ac1d186e4 add jsc pickFirst packagingOptions (#24535)
Summary:
Fixes the following build failures on Android Studio (happening when using the 0.60 template):

![image](https://user-images.githubusercontent.com/5347038/56444182-94859900-62ef-11e9-83f4-88b3b5763edd.png)

![image](https://user-images.githubusercontent.com/5347038/56444147-7881f780-62ef-11e9-8e7b-99820d8d2c13.png)

cc dulmandakh

[Android] [Fixed] - Fixed a `more than one file was found... lib/x86/libjsc.so` build failure with the template
Pull Request resolved: https://github.com/facebook/react-native/pull/24535

Differential Revision: D15044695

Pulled By: cpojer

fbshipit-source-id: b714f828e6d80d414339fa77e1805a43392aabba
2019-04-23 02:21:36 -07:00
Panagiotis Vekris 5e44c08fa5 Deploy 0.97.0 to xplat
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

allow-large-files
bypass-lint

Reviewed By: dsainati1

Differential Revision: D14920747

fbshipit-source-id: db03f6cf73a4b3e9fad6b47e0e657490c45d06a3
2019-04-15 11:19:20 -07:00
Dulmandakh e062cd366c useAndroidX and enableJetifier config in template gradle.properties (#24319)
Summary:
enable useAndroidX and enableJetifier that transforms non-Androidx third-party libraries to use AndroidX.

[Android] [Changed] - useAndroidX and enableJetifier config in template gradle.properties
Pull Request resolved: https://github.com/facebook/react-native/pull/24319

Differential Revision: D14822125

Pulled By: cpojer

fbshipit-source-id: 596a92f26fb06b077da507583b72af2b5abf712a
2019-04-07 11:59:23 -07:00
Héctor Ramos 0f909e3318 Fix duplicate definition Flow error in HMRLoadingView
Summary: Fix duplicate definition Flow error in HMRLoadingView, and match latest changes made to Facebook's internal .flowconfig

Reviewed By: cpojer

Differential Revision: D13110965

fbshipit-source-id: 8c22cab8232e1f539e77014b21e258de8b08d2b3
2019-04-04 16:23:32 -07:00
Kudo Chien 8e375850de Use node package dependency to manage JSC version (#24276)
Summary:
In origin approach, we packed libjsc.so inside react-native.aar and it is difficult for user to choose different JSC variants. E.g., [the Intl supported version](https://github.com/react-native-community/jsc-android-buildscripts#international-variant).

This change list allows application to determine JSC versions or variants by npm/yarn package.

There is a |useIntlJsc| flag in build.gradle, it will use the same JSC version but with Intl support.

`yarn add jsc-android@canary`

[Android] [Changed] - Allow application to select different JSC variants

**MIGRATION**
Note that there are some changes in build.gradle.
Existing application needs to change their android/build.gradle and android/app/build.gradle.
Hopefully, the rn-diff-purge should handle the case well.
Pull Request resolved: https://github.com/facebook/react-native/pull/24276

Differential Revision: D14752359

Pulled By: cpojer

fbshipit-source-id: a4bfb135ad8e328f404a2d1a062412f40ebf4622
2019-04-04 14:22:14 -07:00
Kacper Wiszczuk 81b87e458a Rename ios project name with new template (#24292)
Summary:
With new `init` implementation we replace all occurrences of the project name (`HelloWorld`) inside `ios` and `android` directories. For some reason, a product name field in `ios` was named wrongly. This shouldn't impact initialization using `global-cli`

[iOS] [Fixed] - Change productName in iOS in new init.
Pull Request resolved: https://github.com/facebook/react-native/pull/24292

Differential Revision: D14749249

Pulled By: cpojer

fbshipit-source-id: aaf4294ab23180770aac3075789d3ffb4d5a4f3f
2019-04-03 10:45:35 -07:00
Dulmandakh e02f711ccd fix gradle wrapper in template (#24275)
Summary:
Fix Gradle wrapper in template

[Android] [Changed] - fix Gradle wrapper in template
Pull Request resolved: https://github.com/facebook/react-native/pull/24275

Differential Revision: D14750280

Pulled By: cpojer

fbshipit-source-id: 9aadb1a674503f3fbbdf6cc03a8f8e3d9d2692aa
2019-04-03 10:45:34 -07:00
Mehdi Mulani 17dbf98884 Move iOS Geolocation code out from the repo
Summary:
@public
This resolves the iOS side of #20879.

Reviewed By: natestedman, cpojer

Differential Revision: D14712066

fbshipit-source-id: 88dd0ff80d3467b314cacb9349029dadca4ddf19
2019-04-02 15:36:10 -07:00
Avik Chaudhuri 380ed5581f @allow-large-files xplat flow 0.96 upgrade
Summary:
bypass-lint
allow_many_files

Reviewed By: panagosg7

Differential Revision: D14727932

fbshipit-source-id: 66b2fce7753450204c5daa131ffe43dcd4736539
2019-04-02 13:44:19 -07:00
Dulmandakh d9f5a9dc16 bump gradle to 5.2.1 (#23879)
Summary:
Bump Gradle to 5.2.1, includes many bug fixes and improvements, especially improved Kotlin DSL support.

[Android] [Changed] - bump Gradle to 5.2.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23879

Reviewed By: hramos

Differential Revision: D14486430

Pulled By: cpojer

fbshipit-source-id: 3476516352ff2c947d65103cff6f37e27d888c2d
2019-04-02 12:07:10 -07:00
gengjiawen 4478e50520 add ram bundle to android template (#24264)
Summary:
I plan to do this for a long time :)
Still a little surprised so much people not know it https://twitter.com/geekykaran/status/1112756026611257344

[Android] [Feature] - add ram bundle to android template
Pull Request resolved: https://github.com/facebook/react-native/pull/24264

Differential Revision: D14725396

Pulled By: cpojer

fbshipit-source-id: b8e424f0be81978465259c82024f206d232acb55
2019-04-02 08:29:46 -07:00
Kacper Wiszczuk 6df2edeb2a Bump react-native version in template in release script (#24262)
Summary:
Since template has a fixed version in `template/package.json`, we want to automate this process.

[General] [Added] - Bump react-native in `template/package.json`
Pull Request resolved: https://github.com/facebook/react-native/pull/24262

Differential Revision: D14724831

Pulled By: cpojer

fbshipit-source-id: 164d13001a889941398f3db3b9b96eb9d5114cc3
2019-04-02 08:14:56 -07:00
A C SREEDHAR REDDY 90c51a8b6f update url for apk-splits user-guide (#24253)
Summary:
Changed apk-splits user-guide url.

[ANDROID] [CHANGED] - Apk tools url.
Pull Request resolved: https://github.com/facebook/react-native/pull/24253

Differential Revision: D14724834

Pulled By: cpojer

fbshipit-source-id: 8e9e21ebdcb0d585f1f262640e259ccf71112adb
2019-04-02 08:07:06 -07:00
Kacper Wiszczuk 770da3ac67 Improvement: Adjust template to match new init command (#24138)
Summary:
Adjusting template to new init command (https://github.com/react-native-community/react-native-cli/pull/241).

PR with new init command needs to be merged before we land this.

[General] [Changed] - Adjust template to match new init command
Pull Request resolved: https://github.com/facebook/react-native/pull/24138

Differential Revision: D14617568

Pulled By: cpojer

fbshipit-source-id: f4b90920d47d3e0d2b08470e0eaad1abd733e4cc
2019-04-01 16:25:48 -07:00
Jakob Krigovsky 169ef78e64 Harmonize spacing after colons (#24186)
Summary:
Harmonizes the spacing after colons to have a more consistent coding style.
Pull Request resolved: https://github.com/facebook/react-native/pull/24186

Differential Revision: D14668167

Pulled By: cpojer

fbshipit-source-id: 8f1ba71eec186b3a2221d1f4fac851e51afc52cc
2019-04-01 12:22:40 -07:00
Christoph Nakazawa 6345fcf12b Remove WebView from public RN interface
Summary:
This diff removes the `WebView` export from React Native. Internally, we are requiring `WebView` directly now and externally people will have to use the community maintained module. This diff does not yet move the WebView files from the repo, this will happen in a follow-up.

Note that I had to remove a test for Cookies that displayed data in a WebView. I don't think there is an easy way to retain this (debugging) information that likely very few people ever take a look at so I think it is fine.

Reviewed By: TheSavior

Differential Revision: D14613077

fbshipit-source-id: b1d412f970d09d7d70ecac2c23e62cfdd09d7c8e
2019-03-28 17:37:05 -07:00
Ville Immonen cd8064bc5c Add CocoaPods Podfile to the project template (#23563)
Summary:
CocoaPods makes it easier to add new iOS dependencies to a project without having to manually edit Xcode projects. Editing Xcode projects is time consuming and merging changes to them difficult. Automating the changes to Xcode project `react-native link` is error prone. CocoaPods is a de-facto standard way to manage iOS dependencies and a central part of unimodules and upcoming improvements to `react-native link`.

This PR adds a `Podfile` to the default project template of React Native. To use a project with CocoaPods, after creating it, run `cd ios; pod install` and use the created `<projectname>.xcworkspace` file instead of the `.xcodeproj` file. (We could make this a part of `react-native init` so you only need to run one command when creating a project.)

[iOS] [Added] - Add CocoaPods Podfile to the project template
Pull Request resolved: https://github.com/facebook/react-native/pull/23563

Differential Revision: D14576505

Pulled By: cpojer

fbshipit-source-id: f6c9e93d61a52ad445d2931ccc4933d559a6ec1a
2019-03-22 03:29:11 -07:00
michalchudziak 395197dafe Add .eslintrc to RN project template (#23901)
Summary:
The goal of this PR is to enable eslint checks in the projects generated by `react-native init` command. I added `template/_eslintrc` file, that would be replaced in an initialized project with `.eslintrc` file. This PR comes in parallel with https://github.com/react-native-community/react-native-cli/pull/229

[General] [Added] - Added `.eslintrc` file to generated template.
Pull Request resolved: https://github.com/facebook/react-native/pull/23901

Differential Revision: D14561084

Pulled By: cpojer

fbshipit-source-id: 6eb717bf03c45d83ae8a393e6a0abb79e1e2f915
2019-03-21 07:14:23 -07:00
Dulmandakh cb0d61d533 allow HTTP in debug builds (#24066)
Summary:
It allows HTTP connections in debug builds, and requires no configuration compared to previous/current solution where you need to edit config file to test on device.

Consulted with Salakar about this.

[Android] [Changed] - Allow HTTP in debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/24066

Differential Revision: D14540255

Pulled By: cpojer

fbshipit-source-id: f1239154c27c36c21c9b080a826f8b1d0eb0fc7d
2019-03-20 08:57:21 -07:00
Dulmandakh f49f1812ed land androidx in gradle (#24014)
Summary:
Use AndroidX in ReactAndroid/build.gradle, and remove androidx dependency from template and RNTester app because it's already exposed/exported from ReactAndroid.

[Android] [Changed] - Land AndroidX in gradle
Pull Request resolved: https://github.com/facebook/react-native/pull/24014

Differential Revision: D14508774

Pulled By: mdvacca

fbshipit-source-id: c96b97876571a5a7f2b400dd29188cfdf1f84a4c
2019-03-18 13:37:17 -07:00
Jan Kassens 8b206cab82 remove $FlowFixedInNextDeploy
Summary:
This gets completely rid of this flow ignore. The flow team is using the version
aware `$FlowFixMe` now and the only instance of this used was on www dating back
to 2016: D3235864

My intention here was to slightly simplify the flowconfigs.

Reviewed By: gabelevi

Differential Revision: D14494167

fbshipit-source-id: 0fab176ce326007ac45b47691378812c74a523e6
2019-03-18 13:32:28 -07:00
Marshall Roch 5613aa8948 flow v0.95
Summary: 0.95 has a more accurate definition of JSON.stringify which could return void.

Reviewed By: dsainati1

Differential Revision: D14494286

fbshipit-source-id: 6cf9cb5889b4078548665bc66fe899a266c689ce
2019-03-16 09:12:27 -07:00
Frieder Bluemle 7b44fe56ff Fix Info.plist templates to prevent parse error (#23924)
Summary:
I ran into a build error when `xcodebuild` would invoke a custom script (in my case `sentry-cli`):

```
error: Could not parse Info.plist file
  caused by: invalid data
```

Upon further investigation it turned out the parse error was **caused by a comment**, and I found some other oddities with the default `Info.plist` template files:

- The problematic comment is a **dead link** (website does not exist)
- The main Info.plist contains a **duplicate entry** for `NSLocationWhenInUseUsageDescription`
- Some entries are _reordered_ and the comment is removed when modifying/saving the file in Xcode

This PR fixes these inconsistencies, unnecessary customizations, and potential sources of errors.

[iOS] [Fixed] - Fix Info.plist templates to prevent parse error
Pull Request resolved: https://github.com/facebook/react-native/pull/23924

Differential Revision: D14477557

Pulled By: cpojer

fbshipit-source-id: 6d734c5aa3b800f05394db189e8d8db63be8e353
2019-03-15 03:40:20 -07:00
zhongwuzw 4aa731ae76 Fixed template build gradle error on x86_64 (#23897)
Summary:
Fixes #23893 . Fixes x86_64 apk build.

[Android] [Fixed] - Fixed template build gradle error on x86_64
Pull Request resolved: https://github.com/facebook/react-native/pull/23897

Differential Revision: D14459720

Pulled By: hramos

fbshipit-source-id: e78ac06771736915ff6592ecf5310b536d425ef4
2019-03-14 17:27:40 -07:00
Dulmandakh d752446b23 bump Gradle Android Plugin to 3.3.2 (#23854)
Summary:
Gradle Android  Plugin version 3.3.2 includes many fixes and improvements.

[Android] [Changed] - bump Gradle Android Plugin to 3.3.2
Pull Request resolved: https://github.com/facebook/react-native/pull/23854

Reviewed By: cpojer

Differential Revision: D14422827

Pulled By: hramos

fbshipit-source-id: 0c8b70f522c9b9caa023991f3c20928a2fbb76d3
2019-03-13 09:45:54 -07:00
George Zahariev 35d2dfcabf Deploy 0.94 to xplat
Summary:
Update Flow version in xplat (https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js)

allow-large-files
bypass-lint

Reviewed By: nmote

Differential Revision: D14317820

fbshipit-source-id: 07ec22c0745321db036f4e10a502009a4b640652
2019-03-06 14:57:30 -08:00
Dulmandakh 4a5266c1e0 bump android gradle plugin to 3.3.1 (#23598)
Summary:
Bump android gradle plugin to 3.3.1

[Android] [Changed] - Bump android Gradle plugin to 3.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23598

Differential Revision: D14185571

Pulled By: mdvacca

fbshipit-source-id: 30d353b42acfea3788da5c6876cf1d6d133f4a85
2019-02-22 10:22:47 -08:00
Dulmandakh b4017a9923 bump gradle to 5.0, android gradle plugin to 3.3.1 (#23324)
Summary:
This PR bumps gradle to 5.0, which includes Kotlin DSL 1.0, and android gradle plugin to 3.3.1, which includes includes various bug fixes and performance improvements. Also Gradle 5.x requires Java 8.

This is preparation for Kotlin DSL migration.

[Android] [Changed] - Bump Gradle to 5.0

Pull Request resolved: https://github.com/facebook/react-native/pull/23324

Reviewed By: mdvacca

Differential Revision: D14028563

Pulled By: hramos

fbshipit-source-id: 61fe1a2d4ea5707d6f07945acbd950f852420e13
2019-02-20 11:42:54 -08:00
Dulmandakh 84a2fb0a4a SYSTEM_ALERT_WINDOW only in debug builds (#23504)
Summary:
SYSTEM_ALERT_WINDOW permission is used only for debug builds to show draw overlay views or show warnings/errors. This permissions is unused in release builds, and there is an issue regarding removing unused permissions on Android build https://github.com/facebook/react-native/issues/5886#issuecomment-464495388. This PR removes SYSTEM_ALERT_WINDOW from all builds bug debug.

[Android] [Changed] - SYSTEM_ALERT_WINDOW permissions available only in debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/23504

Differential Revision: D14123045

Pulled By: cpojer

fbshipit-source-id: 68829a774ff23c7cb2721076a9d3870405f48fea
2019-02-18 02:39:55 -08:00
Daniel Sainati 8da1f1149f deploy 0.93
Summary:
upgrades flow version

allow-large-files
bypass-lint

Reviewed By: nmote

Differential Revision: D14095305

fbshipit-source-id: 000b3b2e085f673bc443fc8bc1b3aae1b42df0e9
2019-02-15 12:04:32 -08:00
Dulmandakh da5b5d2fa1 bump android plugin to 3.3.1 (#23473)
Summary:
Bump Android Plugin to 3.3.1, with many bug fixes and performance improvements. Split the change from https://github.com/facebook/react-native/pull/23324 to make cherry-pick easy to 0.59 branch.

[Android] [Changed] - bump Android Plugin to 3.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23473

Differential Revision: D14099741

Pulled By: cpojer

fbshipit-source-id: 7491c49cd2467f1bb8776345bdda2ab9cea11c06
2019-02-15 02:50:06 -08:00
Dulmandakh 19492b730b react_native_config available to all Android versions (#23470)
Summary:
Move react_native_config.xml so that it's available to all Android versions, and fixes https://github.com/facebook/react-native/issues/23445. It's my bad, I should've tested previous change on multiple versions of Android.

[Android] [Changed] - Fix network security
Pull Request resolved: https://github.com/facebook/react-native/pull/23470

Differential Revision: D14099612

Pulled By: cpojer

fbshipit-source-id: 15b5e5f575de8033bbfd524d9ad2aa0e22daa813
2019-02-15 02:29:32 -08:00
Dulmandakh 57f444bd8a bump targetSdkVersion to 28 (#23431)
Summary:
Bump targetSdkVersion to 28

[Android] [Changed] - Bump targetSdkVersion to 28
Pull Request resolved: https://github.com/facebook/react-native/pull/23431

Differential Revision: D14065177

Pulled By: cpojer

fbshipit-source-id: a161d1d385b7b40ec93d70851e5a41baeb58f830
2019-02-13 07:13:19 -08:00
Dulmandakh 5747094532 improve Android Network Security config (#23429)
Summary:
This PR is trying to improve Android Network Security configuration introduced in 84572c4051. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

[Android] [Changed] -  Android Network Security configuration.
Pull Request resolved: https://github.com/facebook/react-native/pull/23429

Differential Revision: D14065124

Pulled By: cpojer

fbshipit-source-id: 0f5ac5addbe968ed7e5cb57f356e2572de2690a8
2019-02-13 06:38:29 -08:00
Andres Suarez aefb05941a Exclude RN templates from internal linters
Reviewed By: cpojer

Differential Revision: D14032447

fbshipit-source-id: b36c2e01b10341077bec7fca43a35e980e9c13ce
2019-02-11 15:42:17 -08:00
zhongwuzw cdd615136f Revert RCTRootView's backgroundColor to white (#23358)
Summary:
Fixes #23314 , the change came from #20945 , its purpose is to fix orientation change issue in HelloWord template, but I think it's just a trick, to make rootView's backgroundColor the same as window backgroundColor, the orientation issue seems related to [UIManager setAvailableSize:forRootView:](d2fc19f4aa/React/Modules/RCTUIManager.m (L343)) async layout things.

[iOS] [Fixed] - Revert RCTRootView's backgroundColor to white.
Pull Request resolved: https://github.com/facebook/react-native/pull/23358

Differential Revision: D14030666

Pulled By: cpojer

fbshipit-source-id: 7c9a45f03b87c3be0f2b7c64a3c837c6ae14af3e
2019-02-11 14:31:26 -08:00
Christoph Nakazawa ae11993d0f Add a Metro configuration with inline require/import
Summary:
We have been working on turning on inline-requires/imports and RAM bundles for React Native for a long time, however we have not made real progress on making it the default, even though it is easy. In this diff I am adding a Metro configuration to a new React Native template with the defaults set to `false` (off). This means that everyone creating a new project now or upgrading from an existing one will receive this template file. In a future release of React Native we will turn this setting on to default. From then on, new projects will be using inline-requires while existing ones that are upgrading can make an explicit choice when they are diffing their template and the latest version of it.

This approach was outlined in https://github.com/react-native-community/discussions-and-proposals/blob/master/core-meetings/2018-09-metro-meeting.md#actions-that-will-be-taken

Note: There is a weird lint-ignore thing in there like in the other template files. I'm working on getting rid of that separately.

Reviewed By: TheSavior

Differential Revision: D14030370

fbshipit-source-id: cf4c5551c795f2ea0fd1b731b352489f04b8c22e
2019-02-11 14:17:54 -08:00
Dulmandakh cf52ab561d add back buildToolsVersion to build.gradle (#23316)
Summary:
add back buildToolsVersion to build.gradle, because many third-party modules depend on it. The lack of this info causing issues in 0.58.

[Android] [Changed] - add back buildToolsVersion to template
Pull Request resolved: https://github.com/facebook/react-native/pull/23316

Differential Revision: D13974264

Pulled By: hramos

fbshipit-source-id: 058fc5617196d6481d1b69d2420c8b2be9cf4f81
2019-02-06 11:15:54 -08:00
Dulmandakh 38eb2a70af Enable Java8 (#23295)
Summary:
Running *lint* on RN found that there are some Java 8 features used without specifying Java 8 compatibility in projects. This PR adds Java 8 compatibility and fixes errors caused by Java 8 feature use. I suspend that it may be cause of many failures on older Androids, but also found that many modules/packages switched to and require Java 8.

```java
../../src/main/java/com/facebook/react/devsupport/BundleDownloader.java:167: Try-with-resources requires API level 19 (current min is 16)
../../src/main/java/com/facebook/react/devsupport/DevServerHelper.java:658: Try-with-resources requires API level 19 (current min is 16)
```

For more information https://developer.android.com/studio/write/java8-support

[Android] [Changed] - Enable Java 8
Pull Request resolved: https://github.com/facebook/react-native/pull/23295

Differential Revision: D13959096

Pulled By: cpojer

fbshipit-source-id: 0bfd0565b61a132906cf35ee55b4afcf5450f7cb
2019-02-05 10:18:27 -08:00
Gabe Levi ffc9908bef Back out "[Flow] Set wait_for_recheck=true to work around crash"
Summary: Now that Flow v0.92.1 is deployed, we can backout {D13942380}, which was a temporary fix.

Reviewed By: avikchaudhuri

Differential Revision: D13952515

fbshipit-source-id: d423379a03fff09316aa499e1152b410a1bb4178
2019-02-04 17:41:04 -08:00
Gabe Levi c599625df0 Set wait_for_recheck=true to work around crash
Summary: Flow v0.92 is crashing sometimes after a save when run through Nuclide. This fixes the issue temporarily until we can push a Flow v0.92.1

Reviewed By: samwgoldman

Differential Revision: D13942380

fbshipit-source-id: f7bf2aef0aab90980bbb786d89710f399c9427d5
2019-02-04 10:11:32 -08:00
Paco Estevez Garcia 5ee738659b Update xplat/js to 0.92.0
Summary: This diff updates `xplat/js` to Flow 0.92.0

Reviewed By: panagosg7

Differential Revision: D13917049

fbshipit-source-id: 69613182badecd4c23aef25b79f7380d5604a13b
2019-02-01 09:35:42 -08:00
Salakar 84572c4051 apply Network Security Config file (fixes #22375) (part 2 of #23105) (#23135)
Summary:
This is a follow-up PR for https://github.com/facebook/react-native/pull/23105 - as mentioned on discord.

 ---

This PR applies the network security config for the RN template project only. New RN projects started with the updated template will be able to connect to the packager on builds built with Android API 28 & above.

See https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted for more information about this newly required config, specifically:

![image](https://user-images.githubusercontent.com/5347038/52124287-b3de2580-2620-11e9-958d-bc2da15c6f01.png)

Changelog:
----------
[ANDROID] [Template] add Network Security Config file to allow access to packager via cleartext requests in Android API 28 and above. (fixes #22375)
Pull Request resolved: https://github.com/facebook/react-native/pull/23135

Differential Revision: D13917058

Pulled By: cpojer

fbshipit-source-id: 0e66f2cde712c1285d217e3625b73028c3770b65
2019-02-01 06:36:18 -08:00
Kacper Wiszczuk 5218932b13 fix: change template to work with jest (#23150)
Summary:
This change is required to make `yarn test` work in newly initialized project.
`Jest@23` doesn't play well with new babel, so we need to install `babel-core@^7.0.0-bridge.0` and change `.babelrc` to `babel.config.js` to make it work. This is a temporary change till `jest` releases stable `24` version.
Pull Request resolved: https://github.com/facebook/react-native/pull/23150

Differential Revision: D13811428

Pulled By: hramos

fbshipit-source-id: 8db6b9177cd31d4a1213fb44964b05f26982bdf2
2019-01-24 17:33:50 -08:00
Dulmandakh 5bbed43854 android support library 28.0.0 (#23109)
Summary:
Bump Android Support Library to 28.0.0. Therefore fix Android CI

Changelog:
----------
[Android] [Changed] - Bump Android Support Library to 28.0.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/23109

Differential Revision: D13779835

Pulled By: mdvacca

fbshipit-source-id: 7645ffe2c04ca81424b2f9cfa43dc4ec30c50e25
2019-01-23 02:22:00 -08:00
Jordan Brown be51dbc214 @allow-large-files [flow] Bump xplat/js to 0.91 and remove unused suppressions
Summary: Upgrades flow in xplat/js to 0.91. This diff also adds and removes suppressions.

Reviewed By: samwgoldman

Differential Revision: D13720697

fbshipit-source-id: 1bf8830ce286db92277476a2d2404cf0c0dddca2
2019-01-18 14:47:53 -08:00
Janic Duplessis 68b0d4d510 Use RCTBridgeDelegate in the new project template (#23031)
Summary:
The main goal of this change is to fix an issue that happens on iOS when the native app starts before the packager server is available which causes app reloads to fail continually until the app is restarted.

What happens is that with the current setup we call `RCTBundleURLProvider#jsBundleURLForBundleRoot` once in `AppDelegate#didFinishLaunchingWithOptions`. If at that point the packager server is not running yet it will return nil (expected behaviour) and that will be passed to the bridge constructor. Subsequent reloads will keep trying to load this nil bundle url since it has no way to ask `RCTBundleURLProvider` for a new url now that the packager is actually running.

We can fix this by using `RCTBridgeDelegate` instead which is a lot more flexible. Instead of passing the bundle url at construction time it will call the `sourceURLForBridge` method each time the bridge is reloaded. This means that even if the packager is not running yet and that `RCTBundleURLProvider` returns nil for the first invocation, subsequent reloads will call `RCTBundleURLProvider` again for a new value.

Changelog:
----------

[iOS] [Added] - Use RCTBridgeDelegate in the new project template
Pull Request resolved: https://github.com/facebook/react-native/pull/23031

Differential Revision: D13710048

Pulled By: cpojer

fbshipit-source-id: 0059c5c962d508737ae410a82315c11ad305efe8
2019-01-17 02:31:51 -08:00
Sam Goldman 2c7895706d @allow-large-files Deploy Flow v0.90 to xplat/js
Reviewed By: dsainati1

Differential Revision: D13708161

fbshipit-source-id: b83dab505f2739bf4bc5077936e71ebd1800eaf4
2019-01-16 21:55:02 -08:00
Dulmandakh b98964ba39 bump android gradle plugin to 3.3.0 (#22988)
Summary:
Android Gradle Plugin 3.3.0 add many improvements in compile time speed, but also enable R8 shrinker.

Changelog:
----------

[Android] [Changed] - Bump Android Gradle Plugin to 3.3.0
Pull Request resolved: https://github.com/facebook/react-native/pull/22988

Differential Revision: D13676104

Pulled By: hramos

fbshipit-source-id: 5a3834e64816222ee8a4aa6682c07ac6857fc5f6
2019-01-15 14:39:34 -08:00
Héctor Ramos 700c713671 Bump to Android Build Tools 28.0.3, Gradle 4.10.2, Gradle Plugin 3.2.1
Summary: Bump Android Build Tools to Version 28.0.3, Gradle to 4.10.2, and the Android Gradle Plugin to 3.2.1.

Reviewed By: mdvacca

Differential Revision: D13631120

fbshipit-source-id: 709aa25a7a8e1ff0bfc0a969ba6e7cd92850bc0f
2019-01-11 12:24:59 -08:00
Daniel Zlotin f3e5cce474 Use new JavaScriptCore from npm (#22231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/22231

- Use clang instead of the deprecated gcc
- Use libc++ instead of the deprecated gnustl
- Updated gradle and android plugin version
- Fixed missing arch in local-cli template
- `clean` task should now always succeed
- `clean` task deletes build artifacts
- No need to specify buildToolsVersion. It's derived.
- Elvis operator for more readable code
Pull Request resolved: https://github.com/facebook/react-native/pull/22263

Reviewed By: hramos

Differential Revision: D13004499

Pulled By: DanielZlotin

fbshipit-source-id: da54bb744cedb4c6f3bda590f8c25d0ad64086ef
2018-12-27 14:51:03 -08:00
Nicolas Charpentier 5d06c7495d Replace our local types by flow-typed (#20320)
Summary:
These comments were confusing since we don't use flow-typed.

cc bvaughn.

I have replaced our local types by flow-typed, removed metro custom stub and deleted `flow-github` directory.

As result, createReactClass, PropTypes and Metro types won't be distributed to RN users. If you need it, you should relay on flow-typed.
Pull Request resolved: https://github.com/facebook/react-native/pull/20320

Reviewed By: TheSavior

Differential Revision: D13517157

Pulled By: rickhanlonii

fbshipit-source-id: e52c0b6114114a706f6152b2031c600e3dece0d2
2018-12-20 04:42:34 -08:00
gengjiawen 63ebbd6bfc add basic signature in template (#22665)
Summary:
https://github.com/react-native-community/react-native-cli/issues/38.
add basic signature in template.
Signature file is the same as RNTester.
pass all current ci.
 [Android] [Feature] - add basic signature in template
Pull Request resolved: https://github.com/facebook/react-native/pull/22665

Differential Revision: D13490480

Pulled By: hramos

fbshipit-source-id: 9d0ca4debde2ddbde0d4a611b9b41fc24235314a
2018-12-17 13:34:36 -08:00
glevi@fb.com 24f8d4d3db Deploy v0.89
Reviewed By: jbrown215

Differential Revision: D13457087

fbshipit-source-id: 9f01371ae3515990c5595f1eb2361174050066b8
2018-12-14 13:57:50 -08:00
Nat Mote aaa4a38fbc Upgrade to Flow v0.88.0
Summary:
allow-large-files

https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

Reviewed By: samwgoldman

Differential Revision: D13418170

fbshipit-source-id: 91ab0d2788c1061b8c81a39f8a017eedea48abe2
2018-12-11 20:01:00 -08:00
Christoph Nakazawa 896bb8a21e Move react-native template
Summary: This diff moves the React Native template from `local-cli/templates/HelloWorld` to `template`. Keeping it in the react-native repo will allow us to make changes to the template and version it together with react-native, instead of moving it out into a separate repo and trying to keep the template in sync with RN.

Reviewed By: TheSavior

Differential Revision: D13372949

fbshipit-source-id: e68e267b4dcf6384535d7b48fc11e297a12e9676
2018-12-07 07:49:19 -08:00