Summary:
The default application requires Kotlin version that is not supported by the Gradle plugin (should be at least `1.3.10`). However, instead of upgrading, we should remove it entirely. Here's why.
This commit 29d3dfbd19 introduced Detox for RNTester Android application.
Since the commit doesn't mention Detox for the default application and there are no Detox tests present by default in the default application, I believe that this addition was performed by a mistake.
The best way is to remove Kotlin from the default template. This step is described in the Detox documentation and all users that are integrating Detox will be asked to perform it anyway. No need to do it for them.
## Changelog
[ANDROID] [INTERNAL] - remove Kotlin from the default template
Pull Request resolved: https://github.com/facebook/react-native/pull/28626
Test Plan: Building a brand new project with `master` should work
Differential Revision: D21388961
Pulled By: shergin
fbshipit-source-id: 92666aa67f92b29f4e7f9c036b332bd058cdd49e
Summary: Changelog: [Changed][General] Update react-native-community/eslint-config to 1.1.0, adding the new color rule
Reviewed By: rickhanlonii
Differential Revision: D21342153
fbshipit-source-id: ac1367353d4d3e69b6df29dc16f9fcb60cde3519
Summary:
As described in DevSettingsActivity, it should be added to the apps
debug/ instead of main/ manifest.
## Changelog
Android Changed - Move DevSettingsActivity from `main` to `debug` manifest
Pull Request resolved: https://github.com/facebook/react-native/pull/28770
Test Plan: Tested locally by building example app
Differential Revision: D21281922
Pulled By: shergin
fbshipit-source-id: ec4dc7c0ac54367aa38cca5b4146ef71cf18b73b
Summary:
This PR adds support for the dark mode and dynamic theme changing to the default App template and to the related `NewAppScreen` components. Using `useColorScheme` hook forced me to refactor a bit main `App.js` file, but I think those changes are step in the right direction according to way in which React Native is used in larger apps, so new `Section` component has been extracted to reduce code redundancy/repetition inside `App`.
Additional color `darker` has been added to the `Colors` statics from `NewAppScreen` because `dark` was too bright for the Dark Mode backgrounds.
Also main `StoryBoard` on iOS has been updated to use theme based colors instead of static or hardcoded ones. There was also an unused, empty `Label` which I have removed.
~~I'm not so much experienced with Android. If someone could also update Android splash screen (if Android requires such change) it will be nice. I want to look at this later using simulator.~~
> I have updated the Android splash screen and tested this change on the Android emulator.
If you have any comment or corrections feel free to post them out, I would like to put more work into this PR if it's needed. Dark Mode this days is a part of near every OS, so it could be considered as a standard feature. I hope those changes helps people which struggle with the basic theming implementation (+ there is now an example of hook and `children` prop usage in the template).
## Changelog
[Internal] [Added] - Add dark mode support to the default app template
Pull Request resolved: https://github.com/facebook/react-native/pull/28711
Test Plan:
I have tested the App from the template on the iOS device and in Android emulator with RN `0.63.0-rc`.
Screen recording on iOS (demonstarates both modes, both splash screens and transition):
![ezgif-6-e24ee8e839c9](https://user-images.githubusercontent.com/719641/80025923-a04b0300-84e1-11ea-824a-b4363db48892.gif)
Screenshot of iOS app in Dark Mode:
![IMG_6542](https://user-images.githubusercontent.com/719641/79885748-c98f6480-83f7-11ea-8c73-1351a721d5d6.PNG)
Screenshot of iOS app splash screen in Dark Mode:
![IMG_6544](https://user-images.githubusercontent.com/719641/79960431-add29f80-8485-11ea-985c-b39176024ffa.PNG)
Screenshot of Android app in the emulator:
![Screenshot_1587566100](https://user-images.githubusercontent.com/719641/79995454-88f72000-84b7-11ea-810b-dfb70de03c2a.png)
Differential Revision: D21236148
Pulled By: shergin
fbshipit-source-id: 0c8a9534d3a3f8f8099af939243a889ac4df6cda
Summary:
According to the [0.62 blog post](https://reactnative.dev/blog/2020/03/26/version-0.62), Apple TV support has moved to react-native-tvos.
The template still contains info.plist for tvOS, so I've removed them for future releases.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Removed] - Removed tvOS related files from the template
Pull Request resolved: https://github.com/facebook/react-native/pull/28706
Test Plan: run `react-native init TestTemplate` and remove tvOS related files and verified that iOS and Android runs on emulator.
Differential Revision: D21182211
Pulled By: hramos
fbshipit-source-id: 41d2e19e5158d7ec103a37c01a93cf511fc1e4c9
Summary:
Removes the post install step for Flipper, as the latest version of YogaKit is compatible with swift 5.
cc alloy
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Flipper] [Template] - Remove the post install step for Flipper
Pull Request resolved: https://github.com/facebook/react-native/pull/28651
Test Plan: Tested a newly created RN app without post install step and it built successfully.
Reviewed By: passy
Differential Revision: D21064653
Pulled By: priteshrnandgaonkar
fbshipit-source-id: da56d0754d918e30a0ebe480c77590f0139d48ac
Summary:
> Starting April 30, 2020, all apps submitted to the App Store must use an Xcode storyboard to provide the app’s launch screen and all iPhone apps must support all iPhone screens.
Updated iOS Launch screen as per [App Store policy change](https://developer.apple.com/news/?id=03042020b).
Community discussion: https://github.com/react-native-community/discussions-and-proposals/issues/209
## Changelog
Changed iOS Launch Screen from a `xib` to `storyboard`. The `LaunchScreen.xib` file has been replaced with `LaunchScreen.storyboard`. Xcode automatically picks up the new Launch Screen no additional change is required.
[iOS] [Deleted] - Deleted LaunchScreen.xib
[iOS] [Added] - Added LaunchScreen.storyboard
Pull Request resolved: https://github.com/facebook/react-native/pull/28239
Test Plan: Build the Xcode project under `template/iOS` and verify that the new launch screen is identical to the previous one.
Reviewed By: cpojer
Differential Revision: D20408892
Pulled By: hramos
fbshipit-source-id: 9c38df58d1304088a23f3d73e0fbd87675804f1a
Summary:
```
Welcome to Gradle 6.3!
Here are the highlights of this release:
- Java 14 support
- Improved error messages for unexpected failures
For more details see https://docs.gradle.org/6.3/release-notes.html
```
## Changelog
[Android] [Changed] - Update Gradle Wrapper to 6.3
Pull Request resolved: https://github.com/facebook/react-native/pull/28173
Test Plan: Build project
Differential Revision: D20958894
Pulled By: mdvacca
fbshipit-source-id: a02ab0eb6aff97148c12b844fdd1f9f2617ae53f
Summary:
Recently, a default Podfile has been modified to not contain all the React Native pods, but use a helper method `use_react_native!`.
While this is great, it assumes a hardcoded path of `../node_modules/react-native` to be always the correct location of the React Native.
d4d8887b50/scripts/autolink-ios.rb (L7-L9)
Unfortunately, due to the way Ruby works, this completely hides the path away from the users.
Before, they could have seen the wrong path explicitly in a Podfile and knew to update it to resolve path-related issues.
With the current version in `master`, I can see a lot of issues where developers wonder how to resolve the path issues and how to pass the path itself.
4118d79826/template/ios/Podfile (L5-L10)
This PR uses React Native CLI configuration (that is already used to link 3rd party dependencies) to explicitly define the correct path to the React Native.
As a result, we don't have to change the paths here whether we're running monorepo or not.
## Changelog
[IOS] [INTERNAL] - Always provide an explicit path to React Native
Pull Request resolved: https://github.com/facebook/react-native/pull/28572
Differential Revision: D20945194
Pulled By: TheSavior
fbshipit-source-id: 010f9754f2ed78ef62fd52f4d201f296f5af6d27
Summary:
Updating the eslint config and metro-preset used in project template.
## Changelog
[General] [Changed] - Upgrade eslint-config and metro-preset in project template
Pull Request resolved: https://github.com/facebook/react-native/pull/28443
Test Plan:
- Start new project with `npx react-native init TestLint`
- upgrade lint and metro-config
- run lint and start up emulator on iOS and android
Reviewed By: cpojer
Differential Revision: D20771048
Pulled By: hramos
fbshipit-source-id: a6d387b8687cee348681bcb10d22c7e3de291ed7
Summary:
This just updates the `react` package to the latest stable version. We updated it to experimental internally earlier so this brings the open source version to the latest before the branch cut. This doesn't include any breaking changes.
Changelog:
[General][Changed] - Update to React 16.13.1
Reviewed By: cpojer
Differential Revision: D20642909
fbshipit-source-id: 68a4c74bfe72f1abdb33b0b9071a4f4e8e568318
Summary:
Upgrades Flipper to 0.33.1 for both the Android template and RNTester.
## Changelog
[Android] [Changed] - Upgrade Flipper dependency to 0.33.1
Pull Request resolved: https://github.com/facebook/react-native/pull/28275
Test Plan: Still trying to figure out how to get my Gradle setup working again. Until then, CI.
Reviewed By: cpojer, mweststrate
Differential Revision: D20369480
Pulled By: TheSavior
fbshipit-source-id: 048c944819168a352214349f6a83407a587479c9
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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