Appearance
Building and releasing
The app reads your domain, WebSocket server and Firebase keys at build time from a small JSON file, so one code base builds for any installation.
Requirements
- Flutter 3.47 or newer (the app was built and tested with 3.47.8)
- Android: Android SDK and JDK 17
- iOS: a Mac with Xcode and an Apple Developer account
1. Build settings
Copy mobile/env/prod.example.json to mobile/env/prod.json and fill it in:
| Key | Example | Meaning |
|---|---|---|
APP_ENV | prod | prod for store builds |
SITE_HOST | your-exchange.com | Your site's domain (no https://) |
SITE_SCHEME | https | Always https in production |
CONNECT_HOST | (empty) | Leave empty. Only for emulators that reach the server through another address. |
SOCKET_HOST | socket.your-exchange.com | Your Soketi / Pusher host (WebSockets) |
SOCKET_SCHEME / SOCKET_PORT | wss / 443 | |
SOCKET_KEY | The same value as PUSHER_APP_KEY in the server .env | |
APP_SCHEME | cryptotech | Optional. Must equal MOBILE_APP_SCHEME on the server (social sign-in returns through it) |
FIREBASE_* | Optional, for push notifications. See Push notifications. Empty = push off. |
Rebuild after changing these
The values are compiled into the app. A new socket key or domain needs a new build.
2. Name, icon and IDs
| What | Where | Default |
|---|---|---|
| Android application ID | mobile/android/app/build.gradle.kts (applicationId, namespace) | exchange.cryptotech.exchange_app |
| iOS bundle ID | Xcode → Runner → Signing & Capabilities | exchange.cryptotech.exchangeApp |
| Version | mobile/pubspec.yaml (version: 0.1.0+1) | Raise it for every store upload |
| Social sign-in link | mobile/android/app/src/main/AndroidManifest.xml (android:scheme) | cryptotech |
Use your own IDs before publishing: store IDs can't be changed later.
3. Build
From the mobile/ folder:
bash
flutter pub get
# Android (Google Play)
flutter build appbundle --release --dart-define-from-file=env/prod.json
# iOS (App Store), then upload from Xcode → Product → Archive
flutter build ipa --release --dart-define-from-file=env/prod.jsonAndroid release builds need your own signing key (Flutter: build and release an Android app).
Server checklist
- The site runs on
httpswith a valid certificate -
PUSHER_APP_KEYin.envmatchesSOCKET_KEY, and the WebSocket server is reachable from the internet -
MOBILE_APP_SCHEMEmatches the app's scheme (only if you changed it) - For Apple sign-in in the app: the Apple callback works over
https(Apple posts back to it) - For push:
FIREBASE_CREDENTIALSis set and Horizon was restarted (Push notifications) - For passkeys in the app:
PASSKEYS_RP_IDis your domain, andPASSKEYS_ANDROID_PACKAGE+PASSKEYS_ANDROID_FINGERPRINTS(Android) andPASSKEYS_IOS_APP_IDS(iOS) are set. Check thathttps://yourdomain.com/.well-known/assetlinks.jsonand/.well-known/apple-app-site-associationopen. The Android fingerprints are in Play Console → App integrity → App signing (add both the app signing and the upload key). On iOS also add the Associated Domains capabilitywebcredentials:yourdomain.comin Xcode (step by step: Passkey sign-in)
