Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

This page outlines the basic steps to get the Totara Mobile app running in your local development environment. If you are looking for customisation of the Totara App, we suggest you finish reading this page, then see more on App customisation. This documentation is aimed at someone with a basic understanding of mobile development, at a minimum.

Requirements

  • node >= v17.2.0 (stable LTS)
  • yarn >= v1.22.17
  • React Native CLI >= 2.1.0
  • Target Android SDK (API 31)
  • Mac OS 13 (Ventura)
  • XCode >= 14.1
  • Cocoapods = 1.11.3
  • Totara Learn >= 13 (needed only if you need to connect to Totara)

Code repository

Before setting up the git repository, please familiarise yourself with how to get SSH access to our repos.

In the sequence, clone the official repository for partners via SSH.

Clone code
git clone ssh://git@code.totaralms.com/totara-mobile.git

Adding project local configuration

  1. Duplicate the file src/totara/lib/config.local.example.ts and name the copy as src/totara/lib/config.local.ts.
  2. Override any local settings if required. If no changes are required the default Totara setup is used.

Adding Firebase configuration

The basic Firebase setup can be done by duplicating the files and renaming as follows:

  • Android: android/app/google-services.example.json; should be renamed to google-services.json.
  • iOS: ios/GoogleService-Info.example.plist; should be renamed to GoogleService-Info.plist

This will be sufficient to prepare you for development of features not related to Firebase. If you require further Firebase setup, see App customisation.

Dependencies

Javascript dependencies

Install all the dependencies by running the following in the root directory:

Install
yarn

Native dependencies

Install iOS native dependencies:

iOS dep
cd ios && pod install

There's no extra step for Android

Running the app

You can either plug in a real device or leave it for running in a device simulator. The following commands are enough to run the app. Run the relevant command from the root directory of the project.

Run on terminal
#Running on iOS
yarn ios
#Running on Android
yarn android
  • No labels