react-native-test-app provides a test app for all supported platforms as a package
Перейти к файлу
Tommy Nguyen d1ea8f7463
chore: enable more TypeScript checks (#494)
2021-09-16 01:00:26 +02:00
.github chore: configure Renovate (#490) 2021-09-14 08:25:47 +02:00
.vscode fix(Windows): Test app fails to load embedded JS bundle (#250) 2020-11-24 10:44:46 +01:00
android chore(android): move dependencies to `dependencies.gradle` for Dependabot (#481) 2021-09-08 10:30:47 +02:00
example chore(deps-dev): bump jest from 27.1.0 to 27.1.1 in /example (#489) 2021-09-13 07:58:50 +00:00
ios fix(apple): avoid invoking Node for module resolution (#450) 2021-08-16 10:29:56 +02:00
macos fix(apple): notify users when resources are missing (#436) 2021-08-13 14:52:48 +02:00
scripts chore: enable more TypeScript checks (#494) 2021-09-16 01:00:26 +02:00
test fix(apple): notify users when resources are missing (#436) 2021-08-13 14:52:48 +02:00
windows fix(windows): invariant violation when web debugging is enabled (#493) 2021-09-15 20:56:09 +02:00
.clang-format fix(Windows): Load React components (#166) 2020-09-07 11:05:39 +02:00
.editorconfig Add EditorConfig and format all files (#70) 2020-04-18 14:26:52 +02:00
.gitattributes iOS: Set up example project and build CI (#8) 2020-03-03 12:25:03 -08:00
.gitignore chore: fix tests build failing due to symlink in node_modules (#433) 2021-08-13 14:51:58 +02:00
.rubocop.yml fix(Apple): Allow passing options to use_react_native! (#266) 2021-01-04 11:57:12 +01:00
.swiftlint.yml chore(Apple): Use SwiftFormat (#245) 2020-11-16 11:20:09 +01:00
.yarnrc ci: Fix node_modules cache sometimes getting stale (#217) 2020-09-14 09:27:39 +02:00
.yarnrc-offline ci: Fix node_modules cache sometimes getting stale (#217) 2020-09-14 09:27:39 +02:00
Brewfile ci: integrate ktlint (#279) 2021-02-06 11:11:56 +01:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-01-20 05:22:23 -08:00
CONTRIBUTING.md docs: refresh README (#413) 2021-07-20 12:38:56 +02:00
Gemfile ci: use rubocop-minitest as suggested by RuboCop (#280) 2021-02-06 00:53:51 +01:00
Gemfile.lock chore(deps): bump rubocop from 1.19.1 to 1.20.0 (#470) 2021-08-30 07:26:25 +00:00
LICENSE Initial LICENSE commit 2020-01-20 05:22:24 -08:00
README.md docs: refresh README (#413) 2021-07-20 12:38:56 +02:00
ReactTestApp-DevSupport.podspec fix(Apple): Fix tests depending on ReactTestApp-DevSupport not building (#181) 2020-08-04 21:30:50 +02:00
SECURITY.md Initial SECURITY.md commit 2020-01-20 05:22:25 -08:00
package.json chore: enable more TypeScript checks (#494) 2021-09-16 01:00:26 +02:00
react-native.config.js fix: warn and skip unsupported versions (#373) 2021-06-29 13:03:40 +02:00
test-app.gradle fix: support for react-native 0.65 (#443) 2021-08-16 12:13:52 +02:00
test_app.rb fix: use app display name from the manifest (#276) 2021-02-04 09:07:03 +01:00
tsconfig.json chore: enable more TypeScript checks (#494) 2021-09-16 01:00:26 +02:00
yarn.lock chore(deps-dev): bump prettier from 2.3.2 to 2.4.0 (#487) 2021-09-13 08:32:23 +00:00

README.md

React Native Test App

Open in Visual Studio Code build npm version

React Native Test App provides test apps for all platforms as a package. It handles the native bits for you so you can focus on what's important: your product.

If you want to learn more about the motivation or the design of this tool, you can refer to the wiki.

Quick Start

Install react-native-test-app as a dev dependency. We will use the wizard to generate your test app:

yarn add react-native-test-app --dev
yarn init-test-app

In this example, we will create a project named "sample" in sample with test apps for all platforms:

✔ What is the name of your test app? … sample
? Which platforms do you need test apps for? 
Instructions:
    ↑/↓: Highlight option
    ←/→/[space]: Toggle selection
    a: Toggle all
    enter/return: Complete answer
◉   Android
◉   iOS
◉   macOS
◉   Windows
✔ Where should we create the new project?? … sample

Run yarn inside the new project folder:

cd sample
yarn

Once the dependencies are installed, follow the platform specific instructions below.

Android

Bundle the JS code and assets by running:

yarn build:android

If you're going to use the development server, you can skip this step.

To start the Android app, run:

yarn android

Alternatively, you can also run the app within Android Studio by pointing it to the android folder.

iOS

Bundle the JS code and assets by running:

yarn build:ios

If you're going to use the development server, you can skip this step.

Before you can run the iOS app, you must first install its native dependencies:

pod install --project-directory=ios

This command is also responsible for generating the Xcode project. To start the iOS app, run:

yarn ios

Alternatively, you can also run the app within Xcode by opening the Xcode workspace:

open ios/Sample.xcworkspace

Note: If you made changes to app.json or any other assets, you should re-run pod install to make sure that the changes are included in the Xcode project.

macOS

Bundle the JS code and assets by running:

yarn build:ios

If you're going to use the development server, you can skip this step.

Before you can run the macOS app, you must first install its native dependencies:

pod install --project-directory=macos

This command is also responsible for generating the Xcode project. To start the macOS app, run:

yarn macos

Alternatively, you can also run the app within Xcode by opening the Xcode workspace:

open macos/Sample.xcworkspace

Note: If you made changes to app.json or any other assets, you should re-run pod install to make sure that the changes are included in the Xcode project.

Windows

Bundle the JS code and assets by running:

yarn build:ios

Before you can run the Windows app, you must first generate it:

yarn install-windows-test-app --use-nuget

To start the Windows app, run:

yarn windows

Alternatively, you can also run the app within Visual Studio by opening the solution file:

start windows/Sample.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.json or any other assets, you should re-run install-windows-test-app to make sure that the changes are included in the Visual Studio project.

Configuring the Test App

All configuration of the test app is done via app.json (otherwise known as the manifest). You can learn more about that in the wiki.

Additionally, you can find platform specific documentation below:

Known Issues

For a list of known issues and workarounds, please go to the Troubleshooting page in the wiki.