Getting started with the Totara Mobile app

Overview

This page outlines the basic steps to get the Totara Mobile app running in your local development environment. This documentation is aimed at someone with a basic understanding of mobile development, at a minimum.

If you are considering customising the Totara App, we suggest you finish reading this page, then see more on App customisation.

The Totara Mobile app is built with React Native and Expo Application Services (EAS).  You will need to set up an account with Expo.  Once EAS has completed the build, it is able to notify you of the result in Slack and/or deliver the built apps for testing.

https://expo.dev


This guide assumes you are already familiar with setting up a mobile development environment.  If you need to set up from scratch, you can find help here: https://reactnative.dev/docs/set-up-your-environment

Local Development

App Requirements

  • node = LTS release v20

  • Java Development Kit (zalu17)

  • Mac OS >= 13.6.x (Ventura)

  • XCode >= 15.2

  • Cocoapods = 1.14.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
git checkout master

Install EAS tools:

npm install -g eas-cli

Install dependencies:

npm install

Prepare Firebase configuration files:

cp GoogleService-Info.example.plist GoogleService-Info.plist
cp google-services.example.json google-services.json

Run the app:

npm run start

App Builds

Requirements

  • Sign up for Expo.dev for automated builds (start with the Free plan)

  • Sign up for Appetize.io for browser-based simulator testing (Optional - start with a Free plan)

Expo Setup

You will need to set up a new project in Expo and fill in the fields in app.config.ts

  • Slug

  • Name

  • Version

  • EAS Project Id

You will also need to set up the following secrets in Expo

  • GOOGLE_SERVICES_FILE_ANDROID

  • GOOGLE_SERVICES_FILE_IOS

  • SLACK_WEBHOOK_URL (Optional - for Slack build notifications)

  • APPETIZE_API_KEY (Optional - for Appetize testing)

  • APPETIZE_IOS_APP_PUBLIC_KEY (Optional - for Appetize testing)

  • APPETIZE_ANDROID_APP_PUBLIC_KEY (Optional - for Appetize testing)

  • SENTRY_AUTH_TOKEN

  • SENTRY_DSN

  • SENTRY_ORG

  • SENTRY_PROJECT

Expo secrets

If you received an error as below:

Is a common one we see and as far as we have been able to tell, it's a problem in the Expo infrastructure and re-runnning the build in the Expo UI tends to fix it.

✖ Prebuild failed Error: [android.dangerous]: withAndroidDangerousBaseMod: Could not find MIME for Buffer <null> Error: [android.dangerous]: withAndroidDangerousBaseMod: Could not find MIME for Buffer <null> at Jimp.parseBitmap (/home/expo/workingdir/build/node_modules/jimp-compact/dist/jimp.js:1:125518) at Jimp.parseBitmap (/home/expo/workingdir/build/node_modules/jimp-compact/dist/jimp.js:1:8514) at /home/expo/workingdir/build/node_modules/jimp-compact/dist/jimp.js:1:7613 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) npx expo prebuild --skip-dependency-update react --platform android exited with non-zero code: 1

 

Starting a Build

To start a build in Expo using EAS:

npx eas build --platform all --profile development

Â