/mobile-playground

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

mobile-playground

Github Actions

This repository contains a playground / showcase application making use of:

  • swarming library
  • DXOS SDK

First steps

Install dependencies:

yarn
yarn build

Install Ionic framework globally:

npm install -g @ionic/cli

Development in browser

The React app can be developed without running Xcode or Android Studio first.

To run the application in the browser:

yarn start

iOS development

The following sections describe preparing and running the app in Xcode.

Installing Xcode

  1. Install Xcode
  2. Install cocoapods

Configuring Xcode

  1. Initialize Xcode project:
yarn init:ios
  1. Start the iOS project:
yarn start:ios
  1. Install pods

Go to ./ios/App/ folder, and run:

pod install
  1. Update project's Signing & Capabilities

In XCode:

First, go to project's Signing & Capabilities, and add a team.

signing

Then, select the team, and change Bundle Indentifier to a custom string, e.g. io.ionic.starter.<YOUR NAME>

Expected:

expected

If you're seeing the following error:

no-devices

Then follow this answer.

Running the iOS app

Start the app in an emulator by clicking on the play button

To run on a physical device, unlock the device first enable developer mode

Android development

The following sections describe preparing and running the app in Android Studio.

Preparing Android Studio

  1. Install Android Studio

Continue with "OK" in case of the following screen:

extension-blocked

  1. Init the Android project:
yarn init:android
  1. Start the Android Studio project:
yarn start:android

The command should result in Android Studio automatically opening with the Ionic project open.

If you're seeing missing android-N errors:

missing-android

Then go to tools => SDK Manager and install the corresponding API level record:

install-android

Hit apply to trigger installation. Afterward close Android Studio, and run yarn start:android again.

  1. Adding emulator device

Android Studio needs an emulator device to run the app (unless running on physical device).

Go to tools => AVD Manager, and add a new device.

Select a System Image with corresponding API level:

system-image

Hit Download if the image is not yet downloaded.

After adding the device, hit the play icon in the newly created device's Actions section, to make sure it runs properly:

device-play

Running the Android app

To run the Android app, git the green 'play' button with a device selected:

run-app