This section contains the setup instructions for various credentials and secrets required when either running the wallet in dev mode, or deploying a production build to the Alfajores or Forno networks.
The wallet uses the following services:
- Firebase Realtime Database
- Firebase Authentication
- Firebase Analytics
- Firebase Admin
- Sentry
- Segment Analytics
- Codepush
N.B. The wallet only writes data to the users
document in the RTDB.
The wallet requires a GoogleService-Info.plist
file for iOS, and a google-services.json
file for Android. Specifically, the format is GoogleService-Info.{$env}.plist
, where ${env}
is the environment setting name, e.g. alfajoresdev
. You can get the file from the firebase server, and place it in the ios
folder.
N.B.
iOS expects a GoogleService-Info.plist
in the ios
folder
Android expects a google-services.json
in the android/app/src/${env}
folder
- When archiving the wallet, specify the environment file to be used, and ensure that
FIREBASE_ENABLED=true
- Ensure that the
GoogleService-Info.${env}.plist
file is present in theios
folder.
The wallet is connected to a Sentry deployment for issue/error tracking.
The wallet requires a Sentry DSN. This can remain public as it does not give read access to any important information in the Sentry deployment
- When archiving the wallet, specify the environment file to be used, and ensure that
SENTRY_ENABLED=true
- Ensure that the
secrets.json
file has the propertySENTRY_CLIENT_URL
set as the DSN. (Seesecrets.json.template
)
The wallet integrates Firebase analytics through Segment's aggregator. Analytics is disabled by default for development. See ValoraAnalytics.isEnabled
The wallet requires the Segment API key. This should not remain public as it will allow users to write analytics data to the server.
- Ensure that the
secrets.json
file has the propertySENTRY_CLIENT_URL
set as the DSN. (Seesecrets.json.template
)
The wallet has OTA updates enabled for javascript bundle changes. This is executed by Codepush.
The wallet requires that you set the CodePushDeploymentKey:<key>
pair in the Info.plist
file.
- When archiving the wallet, specify the environment file to be used, and ensure that the key provided in the key value pair matches the Codepush environment that is expected to be the deployment target.
e.g. When archiving .env.alfajores
, use the staging Codepush key.
For Android you will have to place the Deployment key in strings.xml
. To do generate the deployment key using this command appcenter codepush deployment list -a Zed-Labs/kolektivo -k
. After that place that key in the CodePushDeploymentKey string in the strings.xml
file.
The next goal is to commit encrypted versions of the above files to the repo, where a developer can simply authenticate with GCP and have the files decrypted.
secrets.json
- Sentry, SegmentGoogleInfo.${env}.plist
- FirebaseInfo.plist
- Codepush