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

701 Коммитов

Автор SHA1 Сообщение Дата
Héctor Ramos 21c8837c12 Bump Circle CI macOS container to Xcode 14.0.1, Ruby to 2.7.6, CocoaPods 1.11.3 (#34884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34884

Xcode 14 is now stable. Updating CI to use latest Xcode command line tools.

The Circle CI 14.0.1 container ships with Ruby 2.7.6 and CocoaPods 1.11.3, see full manifest here: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v8824/index.html

Changelog: [iOS][Changed] Bump to Ruby 2.7.6 and CocoaPods 1.11.3

Reviewed By: mdvacca

Differential Revision: D40148796

fbshipit-source-id: b1eab68e159ec3237ff2ef596163b73fc1e511e4
2022-10-11 18:27:25 -07:00
Kudo Chien 5fa51e665f introduce SKIP_BUNDLING_METRO_IP to skip ip.txt generation (#31829)
Summary:
ios debug archiving build will generate ip.txt that will leak metro server address for other people testing.
moreover, it will slow down launch time for metro server availability to wrong address.
this pr introduce `SKIP_BUNDLING_METRO_IP` to prevent ip.txt generation.

## 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
-->

[Internal] [iOS] [Changed] - introduce SKIP_BUNDLING_METRO_IP to skip ip.txt generation

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

Test Plan:
### Classic build will generate ip.txt
```sh
xcodebuild -workspace RNTesterPods.xcworkspace -scheme RNTester -configuration Debug -sdk iphoneos -destination 'generic/platform=iOS'
find $HOME/Library/Developer/Xcode/DerivedData/RNTesterPods-* -name 'ip.txt'
```
this will find the ip.txt

### Specify `SKIP_BUNDLING_METRO_IP=1` will not generate ip.txt
```sh
SKIP_BUNDLING_METRO_IP=1 xcodebuild -workspace RNTesterPods.xcworkspace -scheme RNTester -configuration Debug -sdk iphoneos -destination 'generic/platform=iOS'
find $HOME/Library/Developer/Xcode/DerivedData/RNTesterPods-* -name 'ip.txt'
```
this will NOT find the ip.txt

Reviewed By: hramos

Differential Revision: D40095785

Pulled By: hramos

fbshipit-source-id: 0c913f078e683879e07e9ce3306e899d631206b2
2022-10-10 01:26:29 -07:00
Krystof Woldrich 74fda10702 Fix rn config file load codegen (#34895)
Summary:
Resolves https://github.com/facebook/react-native/issues/34894

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General][Fixed] - Load react-native.config.js from correct path during codegen

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

Test Plan:
Command line output after fix with extra console logs to show the correctness ( hopefully :) ) of the fix.

```bash
 ~/repos/sentry-react-native � � krystofwoldrich/multipleRNsamples ± �node node_modules/react-native/scripts/generate-artifacts.js --path sample-new-architecture --outputPath codegen
[Codegen] Processing react-native core libraries
[Codegen] Found react-native

[Codegen] >>>>> Searching for codegen-enabled libraries in /Users/krystofwoldrich/repos/sentry-react-native/node_modules

[Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js
cwd /Users/krystofwoldrich/repos/sentry-react-native
rnConfigFilePath sample-new-architecture/react-native.config.js
rnConfigFilePath - resolved /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/react-native.config.js
[Codegen] Found sentry/react-native

[Codegen] >>>>> Searching for codegen-enabled libraries in the app

[Codegen] >>>>> Processing FBReactNativeSpec
[Codegen] Generated schema: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/FBReactNativeSpecrHeknw/schema.json
[Codegen] Generated artifacts: codegen/build/generated/ios

[Codegen] >>>>> Processing rncore
[Codegen] Generated schema: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/rncorehCjmlJ/schema.json
[Codegen] Generated artifacts: codegen/build/generated/ios

[Codegen] >>>>> Processing RNSentrySpec
[Codegen] Generated schema: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/RNSentrySpectMmDpf/schema.json
[Codegen] Generated artifacts: codegen/build/generated/ios

>>>>> Creating component provider
Generated schema list: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/rn-tmp-schema-list.json
Generated provider in: codegen/build/generated/ios

[Codegen] Done.
```

Reviewed By: rshest

Differential Revision: D40177746

Pulled By: rshest

fbshipit-source-id: 970f016db26fda003ee3b47d50e80549fdb88415
2022-10-09 15:52:41 -07:00
Héctor Ramos 31bedd9815 Add hermes/create-tarball.js script (#34875)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34875

Create common script for generating a Hermes tarball after Hermes is built from source.

Use after building Hermes from source to create a tarball of the resulting build artifacts. The path to the tarball can be passed to CocoaPods via a `HERMES_ENGINE_TARBALL_PATH` envvar in order to use these pre-built Hermes artifacts when installing the `hermes-engine` pod with `pod install`.

Use in Circle CI when creating a Hermes tarball for caching and for use in stable React Native releases.

Usage:

```
pod install

# When Hermes is built from source via CocoaPods, the build artifacts will be located in the Pods directory for hermes-engine

node ./scripts/hermes/create-tarball.js \
  --inputDir ./sdks/hermes \
  --buildType Debug \
  --releaseVersion 1000.0.0 \
  --outputDir .
```

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D40124378

fbshipit-source-id: f9712e87526ccc737afac4599b0ab0a7bb3f3956
2022-10-07 10:21:25 -07:00
Riccardo Cipolleschi ae3dd54fae Fix forward: Filtering platform in codegen (#34897)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34897

This [commit](7680bdeb4f) added the possibility to create Codegen specs that are platform specific.
However, it also modifies how the codegen is invoked and we need to publish a new version of the `react-native-codegen` package on NPM before we can use that feature.

## Changelog:
[General][Fixed] - Remove usage of the codegen spec filtering until we publish a new version of the codegen.

Reviewed By: robhogan

Differential Revision: D40176447

fbshipit-source-id: 20be630dec3dcd7efb9fd510c6cf9f2c161f906a
2022-10-07 06:30:28 -07:00
Lorenzo Sciandra 6552d478bd infra(e2e): fix enabling new arch for RNTester iOS in the E2E script (#34882)
Summary:
Quick follow up to https://github.com/facebook/react-native/pull/34513 to fix an issue that has been bothering the release crew for a while: the iOS new arch component not working! Turns out, we're silly billies �

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - Add new arch flag to iOS pod install command in E2E script

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

Test Plan:
Everything works correctly now:

<img width="987" alt="Screenshot 2022-10-06 at 14 20 09" src="https://user-images.githubusercontent.com/16104054/194327768-4da7d607-879b-46ad-a453-504983980831.png">

Reviewed By: dmytrorykun

Differential Revision: D40143251

Pulled By: dmytrorykun

fbshipit-source-id: 91ba6e22c25770efe6a839d6728d7052bc17a8f2
2022-10-07 06:24:27 -07:00
Riccardo Cipolleschi 7680bdeb4f Implement filtering for platform specific spec files
Summary:
This diff helps the library maintainer to keep their spec file platform specific if some specs make no sense in one platform or in the other.

We are filtering the spec files when we need to create the Schema.

The diff modifies also the call sites in the `scripts` (for iOS) and in the `gradle-plugin` (for Android).

It also adds tests for the new functions in the CLI.

The change is completely additive and it should not change any pre-existing behaviour.

## Changelog
[General][Added] - Add support for platform-specific specs

Reviewed By: cortinico

Differential Revision: D40008581

fbshipit-source-id: b7fcf6d38f85fe10e4e00002d3c6f2910abdbe35
2022-10-07 03:21:17 -07:00
Lorenzo Sciandra 967de03f30 fix(ios): add xcode 14 workaround (turn off signing resource bundles) for pods (#34826)
Summary:
This is inspired by the Expo workaround d970a9ecbb to address an issue that cocoapods has with Xcode 14: https://github.com/CocoaPods/CocoaPods/issues/11402

This wants to address this https://github.com/facebook/react-native/issues/34673 in a way that we can also cherry-pick on the 0.70 branch.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[iOS] [Fixed] - add xcode 14 workaround (turn off signing resource bundles) for `React-Core`

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

Test Plan:
Tested locally by opening RNTester via Xcode 14.0.1, and targetting my iPhone as device. After applying the patch, the error for React Core AccessibilityResources disappears.

Also, added ruby test for new patch.

Reviewed By: hramos

Differential Revision: D40063828

Pulled By: hramos

fbshipit-source-id: e10d5b6a917a6a7cbacd14ecfdac55e60e46c6f8
2022-10-07 02:29:59 -07:00
Lorenzo Sciandra 8486b4c5ee chore: re-add fixes from Kudo's PR 34846 (#34861)
Summary:
I'm not sure why, but my commit 97f5ef05e6 landed despite the PR still having a couple of merge conflicts from after Kudo's PR https://github.com/facebook/react-native/issues/34846 being merged.

What happened is that basically it just "overwrote" those chances, so this PR is just a fix for that.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - re-adding Kudo's fix for nightly build

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D40059290

Pulled By: cortinico

fbshipit-source-id: 38e495a0dbecd39e836d15aa2a1a30e7354d9813
2022-10-04 09:06:01 -07:00
Lorenzo Sciandra 97f5ef05e6 infra(e2e): rework local E2E script (#34513)
Summary:
This is a long time coming effort to improve the situation around the local e2e script that in the release crew: the current bash-based script is quirky at best, and what you end up generating as a sample project is not really a true sample project. This is where this PR comes in: it migrates the flow from `./scripts/test-manual-e2e.sh` to `yarn test-e2e-local <options>`.

Here's the current shape of the options:

```sh
Options:
  --help          Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  -t, --target      [choices: "RNTester", "RNTestProject"] [default: "RNTester"]
  -p, --platform                    [choices: "iOS", "Android"] [default: "iOS"]
  -h, --hermes                                         [boolean] [default: true]
```

The idea is to change it so that you can just run the script, and it will do that one specific thing "well", without the tester needing to do anything aside from actually testing the app once it's open.

Some of the key changes:
* tries to stick to the patterns of the other established *.js based scripts, in terms of tooling and approach (and even refactor parts that can be shared with other scripts) - like the android artifacts generation
* no need to start the android emulator on the side
* no need to start Metro on the side
* RNTester iOS will open up on the simulator (no Xcode open that then you need to press)

Things that still need work:
* see the #fixme and #todo in comments
* because we rely on exec, the output sent back is not formatted/shaped correctly so it's a bit more noisy/chaotic - but can't handle it right now because the package we use doesn't allow it - see https://github.com/shelljs/shelljs/issues/86

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - Migrate bash E2E local testing script to new JS based command

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

Test Plan:
To test the script, you can run it passing the options showed above; this is the current situation:
* RNTester iOS Hermes 
* RNTester Android Hermes 
* RNTester iOS JSC 
* RNTester Android JSC 
* RNTestProject Android Hermes 
* RNTestProject iOS Hermes 
* RNTestProject Android JSC 
* RNTestProject iOS JSC 

Reviewed By: cortinico

Differential Revision: D39814692

Pulled By: cortinico

fbshipit-source-id: d4791798aaad764c6a3757269b7636f847ccf2ca
2022-10-04 04:56:44 -07:00
Kudo Chien 93c3effc72 Fix issues for nightly build (#34846)
Summary:
There are two issues from nightly builds.

#### 1. `VERSION_NAME=1000.0.0-main` in  _ReactAndroid/gradle.properties_

the solution is to remove unused _ReactAndroid/gradle.properties_  git revert when publishing package.

#### 2. `pod install` error from downloading hermes, e.g. the url is unavailable. `https://github.com/facebook/react-native/releases/download/v0.0.0-20221002-2027-2319f75c8/hermes-runtime-darwin-debug-v0.0.0-20221002-2027-2319f75c8.tar.gz`

fix _hermes-engine.podspec_ to support nightly build and build hermes from main branch.

## Changelog

[General] [Fixed] - Fix nightly build issues

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

Test Plan:
1. i cannot fully test publish-npm.js workflow and it stops at `npm publish`. i can just check at this moment, the _ReactAndroid/gradle.properties_ is right.
2. create a `npx react-native init` project and `yarn add react-native@nightly`. patch `node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` and try `pod install`

Reviewed By: cipolleschi

Differential Revision: D40021649

Pulled By: cortinico

fbshipit-source-id: c9e2701e524f4b16eab6f2c72b5cfa34883082c3
2022-10-03 08:16:16 -07:00
Tim Yung 833661452d RN: Make `retry3` Portable in CI Scripts
Summary:
Moves the `retry3` utility function into its own file so that it can be reused in other steps that are not related to Android.

Changelog:
[Internal]

Reviewed By: rickhanlonii, cipolleschi

Differential Revision: D39889996

fbshipit-source-id: bf79cc19ad6178af0a0d8117a81116e0c32f4333
2022-09-28 10:57:07 -07:00
Nicola Corti 49b14cc603 Move `react_render_debug` to be consumed via prefab (#34802)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34802

This removes the old way of consuming `libreact_render_debug.so` from
`Android-prebuilt.cmake` to using Prefab which is natively supported
by the Android pipeline.

Changelog:
[Internal] [Changed] - Move `react_render_debug` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D39849622

fbshipit-source-id: 45451dfe92ecce94d1b466094baae05a75ed803f
2022-09-27 09:30:50 -07:00
Héctor Ramos c557f25648 Use PRODUCTION envvar directly in hermes-engine Pod to determine build type (#34776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34776

CocoaPods is not used when Hermes is built in Circle CI, so we cannot rely on the React Native CocoaPods scripts to be loaded.
The get_hermes_build_type function is removed from the RN CocoaPods scripts and in its place, the ENV['PRODUCTION'] envvar is accessed directly.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D39778190

fbshipit-source-id: 12083b7b4533b4ad7bb7a08612883983a0583616
2022-09-23 13:08:15 -07:00
Héctor Ramos 2fc44ac8e1 Use debug/release tarballs in hermes-engine Pod (#34761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34761

Separate debug and release tarballs are built in CI. Use the appropriate Hermes artifacts tarball when building hermes-engine.

Add hermes.rb tests.

Changelog:
[iOS] [Changed] - Remove debugger from Hermes when building for release

Reviewed By: cipolleschi

Differential Revision: D39698499

fbshipit-source-id: e6b10d34c7f94c2f86fc47d8b97466011aaa75cc
2022-09-23 09:40:24 -07:00
Vincenzo Vitale 10e47b891a Do not depend on an ENV variable when publishing and setting the RN version (#34746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34746

The changes made in
https://github.com/facebook/react-native/pull/34694
introduced the need to have the env variable TMP_PUBLISH_DIR for the publishing and set-rn-version scripts to work.
This break any usage of set-rn-version when the env variable is not set upfront.

With this change, we are creating a temp folder in the scope that requires it (e.g. set-rn-version.js) and then passing the path to the save/revert functions.

## Changelog
[Internal] [Added] - Do not depend on an ENV variable when publishing and setting the RN version.

Reviewed By: cipolleschi

Differential Revision: D39683565

fbshipit-source-id: 21d85d1c16c4cb7324636ceb5eba626ff8cbb775
2022-09-22 07:34:50 -07:00
Riccardo Cipolleschi b7add0aadb Always generate an EmptyNativeState (#34754)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34754

This Diff is the second step of enabling the CodeGen to parse and generate a NativeState for the components.

The feature has been largely requested by the OSS community but it could be also helpful for people in Meta.

## Changelog
[General][Added] - Always generate an empty NativeState for Fabric Components

Reviewed By: cortinico

Differential Revision: D39696435

fbshipit-source-id: e24768af78f59696c0b4db009e8065bb5c89316b
2022-09-22 06:41:44 -07:00
fortmarek 22940e4177 Use verdaccio for the template e2e test (#34577)
Summary:
This PR adds [verdaccio](https://github.com/verdaccio/verdaccio) to release packages in the `packages` directory during the E2E test on CI.

The rationale behind this is the following:
- Firstly, we wanted to push the [monorepo RFC](https://github.com/react-native-community/discussions-and-proposals/pull/480). We hit an issue when renaming the packages to follow the same convention caused by the e2e test using the template to fail. This is because the template installs packages from the live version of npm – and if you just rename a package in a given PR without releasing it, the package understandably can't be installed since it's not published, yet – as you can see [here](https://app.circleci.com/pipelines/github/facebook/react-native/15286/workflows/149df51f-f59b-4eb3-b92c-20c513111f04/jobs/282135?invite=true#step-108-283).
- Secondly, the current e2e test on `main` does not actually test the latest code of the packages in the `packages` directory as it simply downloads the latest versions from npm. This creates a divide between what's tested and what users should expect when using nightlies or when a new minor is released.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - Use verdaccio for template e2e test

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

Test Plan: `test_js` CI check should pass. Additionally, I have temporarily updated the [PR](https://github.com/facebook/react-native/pull/34572) renaming `assets` to `assets-registry` to include the verdaccio changes – the `test_js` passes there, additionally proving merging this PR will unblock us with the rename PRs.

Reviewed By: cipolleschi

Differential Revision: D39723048

Pulled By: cortinico

fbshipit-source-id: aeff3811967360740df3b3dbf1df50e506fb72d8
2022-09-22 05:02:37 -07:00
Nenad Vojnovic 8745a148b6 Fix HERMES_ENABLED check in scripts/react-native-xcode.sh (#34675)
Summary:
Checking if Hermes is enabled is failing because there is no `podfile.lock` file in the directory where this script is executed and `USE_HERMES` will be set to `false` which will prevent building Hermes binary jsbundle.

## Changelog

[iOS] [Fixed] - `HERMES_ENABLED` check fixed in react-native-xcode.sh

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

Test Plan:
1. Enable Hermes
2. Make a release build
3. Verify the `main.jsbundle` file is Hermes binary bundle

Reviewed By: cortinico

Differential Revision: D39686608

Pulled By: cipolleschi

fbshipit-source-id: 237c77ced484d4ab77e576c7a2bb7b6826228017
2022-09-21 03:40:44 -07:00
Luna Wei 6b2a511cbb Move TypeScript declarations into react-native (#34614)
Summary:
## Changelog
[General] [Added] - Add `types` folder to house TypeScript types.

Release TypesScript types with react-native and eventually deprecate [types/react-native](https://www.npmjs.com/package/types/react-native).

The current plan is to release types/react-native for 0.70 and 0.71 while also maintaining types here. This will result in some double maintenance until 0.72 but will give community time to move off of types/react-native.

After this lands, there have been changes on `main` of types that we need to update. Then, when we release 0.71 from DefinitelyTyped, we can simply copy over the `types` folder from this repo.

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

Test Plan:
`yarn run test-typescript` for linting types

* Created a new project using the TS template and my local clone of `react-native` on this branch.
`npx react-native init MyTSApp --version <path-to-my-local-rn-repo> --template react-native-template-typescript`
* Updated the `package.json` to remove `types/react-native`
* Deleted my node_modules and re-ran yarn
* Opened MyTSApp in VSCode and verified the type suggestions appeared and cmd+click to defnitions took me to the node_module dependency `react-native/types`

## Danger is failing on this PR and it's expected
 as it runs off the changes on `main`.  [This is expected](https://docs.github.com/en/github-ae@latest/actions/using-workflows/events-that-trigger-workflows?fbclid=IwAR2_AE0Jwndt8Gu-iTQnxGxLJq7nakbi7sz8jwZ6U62JWLSdcZuvjcQ6WvE#pull_request_target). However testing it locally passes. Once merged, and these changes are on `main`, danger will pass again.

```
$ react-native/packages/react-native-bots
❯ yarn danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ ..react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

  Done in 13.24s.
```

Reviewed By: mdvacca

Differential Revision: D39479137

Pulled By: lunaleaps

fbshipit-source-id: 1d506f812d566b783b6e79104cd6339b077a42a7
2022-09-19 12:26:00 -07:00
Luna Wei dc56eb99f1 Fix missing renames from bots to react-native-bots (#34713)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34713

Changelog: [Internal] - Fix up missing bots usage after we moved everything to packages/react-native-bots in 767f8e0249

Reviewed By: NickGerleman

Differential Revision: D39583230

fbshipit-source-id: 6cc6b7923e67139dc3c81dfe0c39005dde905248
2022-09-16 12:41:06 -07:00
Vincenzo Vitale 0a3ca80af4 Build the React Native NPM package when git is not available (#34694)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34694

TL;DR Relax the assumption of having git to build the RN NPM package.

We do have two CI Systems: CircleCI for OpenSource and Sandcastle for Internal. It's crucial that the two CIs are aligned.

We currently don't have a way to test the new app template on Sandcastle for Android & iOS.
This results in scenarios where internal Diffs gets landed and break the public CI externally.

This is preparation work to then be able to build the RN NPM package in Sandcastle (which will be done in a follow-up diff).

With this we also introduce the restoring of all the changed files after the publishing script is done.

## Changelog

[Internal] [Added] - Made it possible to create publishing NPM packages in Sandcastle.

Reviewed By: cortinico, cipolleschi

Differential Revision: D39467471

fbshipit-source-id: b0de88a768b8a2fb798dd684fa8f97f4d0acb751
2022-09-16 02:58:36 -07:00
Rujin Cao b2ac528156 @emails -> @oncall (remaining ones)
Differential Revision: D39536169

fbshipit-source-id: 6c8d6787328eefecd23f3498b14a6d9ff750a670
2022-09-15 15:54:10 -07:00
Riccardo Cipolleschi 34fafb2b88 Simplify furthermore App migration
Summary:
This Diff adds a couple of APIs to the `react_native_pods.rb` file to simplify further the migration to the New Architecture for the iOS app.
Specifically, it aims to simplify [this](https://reactnative.dev/docs/next/new-architecture-app-intro#ios---build-the-project) steps by offering a RN-managed min version and creating the .xcode.env file for the user if it is missing.

## Changelog

[iOS][Added] - Add new API to simplify app migration

Reviewed By: cortinico

Differential Revision: D39469599

fbshipit-source-id: f0323e86c83c2731671fcd5bb4288071304bb43b
2022-09-14 04:21:02 -07:00
Riccardo Cipolleschi f31134af7d Set RCT_NEW_ARCH_ENABLED to true when using cocoapod flag (#34670)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34670

Users can enable the New Architecture on iOS in two way: using the `RCT_NEW_ACRH_ENABLED` env variable or setting the `new_arch_enabled` flag when invoking the `use_react_native` function.

We need to set the `RCT_NEW_ACRH_ENABLED` even when the other method is used because we need to inject that flag into the codebase.

## Changelog
[iOS][Fixed] Make sure to turn on the `RCT_NEW_ACRH_ENABLED` flag

Reviewed By: cortinico

Differential Revision: D39430904

fbshipit-source-id: abb55642b4c72d7dec8b045fb4a43c1763f0ee0f
2022-09-14 04:21:02 -07:00
Roman Melnyk 0cae4959b7 #34610 Fix invalid range "t-5" in string transliteration [iOS] (#34636)
Summary:
Fix invalid range "t-5" in string transliteration [iOS] for M1 pod install issue.

This should fix pod install error for M1 machines.

## Changelog
[iOS] [Fixed] - Fix ios pod install error

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

Test Plan: Run pod install on M1 machine.

Reviewed By: sammy-SC

Differential Revision: D39423276

Pulled By: cipolleschi

fbshipit-source-id: 4ec95af7103395792facba0f93fd8de05a3fe78d
2022-09-13 04:14:04 -07:00
Vincenzo Vitale 90e7f510dc Test the Android Template with the JSC engine (#34664)
Summary:
https://www.internalfb.com/T131530362

We are testing the New App template in CircleCI.

For Android we test the combination of Debug/Release and Old/New Architecture, and always use the Hermes engine.
We don't test the JSC engines (in iOS this is already happening).

We're not automatically testing that we can create a new project with JSC, forcing release managers to do it manually.

## Changelog

[Android] [Added] - Automatic testing of the new project template with the JSC engine.

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

Test Plan:
- Open the circle-ci dashboard
- Verify there are now 8 jobs adeed to the pipeline:
```
test_android_template-Debug-Hermes-false
test_android_template-Debug-Hermes-true
test_android_template-Debug-JSC-false
test_android_template-Debug-JSC-true
test_android_template-Release-Hermes-false
test_android_template-Release-Hermes-true
test_android_template-Release-JSC-false
test_android_template-Release-JSC-true
```
- Verify they are all passing.

Reviewed By: cortinico

Differential Revision: D39426388

Pulled By: vincenzovitale

fbshipit-source-id: e5d606b1cc3ace53f8dab0f7d6d7d06ab11a2b46
2022-09-12 12:33:07 -07:00
Riccardo Cipolleschi 82e9c6ad61 Simplify the dependencies migration for new libraries (#34619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34619

When it comes to migrate existing libraries, users needs to update their .podspec files with a bunch [of changes](https://reactnative.dev/docs/0.69/new-architecture-library-ios#add-folly-and-other-dependencies).
This diff groups those changes in a single function, so that contributors can just invoke that function to prepare their dependencies.

## Changelog

[iOS][Changed] - Add function to simplify podspecs

Reviewed By: cortinico

Differential Revision: D39312203

fbshipit-source-id: ed631839e07d472a1fdcba33310f9b1d94fe2fd7
2022-09-09 04:25:56 -07:00
Satyajit Sahoo a5622165c1 feat: support custom library paths in `react-native.config.js` for codegen on iOS (#34580)
Summary:
Currently for codegen to work for a library on iOS, it needs to be located
inside `node_modules`. This patch adds support for libraries defined in
`react-native.config.js`.

This is useful when developing libraries as well as monorepos where the library
may exist outside of the `node_modules`.

Example:

```js
// react-native.config.js
const path = require('path');

module.exports = {
  dependencies: {
    'react-native-library-name': {
      root: path.join(__dirname, '..'),
    },
  },
};
```

## Changelog

[Internal] [Added] - Support custom library paths in `react-native.config.js` for codegen on iOS

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

Test Plan:
Tested on a test application and ensured that codegen finds the library specified in `react-native.config.js`

https://user-images.githubusercontent.com/1174278/188141056-bce03730-2a13-4648-8889-9727aaf2c3c4.mp4

I have also added a basic test case for this scenario.

Reviewed By: jacdebug, cortinico

Differential Revision: D39257919

Pulled By: cipolleschi

fbshipit-source-id: 131189f1941128a59b9b1e28af61a9038eb4536b
2022-09-08 03:09:16 -07:00
Riccardo Cipolleschi 4352459781 Add matrix for Debug/Release, New/Legacy Architecture, (No)Hermes (#34469)
Summary:
This PR is the dual of the Matrix Tests we added to the Android Template a couple of weeks ago. It adds the same tests to iOS, to verify that the template builds with both architectures and with both configurations (Debug/Release).. And it tests that the template works with both Hermes and without it.

## Changelog

[iOS] [Added] - Test iOS template with both architectures and configurations

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

Test Plan: CI is green in all the 8 new jobs.

Reviewed By: hramos, cortinico

Differential Revision: D39087876

Pulled By: cipolleschi

fbshipit-source-id: 1205b2339bac87cf11b4f356a2e50e1e93ba52bc
2022-08-31 08:54:06 -07:00
Gabriel Rogan 9e169da3ae fix: "Time.h:52:17: error: typedef redefinition with different types" when a folder in the file path has a space (#34510)
Summary:
The `sed` workaround here in `__apply_Xcode_12_5_M1_post_install_workaround`:
https://github.com/facebook/react-native/blob/main/scripts/react_native_pods.rb#L293-L298
does not work when the react native project has a parent folder with a space in the the name, for example:
`/Users/myuser/Some Folder/my-project/ios/Pods/RCT-Folly/folly/portability/Time.h`
This is because the `sed` command thinks that the part after the space is a separate argument.
This bug caused one of our engineers to not be able to run our React Native project through no fault of his own, so I would like to propose this change to help other engineers avoid this in the future.

## Changelog

Add single quotes around the file parameter in the `sed` command

[iOS] [Fixed] - Fixed Time.h:52:17: error when a folder in the file path has a space

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

Test Plan:
Checkout the main branch.
Create a React Native project in a folder that has a space in the name.
When you run `pod install`, you should notice a `sed` error indicating that the text replacement failed.
Run the build to reproduce the `Time.h:52:17: error`.
Checkout this branch.
Run `pod install` and notice the `sed` error is gone.
Run the build, the error should be gone.

Reviewed By: sammy-SC

Differential Revision: D39082262

Pulled By: cipolleschi

fbshipit-source-id: 211099234edc6c9ee959bb61a760a6ca04a7a301
2022-08-30 04:10:10 -07:00
Dmitry Rykun e0a71fc7b5 Cleanup temporary files after source map generation.
Summary:
Changelog:
[iOS][Fixed] - When source maps are enabled, clean up temporary files from the build directory. Reduces bundle size by at least 1MB.

Reviewed By: cipolleschi

Differential Revision: D38866158

fbshipit-source-id: 0f46faf4e767bb7417b24f283fbe19cfa022941a
2022-08-19 10:23:22 -07:00
Dmitry Rykun 61106ac680 Fix react-native-xcode.sh build script
Summary:
This diff fixes USE_HERMES checks.

Changelog
[iOS][Fixed] - USE_HERMES envvar check fixed in react-native-xcode.sh.

Reviewed By: cipolleschi

Differential Revision: D38704558

fbshipit-source-id: 90a8648fd1094fcf9ab085f37efce9b811e707bc
2022-08-19 09:50:42 -07:00
Riccardo Cipolleschi ae8d01eca1 Install Fabric dependencies when the New Architecture is enabled (#34440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34440

While testing some recent changes on a nightly, I realized that if we install the dependencies using RCT_NEW_ARCH_ENABLED=1 and we forget to change the flag in the Podfile, Fabric dependencies won't be installed.

However, Fabric is required by the New Architecture. This fix makes sure that we install Fabric dependencies when the New Architecture is enabled.

## Changelog
[iOS][Changed] Install Fabric dependencies when RCT_NEW_ARCH_ENABLED=1

Reviewed By: cortinico

Differential Revision: D38786978

fbshipit-source-id: 664151de0250577a19af949f8850e5efa8a13373
2022-08-18 01:58:24 -07:00
Riccardo Cipolleschi 7cc2d1a249 Create RCTAppDelegate to simplify New Architecture Setup (#34384)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34384

This Diff aims to create a RCTAppDelegate library to offer a subclass which automates some operations required to set up the new architecture.

## Changelog
[iOS][Added] - Added the RCTAppDelegate library

Reviewed By: cortinico

Differential Revision: D38580424

fbshipit-source-id: 38f6c4b8ff2790a2ce9e23d385b36307701cffb7
2022-08-15 01:30:55 -07:00
Riccardo Cipolleschi 0e316ec671 Update ruby codegen to cleanup build folder. (#34398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34398

This Diff cleans up the codegen folder for iOS when we install the pods. This is useful to start from a clean situation. The codegen runs after this step and we make sure that the file system is clean

## Changelog
[iOS][Changed] - Cleanup codegen build folder before installing the pods

Reviewed By: cortinico

Differential Revision: D38657027

fbshipit-source-id: 8a914457d7963521d6d8dc7819eba864736f50a0
2022-08-15 01:30:55 -07:00
Tim Yung b8425c8ee5 RN: Cleanup Existing ESLint Warnings
Summary:
Sometime over the past few months (and with changes such as migrating to the `hermes-eslint` parser), a bunch of lint warnings crept into the codebase.

This does a pass to clean them all up, ignore generated files, and refactor some code to be... better.

There should be no observable behavior changes as a result of this.

Changelog:
[Internal]

Reviewed By: NickGerleman

Differential Revision: D38646643

fbshipit-source-id: a7b55d1e4cd5700340cc5c21f928baf3ea1d5a58
2022-08-12 17:16:40 -07:00
Nicola Corti 4699a39489 Isolate the buck OSS commands inside test_buck (#34378)
Summary:
This isolates and parallelize all the BUCK related work inside a `test_buck` job, so it's immediately clear where a failure happend.

I've also added a couple of minor improvements:
- Don't clone okbuck just to consume a script. I've copied the script over instead.
- Removed unnecessary `buck_cache_key`

This should reduce ~5 minute of build time from Test Android which was already beyond 10 minutes.

## Changelog

[Internal] - Isolate the buck OSS commands inside test_buck

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

Test Plan: Let's wait for a `test_buck` and `test_android` output.

Reviewed By: cipolleschi

Differential Revision: D38580359

Pulled By: cortinico

fbshipit-source-id: 8b3915bbc28b4a7a169011fe9047f402c2d1f6ee
2022-08-11 02:46:00 -07:00
Dmitry Rykun 03de19745e Fix USE_HERMES envvar check
Summary:
Hermes is enabled by default. We set `USE_HERMES` envvar to `false` to explicilty disable Hermes. The only valid way to check it would be to compare it against `false`. Everything else will produce invalid results if `USE_HERMES` is not defined. For example `$USE_HERMES != true` will turn into `'' != true`, which evaluates to `true`.
Due to this bug source maps were not generated by default.

Changelog:
[iOS][Fixed] - USE_HERMES envvar check fixed in react-native-xcode.sh. Now source maps are generated by default.

Reviewed By: cipolleschi

Differential Revision: D38571971

fbshipit-source-id: bc6b505c225c56d62ee773b401b66d821965e106
2022-08-10 05:24:41 -07:00
Seph Soliman 1bc9ddbce3 Enable Flipper for custom Xcode configurations (#34333)
Summary:
Fixed Flipper not recognizing app when using custom Xcode configuration names.

This fixes the problem that renaming the "Debug" Xcode configuration causes Flipper to not work. Despite using the recommended `:configurations` parameters and instructing Cocoapods that it was a debug build (see https://github.com/facebook/react-native/issues/34332), it still wouldn't recognize the app due to missing C preprocessor flags, specifically it was missing `-DFB_SONARKIT_ENABLED=1`.

## 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] [Fixed] - Flipper now supports custom Xcode build configuration names

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

Test Plan:
I applied the PR change to 0.68.2 (which work similarly but code was refactored since then). I then used `patch-package` to test the change and the fix worked on 2 separate projects.
Patch-package change equivalent:
```diff
 diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb
index f2ceeda..2ea57d6 100644
 --- a/node_modules/react-native/scripts/react_native_pods.rb
+++ b/node_modules/react-native/scripts/react_native_pods.rb
@@ -180,7 +180,7 @@ def flipper_post_install(installer)
     # Enable flipper for React-Core Debug configuration
     if target.name == 'React-Core'
       target.build_configurations.each do |config|
-        if config.name == 'Debug'
+        if config.debug?
           config.build_settings['OTHER_CFLAGS'] = "$(inherited) -DFB_SONARKIT_ENABLED=1"
         end
       end
```

**Screen shot of Xcode after the patch has been applied, for RN v0.68.2:**
![Screen Shot 2022-08-02 at 14 31 49](https://user-images.githubusercontent.com/895369/182477178-387df1b2-d86c-4d82-859c-a2d1e6e6d1d0.jpg)

Reviewed By: dmitryrykun

Differential Revision: D38373812

Pulled By: cipolleschi

fbshipit-source-id: d2949927084160bf0c6f8af37a7966dd22fea9a6
2022-08-09 10:14:23 -07:00
Riccardo Cipolleschi a4599225f5 Silence deprecation warning for react-native dependency. (#34368)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34368

When a user runs `RCT_NEW_ARCH_ENABLED=1 pod install` to install the dependencies for the New Architecture, Cocoapods prints a warning because of React Native is still set up with a legacy configuration.

This diff silences these warnings because they can confuse the final user.

**Note:** We need to keep this legacy configuration to support both the legacy and the New Architecture.

## Changelog

[iOS][Changed] - Silence warning due to react-native internal details.

Reviewed By: cortinico

Differential Revision: D38503405

fbshipit-source-id: b89857aa88435b1c64da52875606003239ff2e05
2022-08-08 12:34:47 -07:00
Peter Velkov a98da32229 Fix `HBC_SOURCEMAP_FILE` in `scripts/react-native-xcode.sh` (#34111)
Summary:
## Summary

Fixes https://github.com/facebook/react-native/issues/32497
Fixes https://github.com/facebook/react-native/issues/34212

The assigned HBC_SOURCEMAP_FILE path is incorrect as it does not reference the hermes bundle source map file

See: https://github.com/facebook/react-native/issues/32497#issuecomment-1171379674

## Changelog
[General] [Fixed] - using SOURCEMAP_FILE during xcode build phase with Hermes enabled

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

Test Plan:
1. In a blank react-native project
1. Enable Hermes
1. Go to xCode -> Project -> Build Phases -> Bundle React Native code and images
3. Add `export SOURCEMAP_FILE="$(pwd)/../ios.jsbundle.map"` before `react-native-xcode.sh`
   e.g.
   ```sh
   export NODE_BINARY=node
   export SOURCEMAP_FILE="$(pwd)/../ios.jsbundle.map"

   ../node_modules/react-native/scripts/react-native-xcode.sh
   ```
4. Make a release build `npx react-native run-ios --configuration Release` or `CMD + I` in xCode
5. Verify the build is successful
6. Verify the `.map` file is outputted at the specified path (`ios.jsbundle.map` in project root for the example above)

Reviewed By: cipolleschi

Differential Revision: D38460586

Pulled By: dmitryrykun

fbshipit-source-id: 54c1594b37fa2253896ce9739c1a9a712deecd0f
2022-08-08 07:16:36 -07:00
Nicola Corti 1ce23ce435 Fix test-manual-e2e on Android/Hermes for New App Template (#34294)
Summary:
The current `test-manual-e2e.sh` script is broken on Android + Hermes + New App Template.

This commit fixes it. Specifically:
- There is no need to generate Maven Artifacts for RN Tester, as RN Tester consumes them from source.
- There is instead a need to generate Maven Artifacts for New App Template, as they need to be included inside the NPM package.
- The `:ReactAndroid:hermes-engine:installArchives` task needs to invoked to also generate the Hermes-engine .aar for bundling.

## Changelog

[Internal] - Fix test-manual-e2e on Android/Hermes for New App Template

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

Test Plan: I've tested this against the `0.70-stable` branch and I was able to run an App from the New Template properly.

Reviewed By: dmitryrykun

Differential Revision: D38239238

Pulled By: cortinico

fbshipit-source-id: b3d95bad21515b12a91e29147e70ba8323896660
2022-07-28 06:23:11 -07:00
Kudo Chien c4b51e8d76 #34214 for main (#34271)
Summary:
cherry-pick changes from https://github.com/facebook/react-native/issues/34214 to main. because the `react_native_pods.rb` on main is quite different from 0.69, i have separated pr for the change.

## Changelog

[iOS] [Fixed] - Fix React-bridging headers import not found

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

Test Plan: RNTester + pod install and verify pod targets to have `React-bridging` in header search paths.

Reviewed By: cipolleschi

Differential Revision: D38122074

Pulled By: dmitryrykun

fbshipit-source-id: 64569abbfa3a684f0d6b84c9e3222bfc9a171061
2022-07-27 07:56:05 -07:00
LeoTM 77752fc403 Update Podfile for `PRODUCTION=1 pod install` (#34234)
Summary:
### Mentioned
- pr[main]: https://github.com/facebook/react-native/pull/33882
- discussion: https://github.com/reactwg/react-native-releases/discussions/21#discussioncomment-2945972
- pr[0.69-stable]: https://github.com/facebook/react-native/pull/34098

Close: https://github.com/facebook/react-native/issues/33764

Saw the issue ago couple wks too: https://github.com/leotm/react-native-template-new-architecture/issues/757
Fixed similarly: https://github.com/leotm/react-native-template-new-architecture/pull/791

## Changelog

[iOS] [Changed] - Update Podfile to allow `PRODUCTION=1 pod install`

[CATEGORY] [TYPE] - Message

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

Test Plan: Everything builds and runs as expected

Reviewed By: cortinico

Differential Revision: D38029117

Pulled By: cipolleschi

fbshipit-source-id: bdb58200a999cb66f1043a2feb670f9037c8e463
2022-07-22 02:28:07 -07:00
Riccardo Cipolleschi 4b51207735 Simplify logic to choose if we need to build hermes from source or not. (#34232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34232

This diff simplify the logic to decide whether we want to build hermes from source or not.

The requirement we have is that we don't want our users to build hermes.
So, we don't want to build hermes when there is a precompiled tarball available, while we want to build hermes in CI.

## Changelog

[General][Changed] - Build hermes when in CI and not when there is a tarball

Reviewed By: cortinico

Differential Revision: D37999748

fbshipit-source-id: 7d9cab51c37fb47db216055c057a22081e10df07
2022-07-22 02:13:47 -07:00
Riccardo Cipolleschi 361d939afd Build Hermes in CI also when it is against stable branch (#34224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34224

This Diff is a copy of this [PR](https://github.com/facebook/react-native/pull/34228) that we have against 0.69-stable.

This Diff makes sure we can build Hermes also in PR that are created against a stable branch

## Changelog

[General] [Changed] - Make sure we can build Hermes from source when PR are opened agains -stable

Reviewed By: cortinico

Differential Revision: D37961092

fbshipit-source-id: 65577fcc69f0e2a68377cbd46e3bd3a6af24e7c3
2022-07-20 08:53:38 -07:00
Dmitry Minkovsky 698b14789c Use readlink instead of realpath in packager.sh (#34145)
Summary:
`realpath` is not available on macOS 12.2 and 12.4. Because of this, the following error is shown when launching an RN app with XCode (which calls `packager.sh` via `launchPackage.command`):

<img width="1123" alt="Screen Shot 2022-07-06 at 1 26 08 PM" src="https://user-images.githubusercontent.com/218725/177608681-0cf4dc5a-b71c-4ddc-8fbe-4d37b2d3e2cb.png">

I am running Bash 5 but realpath is also not available with zsh.

This issue was introduced in bb8ddd6c12 (diff-6ca7c99209bdf630550bb9e2946ce8611948c5a23b32ffb25028792ef5d48b8d), which interestingly did not change `launchPackage.command`. There's a recent comment on that commit that confirms this issue:

bb8ddd6c12 (commitcomment-77818917)

## 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
-->

[iOS] [Fixed] - Use readlink instead of realpath in packager.sh

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

Reviewed By: cipolleschi

Differential Revision: D37669417

Pulled By: cortinico

fbshipit-source-id: bcc4cb6e886df059e6598ee811226e3cd1a6ae14
2022-07-20 07:06:18 -07:00
Danilo Bürger af3dfbaa47 Move cocoapods cli native_modules require from template to rn scripts (#34215)
Summary:
This resolves issues where the node_modules structure is not hoisted (like with pnpm). Since the template does not directly depend on the cli, it doesn't exist in the pnpm node_modules root. Moving it to the rn scripts makes sure that the relative require starts in the correct directory for both hoisted and pnpm structures.

## Changelog

[iOS] [Fixed] - Fix cocoapods cli native_modules require for pnpm node_modules

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

Test Plan:
1. react-native init
2. rm -rf node_modules
3. pnpm i
4. bundle install
5. bundle exec pod install --project-directory=ios

This should succeed. Without the patch, it will fail with

```
[!] Invalid `Podfile` file: cannot load such file -- /.../node_modules/react-native-community/cli-platform-ios/native_modules.

 #  from /.../ios/Podfile:2
 #  -------------------------------------------
 #  require_relative '../node_modules/react-native/scripts/react_native_pods'
 >  require_relative '../node_modules/react-native-community/cli-platform-ios/native_modules'
 #
 #  -------------------------------------------
```

Reviewed By: cortinico

Differential Revision: D37959152

Pulled By: cipolleschi

fbshipit-source-id: 7fa9af4a8c153cfd38360f57eca415a8c252dbd5
2022-07-19 09:11:08 -07:00
Riccardo Cipolleschi 79a37e5a88 Destructure use_react_native! parameters and doc (#34177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34177

This Diff destructures the parameters of the use_react_native! function. It does that in a backward compatible way, so we there should be no disruptions.

It also adds documentation to the various public method we want to export to our users.

## Changelog
[iOS][Changed] - Destruct use_reactnative parameters and ad ddocumentation

Reviewed By: cortinico

Differential Revision: D37787365

fbshipit-source-id: 27f9030db2e8c6c66b9548b4c1287eb8165ae5fc
2022-07-19 00:03:23 -07:00