Mobile Development
Please refer to the Environment Setup guide to set up the development environment.
Development Tools
Mobile apps are built with React Native using Expo. They are written in TypeScript with some Swift and Kotlin native modules. Additional technologies include:
- Redux Toolkit for state management
- redux-saga for side-effect handling
- React Native Track Player for audiobook playback
- Readium Swift and Kotlin toolkits for epub rendering
Developing TypeScript Code
If you're only modifying TypeScript code, you don’t need Android Studio or Xcode. Reach out to Shane for access to a development build you can install on your device.
To start the dev server, cd into the mobile directory and run:
yarn start:device
Scan the QR code to launch the development build and load code from your machine.
Changes to redux-saga can break hot reload. Press r in the terminal or use
the device's 3-finger long-press menu to reload.
Developing Native Code
To modify Swift or Kotlin native modules, you’ll need Xcode or Android Studio.
Generate a local native project by running in the mobile directory:
yarn expo prebuild --clean -p android # or "ios"
This creates the android or ios directory for opening in Android
Studio/Xcode. Storyteller’s native code lives in the Readium module.
After building the app and loading the Expo dev client, run:
yarn sim:android # or "ios"