Documentation menu

Build and publish the app

The app is in mobile/. One app covers customers and providers, so you publish one listing per store.

Before the first build

  1. Rebrand it. Give the app your name, package and bundle ID, icon, splash screen and API address with the rebrand script: Rebrand the app. Do this before your first store upload; the package and bundle ID can't change afterwards.

  2. Set the API address. The rebrand script writes api_base_url_prod into the app. You can also pass it when building:

    --dart-define=API_BASE_URL=https://api.yourbrand.com/api/v1
    

    It must start with https://: the production app refuses plain HTTP.

  3. Firebase files for push notifications: Push notifications.

  4. Google Maps (optional, for the provider map): put the key in android/local.properties as MAPS_API_KEY=... and in ios/Runner/Info.plist as GMS_API_KEY. The map button appears once the key is also set in Admin → Settings → Integrations.

Flavors

The app has two flavors:

Flavor Entry point App ID Name API
dev lib/main_dev.dart <your id>.dev YourBrand Dev Your computer (HTTP allowed)
prod lib/main_prod.dart <your id> YourBrand Your server (HTTPS only)

Publish only prod. The two can be installed on the same phone, which is handy for testing.

Version number

Set it in mobile/pubspec.yaml:

version: 1.0.0+1

1.0.0 is the version users see. The number after + is the build number; raise it for every upload, or the stores reject the build.

Android: Google Play

  1. Create an upload key once and keep it (and its passwords) somewhere safe. See Android signing in Rebrand the app. Without android/key.properties, release builds are signed with the debug key and Play rejects them.

  2. Build the app bundle:

    cd mobile
    flutter build appbundle --flavor prod -t lib/main_prod.dart
    

    The file is build/app/outputs/bundle/prodRelease/app-prod-release.aab.

  3. In Play Console, create the app and upload the .aab to the Internal testing track first. Try it on a phone before you promote it to production.

  4. Copy the app signing key SHA-256 from Test and release → App integrity into Admin → Settings → Deep links, so shared links open the app.

To install a test build on a phone without Play: flutter build apk --flavor prod -t lib/main_prod.dart, then copy build/app/outputs/flutter-apk/app-prod-release.apk to the phone.

iOS: App Store

You need a Mac with Xcode and a paid Apple Developer account.

  1. Register the bundle ID in the Apple Developer portal with the Push Notifications and Associated Domains capabilities.

  2. Open mobile/ios/Runner.xcworkspace in Xcode, select the Runner target and pick your team under Signing & Capabilities.

  3. Build:

    cd mobile
    flutter build ipa -t lib/main_prod.dart
    
  4. Upload the .ipa from build/ios/ipa/ with Transporter or Xcode's Organizer, test it in TestFlight, then submit it for review in App Store Connect.

Store listing checklist

Both stores ask for these. Have them ready before you submit:

  • Privacy policy URL. Put your policy on your website; the same text can go in Settings → Content so it shows in the app.
  • Account deletion. Users can delete their account in the app (Profile → Delete account), and on the web at https://your-api-domain/account/delete. Google Play asks for that web address.
  • A test account for the reviewers, with sample data: a customer account, and if you like a provider account. Apple reviewers sign in to check the app.
  • Screenshots for each phone size the store asks for, an app icon (taken from your build) and a short and long description.
  • Data safety / App privacy forms. The app collects name, email, phone (optional), approximate and precise location (only while in use), photos the user uploads, and device push tokens. Payments are handled by Stripe if you use card payments. This covers the app as shipped; add anything your own changes or extra services collect.
  • Content rating questionnaire. NiceServe has user-to-user chat, so answer that question with yes.

After publishing

  • Add the store links in Admin → Settings → Deep links → Store links. They appear on the web page people see when they open a shared link without the app.
  • For each new version: raise the version in pubspec.yaml, build, upload. See Update to a new version.