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