Skip to content

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.

20 minutesDeveloperMobile developerVerified against the platform code

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:

KeyExampleMeaning
APP_ENVprodprod for store builds
SITE_HOSTyour-exchange.comYour site's domain (no https://)
SITE_SCHEMEhttpsAlways https in production
CONNECT_HOST(empty)Leave empty. Only for emulators that reach the server through another address.
SOCKET_HOSTsocket.your-exchange.comYour Soketi / Pusher host (WebSockets)
SOCKET_SCHEME / SOCKET_PORTwss / 443
SOCKET_KEYThe same value as PUSHER_APP_KEY in the server .env
APP_SCHEMEcryptotechOptional. 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 ​

WhatWhereDefault
Android application IDmobile/android/app/build.gradle.kts (applicationId, namespace)exchange.cryptotech.exchange_app
iOS bundle IDXcode → Runner → Signing & Capabilitiesexchange.cryptotech.exchangeApp
Versionmobile/pubspec.yaml (version: 0.1.0+1)Raise it for every store upload
Social sign-in linkmobile/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.json

Android release builds need your own signing key (Flutter: build and release an Android app).

Server checklist ​

  • The site runs on https with a valid certificate
  • PUSHER_APP_KEY in .env matches SOCKET_KEY, and the WebSocket server is reachable from the internet
  • MOBILE_APP_SCHEME matches 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_CREDENTIALS is set and Horizon was restarted (Push notifications)
  • For passkeys in the app: PASSKEYS_RP_ID is your domain, and PASSKEYS_ANDROID_PACKAGE + PASSKEYS_ANDROID_FINGERPRINTS (Android) and PASSKEYS_IOS_APP_IDS (iOS) are set. Check that https://yourdomain.com/.well-known/assetlinks.json and /.well-known/apple-app-site-association open. 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 capability webcredentials:yourdomain.com in Xcode (step by step: Passkey sign-in)

Owner documentation for the CryptoTech exchange platform.