Skip to content

Security & Distribution

dlbreitenbuecher edited this page Sep 27, 2021 · 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 environment.tsx file is used for determining the api url to use in different environments. (i.e. development, staging, or production)

Use of the Google Maps 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.

Creating New Builds

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.

  • For a standard build to upload to AppHost, choose the APK build option when prompted. This will produce an IPA file.

When the build is complete, download the APK file Expo.

For iOS, run expo build:ios --release-channel prod* and follow the prompts using the AppleID login information.

  • For a standard build to upload to AppHost, choose the Archive option when prompted. This will produce an IPA file.

When the build is complete, download the IPA file from Expo.

Notes

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

A new build is required with any of the following changes in the app.json file:

  • Increment the Expo SDK Version
  • Change anything under the ios, android, or notification keys
  • Change your app splash
  • Change your app icon
  • Change your app name
  • Change your app owner
  • Change your app scheme
  • Change your bundled assets under assetBundlePatterns

Publishing Updates

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.

New updates should automatically install next time the user opens the app.

Distributing the App

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

After creating a new build, 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