-
Notifications
You must be signed in to change notification settings - Fork 140
Testing on iOS and Android
Brett Weissbart edited this page Jul 25, 2019
·
2 revisions
If you installed Xcode as part of the setup process, you have everything you need to test in an iOS simulator. Simply run ios and a simulator will automatically boot with the application.
React Native cannot automatically start an Android emulator, so you'll need to do one of the following in order to test on Android:
Option 1: create and start an emulator
- Open Android Studio
- Click the AVD Manager button (top right menu)
- If you don't have any virtual devices set up, click Create Virtual Device and follow the wizard
- Select a virtual device and click Start to open the emulator
- You can then run PirateShip (see below) and it will launch on the selected emulator
Option 2: run on a physical device
- Connect an Android device to your computer via USB
- Open the Settings app
- Navigate to "About phone"
- Tap on the "Build number" item 10x in a row to enable developer mode
- Go back to the main Settings menu and select "Developer options"
- Verify that the "USB debugging" checkbox is enabled
- You may need to change your phone's USB mode from charging only to data transfer mode. Refer to your phone's documentation for more information.
- From your computer, run
adb devices
which will list all physical and emulator devices and their debugging status- If the device isn't displayed, either the phone isn't in developer mode, USB debugging mode is disabled, or the USB mode is set to charging only
- If the device is listed as "unauthorized", USB debugging is disabled or you haven't given the current computer permission to access your device. Try tapping "Revoke USB debugging authorizations" and then turn USB debugging off then on again and you should get a prompt to allow debugging
- If the device is listed as "device" debugging should be ready to go. Run android and the application will run on the connected device.
Getting Started
- Flagship Technical Introduction
- Setting up Your Development Environment
- Getting Started with Flagship
- Creating a Flagship App
How To
- Running Flagship Apps
- Managing Environments
- Creating App Icons
- Creating Launch Screens
- Signing Your Apps
- Using React Native Permissions v2
- Using SSL Certificate Pinning
- Initializing Multiple Xcode Targets
Major Releases