3 KiB
3 KiB
Configuration Files Requirements
This document outlines the configuration files required for the Alerte Secours mobile app and how to set them up.
Environment Variables
The app uses environment variables for configuration and sensitive information. There are several environment files:
Development Environment
Copy .env.default
to .env.local
(which is git-ignored) and fill in the required values:
BACKGROUND_GEOLOCATION_LICENSE
: License key for react-native-background-geolocationBACKGROUND_GEOLOCATION_HMS_LICENSE
: HMS license key for react-native-background-geolocation
Production Environment
Copy .env.prod.example
to .env.prod
(which is git-ignored) and fill in the required values:
SENTRY_DSN
: Your Sentry DSN for error trackingSENTRY_ORG
: Your Sentry organizationSENTRY_PROJECT
: Your Sentry project nameASC_API_KEY_ID
: Your App Store Connect API Key IDASC_API_ISSUER_ID
: Your App Store Connect API Issuer IDASC_API_KEY_PATH
: Path to your App Store Connect API Key filePROVIDER_ID
: Your App Store Connect Provider ID
Staging Environment
Copy .env.staging.example
to .env.staging
(which is git-ignored) and fill in the required values with the same information as the production environment, but with staging-specific values where applicable.
Google Services Configuration
iOS
- Copy
ios/GoogleService-Info.example.plist
toios/GoogleService-Info.plist
- Copy
ios/AlerteSecours/GoogleService-Info.example.plist
toios/AlerteSecours/GoogleService-Info.plist
- Fill in the following values:
API_KEY
: Your Google API keyGCM_SENDER_ID
: Your GCM sender IDPROJECT_ID
: Your Firebase project IDSTORAGE_BUCKET
: Your Firebase storage bucketGOOGLE_APP_ID
: Your Google app ID
Android
- Copy
android/app/google-services.example.json
toandroid/app/google-services.json
- Fill in the following values:
project_number
: Your Firebase project numberproject_id
: Your Firebase project IDstorage_bucket
: Your Firebase storage bucketmobilesdk_app_id
: Your Firebase mobile SDK app IDclient_id
: Your OAuth client IDcurrent_key
: Your Google API key
Expo Updates Configuration
- Copy
ios/AlerteSecours/Supporting/Expo.example.plist
toios/AlerteSecours/Supporting/Expo.plist
- Fill in the
EXUpdatesCodeSigningCertificate
with your Expo code signing certificate
How to Obtain These Values
Firebase Configuration
- Go to the Firebase Console
- Select your project or create a new one
- Add iOS and Android apps to your project
- Download the configuration files for each platform
Background Geolocation License
Purchase a license from Transistor Software
Expo Code Signing Certificate
Generate a code signing certificate for Expo updates by following the Expo documentation