Mobile App — Setup
Get the WhatsMine Agent app building and running on an emulator or device. The Android & iOS projects are already generated and configured, so this is mostly installing the toolchain and fetching packages.
1. Prerequisites
- Flutter SDK — Dart
>=3.6.0, Flutter>=3.27.0(the versions pinned inpubspec.yaml). - Android — Android Studio + an emulator or a USB device with USB debugging.
- iOS (Mac only) — Xcode + CocoaPods, and a simulator or device.
- A running WhatsMine server with the mobile API enabled (this repo). For a first run you can point at the public demo — see Configuration.
Confirm the toolchain is healthy before you start:
flutter doctor
2. Fetch dependencies
cd Chat-Agent-App
flutter pub get
The native projects ship with the package id com.spagreen.whatsmine.chat. What's already wired for you:
- Android —
AndroidManifest.xmlwithINTERNET+POST_NOTIFICATIONSandurl_launcherquery intents;app/build.gradle.ktswithminSdk 23, multidex andcoreLibraryDesugaring(needed byflutter_local_notifications); and a rootbuild.gradle.ktsthat forcescompileSdk 36on all modules (required byfile_picker/image_picker). Verified withflutter build apk --debug✓. - iOS —
Info.plistwith camera/photo/mic usage strings, display name andtel/mailtoquery schemes; a privacy manifest atios/Runner/PrivacyInfo.xcprivacy.
One manual iOS step
In Xcode, add PrivacyInfo.xcprivacy to the Runner target's Copy Bundle Resources so it ships in the build: open ios/Runner.xcworkspace, drag the file into the Runner group, and tick the Runner target.
If you ever re-run flutter create .
Re-apply the staged copies kept in platform/ (the source of truth): platform/android/AndroidManifest.xml, platform/ios/Info.plist.additions.xml and platform/ios/PrivacyInfo.xcprivacy.
3. Point the app at a server
Server URL and Pusher credentials are baked in at build time — there is no in-app server/Pusher screen. Either edit the defaults in lib/src/core/config/app_config.dart, or pass them per build with --dart-define. Full details (and the demo defaults) are in Configuration.
4. Run
# uses the defaults compiled into app_config.dart
flutter run
…or override the server and realtime for this run:
flutter run \
--dart-define=SERVER_URL=https://your-domain.com \
--dart-define=PUSHER_KEY=your_pusher_key \
--dart-define=PUSHER_CLUSTER=mt1
Sign in with an agent account. For the demo server the credentials are client@spagreen.net / 12345678.
5. Sanity checks
flutter analyze # static analysis / lints
flutter test # widget + unit tests
flutter build apk --debug # confirm the Android build wiring
If flutter run connects but login fails, the issue is almost always the server URL or HTTPS/CORS on the backend — jump to Publishing → Troubleshooting and the main Real-time & Push guide.