Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47738
- updating targetSdk to 35 for RN Android and helloworld
- **Note:** `tagetSdk` of RN Android does not have effect on the app's targetSdk. App can set `targetSdk` regardless of what RN targetSdk is. Updating the targetSdk just signals that RN Android has been tested with targetSdk 35 and apps can choose to support lower targetSdk as needed.
Changelog:
[Android][Changed] updating targetSdk to 35 (apps can still choose their own targetSdk regardless of RN version)
Reviewed By: NickGerleman
Differential Revision: D66209381
fbshipit-source-id: 2f26e8f605a383ff662e4b1d65611f186a7d7979
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47761
When breaking the last dependency, we created the `RCTApDependencyProvider` in the Codegen pod.
This is not an issue per sè. The problem comes in with the new template in Swift: ReactCodegen contains some headers with some C++ code that Swift can't really process.
That's why most libraries started failing in jobs like [this one](https://github.com/facebook/react-native/actions/runs/11906196751/job/33177904733): the template app was not able to load the `ReactCodegen` pod in the Swift app delegate.
Given that the app delegate only have to actually load the RCTAppDependencyProvider, I extracted that class in its own pod: ReactAppDependencyProvider.
The name of the pod does not follow the React-RCTXXX structure because that will create issues with the import statements and the `use_frameworks!` use case.
> [!NOTE]
> We need to update the template and change the `import ReactCodegen` to `import ReactAppDependencyProvider`
## Changelog:
[iOS][Added] - Extract RCTAppDependencyProvider in the ReactAppDependencyProvider pod
Reviewed By: blakef
Differential Revision: D66241941
fbshipit-source-id: 6b888109c65d9560fff322ec84a16da78fbcd64b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47651
## This Change:
This change uses in the App's AppDelegate the newly generated `RCTAppDependencyProvider`, passing it to the `RCTAppDelegate`.
This change needs to be applied also to the template, when this stack lands.
## Context
React Native has a last temporal dependency on Codegen in the React-RCTAppDelegate pod.
The RCTAppDelegate has the responsibility to provide various dependencies to react native, like third party components and various modules. ReactCodegen is generated when the user create the project, while React-RCTAppDelegate eists in React Native itself.
This dependency means that we cannot prepare prebuilt for iOS for React Native because when we would have to create prebuilds, we would need the React Codegen, but we can't create a React codegen package that will fit all the apps, because React Codegen can contains App Specific modules and components and apps might have different dependencies.
## Changelog:
[iOS][Added] - Pass the `RCTAppDependencyProvider` to the `RCTAppDelegate`
Reviewed By: dmytrorykun
Differential Revision: D66074475
fbshipit-source-id: 93bf500fe37f115352ebd49d3d56955cbaeeea72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47520
Right now, when a 3p library needs to register a component in the component system, we have to crawl the library to try and get the mappng, best effort.
With this approach, we are enriching the `codegenConfig` property to allow library developers to define the mapping themselves.
For example:
```json
//...
"codegenConfig": {
//..
"ios": {
"componentProvider": {
"RNTMyNativeView": "RNTMyNativeViewComponentView"
}
}
},
```
means that the JS component `RNTMyNativeView` will be mapped to the `RNTMyNativeViewComponentView` class.
This also work for local apps, and it warns the users about what libraries are using the deprecated approach, so they can open an issue or a PR to those libraries.
## Changelog:
[iOS][Added] - Allow 3p developers to specify the association between components and classes in Fabric
Reviewed By: dmytrorykun
Differential Revision: D65666061
fbshipit-source-id: 692e753635873ff9260e131d2d18ed226b2378c2
Summary:
While we're waiting for 19 stable, let's bring main back to 18.3.1 ahead of the 0.77 branch cut. We'll land this change just after 19 stable lands.
This is a cherry pick of b93b378fa0 which landed in 0.76 already
bypass-github-export-checks
## Changelog:
[INTERNAL] - Revert React 19RC to React 18.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/47380
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D65430775
Pulled By: cortinico
fbshipit-source-id: f0f211754c8ffe5d037fd299e4de52c29d1d7913
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47237
The Xcodeproj gem has been released yesterday to version 1.26.0 and it broke the CI pipeline of react native.
This should fix the issue
## Changelog
[Internal] - Pin Xcodeproj gem to 1.26.0
Reviewed By: blakef
Differential Revision: D65057797
fbshipit-source-id: f4035a1d3c75dd4140eb1646ab2aa0ccb08fb16b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47109
Fixes the `lint/sort-imports` errors that are now surfaced after fixing the lint configuration.
For a couple files, I added lint suppressions instead because the unsorted import ordering is important due to interleaved calls with side effects.
Changelog:
[Internal]
Reviewed By: GijsWeterings
Differential Revision: D64569485
fbshipit-source-id: 26415d792e2b9efe08c05d1436f723faae549882
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46955
This is a major bump of Kotlin. It comes with no breaking changes for the Kotlin API, but there are several new warnigns that I had to fix.
Most importantly several `override` methods that are overriding Deprecated API, also need to be deprecated as well in Kotlin.
Changelog:
[Android] [Changed] - Bump Kotlin 1.9.x to 2.0.x
Reviewed By: tdn120
Differential Revision: D64179842
fbshipit-source-id: 295ab2636ce9f9bb04e9d8c7ed27d9f8a1a64338
Summary:
this PR fixes a few small ESLint issues that were showing up under PR diffs.
## Changelog:
[INTERNAL] [FIXED] - Fix various ESLint issues
Pull Request resolved: https://github.com/facebook/react-native/pull/46379
Test Plan: ran JS tests + linter; all passing
Reviewed By: cipolleschi
Differential Revision: D62385788
Pulled By: NickGerleman
fbshipit-source-id: b33d7ade4696bbaed2ac1a3fc2e0b3dff9bb04b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46462
While adding D62583337, I noticed that `react-native` doesn't specify `babel-jest` as a dependency, despite referencing it in the included `jest-preset.js` — instead this would need to be installed by the template/project.
If we want to change this in future, we should consider a separate `react-native/jest-preset` package. However, I strongly believe this is the right location for this dependency: installing `react-native` = all parts of it work.
(Note that in the React Native monorepo, we are using `dependencies` for both dev and runtime deps in packages.)
Changelog: [Internal]
allow-executable-binary
## allow-executable-binary: Bypassed as this is a managed JavaScript dependency that is pre-existing in other parts of the codebase
Reviewed By: robhogan
Differential Revision: D62583665
fbshipit-source-id: 8bbcc8736e2740e45793d7b7e225ccfd1ca7f898
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46461
This bumps SoLoader to 0.12.1 inside React Native and cleans up the extra
`com.facebook.soloader.enabled` metadata which are not necessary anymore.
Changelog:
[Internal] [Changed] - Bump SoLoader to 0.12.1 and remove unnecessary extra manifest metadata
Reviewed By: cipolleschi
Differential Revision: D62581188
fbshipit-source-id: ff990c0af1f0f51070037fcb4c7c13fbe6bae234
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46459
After the SoLoader 0.12.0 bump I've noticed RNTester is instacrashing due to us not having enabled it
explicitely in the Manifest:
Changelog:
[Internal] [Changed] - Unblock RNTester instacrashing due to SoLoader not being enabled
Reviewed By: cipolleschi
Differential Revision: D62580751
fbshipit-source-id: 3b291e7f82daf1a6bd61bc9588c2d49a389801ef
Summary:
This change bumps the React Native version in main to 0.77
bypass-github-export-checks
## Changelog:
[General][Changed] - Bump main to 0.77-main
## Facebook:
generated by running `js1 publish react-native 0.77.0-main`
Reviewed By: cortinico
Differential Revision: D62575939
fbshipit-source-id: 6d239fca2eed6cfe51f8c37f78d8dc8730c18b8c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46422
Stubbing SoLoader comes with a couple of breaking changes (e.g. users in OSS are using `com.facebook.common.logging.FLog` which is exposed by Fresco).
In order to reduce those breaking changes, here I'm moving React Native to use SoLoader 0.12.0.
This new version comes with a constructor that accepts a MergedSoMapping implementation which we provide only for OSS apps.
Please note that the CI on this Diff will be red till SoLoader 0.12.0 releases.
Changelog:
[Internal] [Changed] - Do not stub SoLoader and use version 0.12.0
Reviewed By: cipolleschi
Differential Revision: D62447566
fbshipit-source-id: 6ff38799ed0c9f40cf3ab84be8a05979def63dc2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46399
This is a patch release for Gradle. Let's include it inside main/0.76.
Changelog:
[Android] [Changed] - Gradle to 8.10.1
Reviewed By: tdn120
Differential Revision: D62377887
fbshipit-source-id: e8a5acaa48c15c9a12a09504c33c2a0d2834d92c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46295
X-link: https://github.com/facebook/metro/pull/1343
Updated all **babel** packages in all `package.json` across the repo and ran `npx yarn-deduplicate yarn.lock --scopes babel`. Afterwards, fixed the following issues appearing as a result of that (squashed the following initially separate diffs to make this packages update work atomically):
### (D61336392) updated jest snapshot tests failing
### (D61336393) updated babel types and corrected typings accordingly
The latest babel 7 introduces the following features we need to adjust our types to:
* `JSXNamespacedName` is removed from valid `CallExpression` args ([PR](https://github.com/babel/babel/pull/16421))
* `JSXNamespacedName` is used for namespaced XML properties in things like `<div namespace:name="value">`, but `fn(namespace:name)` doesn't make any sense.
* Dynamic imports are enabled behind a new flag `createImportExpressions` ([PR](https://github.com/babel/babel/pull/15682)), introducing calls such as `import(foo, options)`. These complicate the expected values passed to `import` to be more than just strings.
* Since these are behind a flag that is not expected to be enabled, we can throw an error for now and whoever uses it can add a support to it if needed later.
### Added a new metro ENV ignore
`BROWSERSLIST_ROOT_PATH` is set to `""` explicitly in `xplat/js/BUCK`
and then ignored in
`js/tools/metro-buck-transform-worker/src/EnvVarAllowList.js`
Reviewed By: robhogan
Differential Revision: D61543660
fbshipit-source-id: abbcab72642cf6dc03eed5142eb78dbcc7f63a86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45905
- Updating minSdk to 24 before we do the update for the RN
Changelog: [Internal]
Reviewed By: blakef
Differential Revision: D60788291
fbshipit-source-id: d21d766159a04d79547e64fca802600279d08255
Summary:
This moves the `helloworld` app to build from the artifacts produced by build_npm_package so that we don't rebuild ReactNative Android from source 8 times.
It reduces build time of such jobs from 14mins to 4mins, resulting in 80mins of build time for every test_all run.
## Changelog:
[INTERNAL] - Move helloworld to build from artifacts on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/45517
Test Plan: CI
Reviewed By: blakef
Differential Revision: D59957613
Pulled By: cortinico
fbshipit-source-id: b6c4adcf804af6c8d2661cf56549d037e09aa2c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45407
This bumps to the latest minor of Gradle
Changelog:
[Android] [Changed] - Gradle to 8.9
Reviewed By: NickGerleman
Differential Revision: D59677575
fbshipit-source-id: 05b9afc6f32a9cd11461bc04522d1e522644867e
Summary:
Use the hard-coded config for Helloworld instead of assuming the community cli is there to generate a config, which we can no longer assume.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/45221
Test Plan:
This works in my local environment:
```
bundle exec pod install
```
and
```
./gradlew generateAutolinkingPackageList
```
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D59162715
Pulled By: blakef
fbshipit-source-id: 95ff2c3929f12ee0ecf468cb80d2df1281eb746e
Summary:
Accidentally shipped, removing.
## Changelog: [Internal]
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/45135
Reviewed By: christophpurrer
Differential Revision: D58950410
Pulled By: blakef
fbshipit-source-id: 7bda7278f918a1e50c25f86e461e19fe7e176c5c
Summary:
This PR uses a suggested solution from here: https://github.com/facebook/react-native/issues/42698 to allow users to use Cocoapods 1.15.2 which fixed issues regarding RN builds.
## Changelog:
[IOS] [FIXED] - Bump cocoapods version to 1.15.2 excluding 1.15.0, 1.15.1
Pull Request resolved: https://github.com/facebook/react-native/pull/45099
Test Plan: CI Green
Reviewed By: blakef
Differential Revision: D58863685
Pulled By: cipolleschi
fbshipit-source-id: 0128eb0cbf83e4a3d35addbae4c31e349775688c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44832
I'm renaming this folder as now we have 2 gradle plugins + we currently have
`package/react-native-gradle-plugin/react-native-gradle-plugin/` which is confusing so we can just call this folder `packages/gradle-plugin/`
to be consistent with the NPM package name
Changelog:
[Internal] [Changed] - packages/react-native-gradle-plugin/ -> packages/gradle-plugin/
Reviewed By: blakef
Differential Revision: D58284883
fbshipit-source-id: 5a7bb40a5d80f6fbab4ffb29e44107453f1013ec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44990
Upgrades React Native and Relay to depend on React 19, which is currently published as release candidates. This is in preparation for React Native 0.75.
This will depend on updating open source renderers after [facebook/react#29903](https://github.com/facebook/react/pull/29903) is merged.
Changelog:
[General][Changed] - Upgrade to React 19
Reviewed By: robhogan
Differential Revision: D58625271
fbshipit-source-id: f9ad95b18716a9ce02f7cfbcc7248bdfb244c010
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44952
The test_helloworld_android Release variant are broken on GHA.
This fixes it as it forces hermesc to be built *before* the app attempts to create a bundle.
Changelog:
[Internal] [Changed] - Fix for broken test_helloworld_android on Release
Reviewed By: cipolleschi, blakef
Differential Revision: D58591480
fbshipit-source-id: 2afc1cfe8c416da6f5919d20098639653798dd1a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44901
Point Gradle to the monorepo instead of a node_modules, as well as remove some commented out entries we're not interested in.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D58287786
fbshipit-source-id: 92b3d15d05c55a2589bb8a6b75dc3d5d0f9756ff
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44850
I'm removing this line from settings.gradle:
```
import com.facebook.react.ReactSettingsExtension
```
and just using a fully qualified class name in the `configure{}` block
as imports cannot be conditionally included and is making hard for RNTA
to integrated those changes.
Changelog:
[Internal] [Changed] - Remove import of `com.facebook.react.ReactSettingsExtension`
Reviewed By: huntie
Differential Revision: D58354443
fbshipit-source-id: bc45516661318021a042e1c5921e28d7217cacbc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44828
I was using PackageList2 temporarily as I was migrating to Core Autolinking.
Now we can rename everything to `PackageList` to reduce the number of changes to the template for users.
Changelog:
[Internal] [Changed] - PackageList2 -> PackageList
Reviewed By: blakef
Differential Revision: D58284661
fbshipit-source-id: 8e1cc54e248519ece05336d79bb79e3f4ca706f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44799
This is the final part of core autolinking:
1. I split RNGP into an `app-plugin` and a `settings-plugin`. This was necessary as the Gradle modules need to be loaded inside the settings.gradle.kts.
2. I've introduced a Settings Plugin to take care of either invoking the `config` command from CLI or receiving a file in input.
3. I've removed the former `RunAutolinkingConfigTask` as now the command is invoked inside the settings plugin
4. I've added hashing computed based on the lockfiles so we won't be re-executing teh `config` command if the lockfiles are not changed.
5. I've updated RN-Tester to use the core autolinking rather than manual linking for the 2 libraries it's using.
Changelog:linking
[Internal] [Changed] - RNGP - Autolinking. Add support for linking projects
Reviewed By: blakef
Differential Revision: D58190363
fbshipit-source-id: 6ab8b36729e77ca715f50a4a00aa0ca4eb5b63b1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44815
Remove our `test_ios_template` job for `test_ios_helloworld`.
NOTE: There needs to be a followup to do the same in our Github Actions.
Changelog: [General][Changed] use helloworld instead of template for CI tests.
Reviewed By: cipolleschi
Differential Revision: D57122797
fbshipit-source-id: 744c79230b716716fdfc234832f1eb241e091893
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44722
Add support for bundling, building and uploading on iOS. I've verified these locally and will enable on CircleCI to validate.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D57915365
fbshipit-source-id: 1e73918b31f70d337de4d3aee934c8acf88c86d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44721
For iOS builds of `react-native`, the [react-native-xcode.sh](https://www.internalfb.com/code/fbsource/[7ad79aae3e8bf565d53f087ac7f7b7622b19acec]/xplat/js/react-native-github/packages/react-native/scripts/react-native-xcode.sh) script is executed as one of the build phases. This phase bundles the JS application (dev or production).
I've updated this to use the new `bundle.js` script instead of calling the `react-native/cli.js`. This is identical except with how the config is captured:
{F1669960016}
This is similar to our approach with the Gradle plugin, giving Framework authors more control.
**Other:** formatting changes for the Privacy Manifest that Xcode keeps updating.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D57915368
fbshipit-source-id: f52ea4b3cb94212ac97a3d7edeb68747418fe0a9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44716
Move to listr2 which handle non-TTY environment, outputting to CircleCI logs in a useful way. This gives our CI users more useful debugging information, but limits the output when running locally.
If you want more explicit output locally, do something like:
```
yarn run build | cat
```
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D57915369
fbshipit-source-id: ae9f87b0b9608f16ee035b791c5f7b81544c498c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44463
Helper methods to help the cli grab system state, devices and run react-native/core-cli-utils tasks using Listr.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D57067037
fbshipit-source-id: 28cb4239f3a93558b88417f366a2146f696cc411