Skip to content

Security & Distribution

Martha Sharpe edited this page Dec 7, 2020 · 8 revisions

Security

The package expo-secure-store encrypts and stores key-value pairs locally. This app uses SecureStore for the auth token from Grassp API.

The app.config.ts file allows dynamic configuration in addition to the usual app.json file. It contains sensitive environment variables and is added to .gitignore. If anything changes in the app configuration, a new build of the app is required.

The environment.tsx file is used for determining the api url to use in different environments. (i.e. development, staging, or production)

The .extra property in the app manifest is used to store the api url as well as the Google Maps API key. Use of this API key is restricted to the Grassp App identifier as added security.

Distribution

Release channels determine whether the staging or production api will be used with the app. The release channel is set anytime the app is built or published.

App builds are managed through Expo for both Android and iOS.

To do a production build for Android, run expo build:android --release-channel prod and follow the prompts. When the build is complete, download the APK file.

For iOS, run expo build:iOS --release-channel prod and follow the prompts using the AppleID login information. When the build is complete, download the IPA file.

To use the staging API instead, replace prod with staging in the above commands.

To publish changes after the initial build for both Android and iOS, run expo publish --release-channel prod. Installed apps should receive over-the-air updates through Expo.

The Grassp Driver App is distributed through AppHost, which is a third-party SaaS website providing free hosting and distribution for enterprise apps.

Upload the APK and IPA files to generate a single link for both Android and iOS. The software detects the device's operating system and provides platform-specific instructions for downloading the app.

Clone this wiki locally