Git Product home page Git Product logo

ketaminekid423 / react-native-test-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/react-native-test-app

0.0 1.0 0.0 5.55 MB

react-native-test-app provides a test app for all supported platforms as a package

License: MIT License

Ruby 10.65% Swift 14.01% Objective-C 4.54% Kotlin 10.53% JavaScript 43.21% Shell 0.81% C++ 15.13% C 0.44% Java 0.06% Objective-C++ 0.50% PowerShell 0.11%

react-native-test-app's Introduction

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 how RNTA is used at Microsoft, and see a demo of how to add it to an existing library - you can watch the "Improve all the repos – exploring Microsoft’s DevExp" talk by @kelset and @tido64 from React Native Europe 2021.

For more about the motivation and 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.

react-native-test-app's People

Contributors

tido64 avatar renovate[bot] avatar dependabot[bot] avatar arazabishov avatar semantic-release-bot avatar anastasiaorishchenko avatar microsoftopensource avatar sveinar avatar sweggersen avatar asmundg avatar microsoft-github-operations[bot] avatar tom-un avatar shivakumar-sg avatar saadnajmi avatar renovate-bot avatar prashant1207 avatar kelset avatar amdingler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.