This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This repository adheres to the conventional commit format via commitlint. Commit messages must match the pattern:
type(scope?): subjectScope is optional. You can also specify multiple scopes using / or , as
delimiters.
Following this is necessary to pass CI.
- Node LTS (see releases for specific versions)
- Yarn Classic
- macOS: Homebrew
We use the Example app for most (if not all) development of
react-native-test-app. Some platforms may require extra steps for the initial
set up. Please follow the steps below, then jump to the appropriate section(s)
for the final steps.
Open a terminal and navigate to your clone of this repository:
cd react-native-test-appThe first thing we have to do is to install the npm dependencies:
yarnOnce Yarn is done installing dependencies, we need to navigate to the example
folder:
cd exampleNow we should be ready to start the app. Jump to the appropriate section below for further instructions.
To start the Android app, run:
yarn androidAlternatively, you can also run the app within Android Studio by pointing it to
the android folder.
Before you can run the iOS app, you must first install its native dependencies:
pod install --project-directory=iosThis command is also responsible for generating the Xcode project. To start the iOS app, run:
yarn iosAlternatively, you can also run the app within Xcode by opening the Xcode workspace:
open ios/Example.xcworkspaceNote: If you made changes to
app.jsonor any other assets, you should re-runpod installto make sure that the changes are included in the Xcode project.
Before you can run the macOS app, you must first install its native dependencies:
pod install --project-directory=macosThis command is also responsible for generating the Xcode project. To start the macOS app, run:
yarn macosAlternatively, you can also run the app within Xcode by opening the Xcode workspace:
open macos/Example.xcworkspaceNote: If you made changes to
app.jsonor any other assets, you should re-runpod installto make sure that the changes are included in the Xcode project.
Before you can run the Windows app, you must first generate it:
npx install-windows-test-app --use-nugetTo start the Windows app, run:
yarn windowsAlternatively, you can also run the app within Visual Studio by opening the solution file:
start windows/Example.sln
If you choose to use Visual Studio, remember to first set the target platform to
x64. It is set to ARM by default.
Note: If you made changes to
app.jsonor any other assets, you should re-runinstall-windows-test-appto make sure that the changes are included in the Visual Studio project.
When adding new files, please make sure they are published (or not if it's for internal use only). To get a list of files that get published, you can run:
npm pack --dry-run --verboseIf your files are missing, you can modify the files section in package.json.
react-native-test-app supports multiple versions of React Native. Use
set-react-version to set the version, e.g. to use 0.68:
npm run set-react-version 0.68This will modify both package.json and example/package.json to use packages
that are compatible with specified React Native version.
To avoid issues, remember to clear out node_modules folders before you run
yarn:
yarn clean
yarn