Skip to content
Flutter SDK

Flutter platform setup

iOS and Android project setup needed by the AppCore Flutter SDK's bridges: storage, store, push, sign-in and app links.

On this page

The SDK itself is pure Dart and needs no native setup. Each bridge you plug in does. This page lists only what the reference adapters in examples/flutter-reference/lib/adapters/ need, which is what sdk/flutter/INTEGRATION.md lists too. Skip any section for a capability your app does not enable in public config.

Warning

Not yet enabled: device verification of this setup. The reference app's checked-in iOS and Android projects do not contain these capabilities, Firebase files or URL schemes yet. It runs on the iOS Simulator in fixture mode only, and no Android build has been run. Treat this page as a checklist, not as a tested recipe.

Use a separate build flavor for each app and environment. Each flavor gets its own bundle or package id, Firebase app, store products and AppCoreManifest. None of the values below are secrets. Provider secrets (APNs key, store server keys, OAuth client secrets) belong in AppCore connections and never in the app binary.

Bridges and the plugins behind them

SDK portReference adapterPluginNeeded for
SecureStorePlatformSecureStore (secure_store.dart)flutter_secure_storageAlways: the session token and caches live here
StoreBridgeIapStoreBridge (iap_store.dart)in_app_purchasepurchase_providers contains apple or google_play
PushBridgeFcmPushBridge (fcm_push.dart)firebase_core, firebase_messagingmessaging_channels contains push
SocialSignInBridgeGoogleSignInBridge, AppleSignInBridge (social.dart)google_sign_in, sign_in_with_apple, cryptoauth_methods contains google or apple
LocalNotificationsBridgeLocalNotificationsAdapter (local_notifications.dart)flutter_local_notificationsLocal reminders (optional)

PlatformSecureStore uses the iOS Keychain with first_unlock_this_device accessibility, and Android EncryptedSharedPreferences.

iOS (ios/Runner)

ItemWhereNeeded for
Bundle id per flavorXcode target or xcconfigAll
Deployment target 15.0 (WS10 had to raise it to build the reference app with current Xcode)Xcode / PodfileAll
GoogleService-Info.plist for this flavor's Firebase iOS app (FCM transport only, no Firebase Auth)ios/Runner/Push
Capability Push Notifications and Background Modes → Remote notificationsSigning & CapabilitiesPush
APNs auth key uploaded to the Firebase project. The key is a secret and stays in Firebase.Firebase consolePush
Leave FirebaseAppDelegateProxyEnabled at its default (swizzling on)Info.plistPush
Capability Sign in with AppleSigning & CapabilitiesApple sign-in
Capability In-App Purchase; products created in App Store Connect; sandbox testersXcode / App Store ConnectPurchases
GIDClientID (iOS OAuth client id), GIDServerClientID (web client id), and the REVERSED_CLIENT_ID URL schemeInfo.plistGoogle sign-in
Custom URL scheme equal to AppCoreManifest.deepLinkScheme (CFBundleURLTypes)Info.plistDeep links

Provider setup steps: Sign in with Apple, Google sign-in, Firebase, FCM and APNs, App Store Connect.

StoreKit: in_app_purchase_storekit 0.4 and later uses StoreKit 2 by default, so serverVerificationData is the signed JWS that AppCore verifies. The purchase intent's account_binding (a UUID) is passed as applicationUserName, which becomes StoreKit's appAccountToken. IapStoreBridge does this for you.

Android (android/app)

ItemWhereNeeded for
applicationId per flavorbuild.gradle(.kts) productFlavorsAll
google-services.json for this flavor, plus the com.google.gms.google-services Gradle pluginandroid/app/src/<flavor>/Push
POST_NOTIFICATIONS permission (Android 13+)AndroidManifest.xmlPush
SHA-1 and SHA-256 of the debug, upload and Play app-signing keys registered on the Android OAuth clientGoogle Cloud consoleGoogle sign-in
Products and base plans in Play Console; license testersPlay ConsolePurchases
Intent filter for <scheme>://<app-id>/...AndroidManifest.xmlDeep links
RECEIVE_BOOT_COMPLETED and the flutter_local_notifications boot receiver; core library desugaring enabledAndroidManifest.xml, build.gradleReminders
Do not add SCHEDULE_EXACT_ALARM. Reminders are inexact by design.—Reminders

Provider setup steps: Google Play, Google sign-in, Firebase, FCM and APNs.

Play Billing: IapStoreBridge passes account_binding as applicationUserName, which becomes obfuscatedAccountId. The transaction_reference it sends to AppCore is the purchaseToken.

Warning

Not yet enabled: choosing a Play subscription offer. When a product has several base plans or offers, the reference adapter uses the plugin's default offer. Picking the offerToken that matches the server's base_plan_id is still a TODO (WS10).

Warning

Not yet enabled: Sign in with Apple on Android. It needs the browser handoff (/v1/auth/oauth/start and /v1/auth/browser-exchange). The backend returns 503 FEATURE_UNAVAILABLE for it until a Services ID and key are configured, and the SDK does not export a browser-OAuth API yet. On Android, offer Google or OTP.

Backend values that must match the app

App sideMust equal, on the AppCore side
AppCoreManifest.appId / environmentIdapp_id / environment_id returned by /v1/config/public for that host
Google serverClientId passed to GoogleSignInBridge (the public web client id)One of the Google client ids the identity connection accepts as an audience. Add the Android and iOS client ids too.
iOS bundle idThe Apple client id (audience) the identity connection accepts
Store product idsprovider_mappings[].product_id in the catalog
App Store Server Notifications v2 URL / Play RTDN Pub/Sub push endpointhttps://<your-api-host>/webhooks/apple-store/{connection_ref} / https://<your-api-host>/webhooks/google-play/{connection_ref}

Build flags (reference app)

Shell
flutter run --dart-define=APP=<app-id> --dart-define=ENV=staging \
  --dart-define=API_BASE_URL=https://<your-api-host> \
  --dart-define=GOOGLE_SERVER_CLIENT_ID=<public-web-oauth-client-id>

Release build checks

From sdk/flutter/INTEGRATION.md:

  1. flutter analyze and flutter test in sdk/flutter.
  2. In your app: flutter build ios --simulator --debug and flutter build apk --debug.
  3. grep -rE "sk_live|BEGIN PRIVATE KEY|server_key" build/ finds nothing.
  4. A release build pointed at a local fixture URL fails at startup. AppCoreManifest.validate enforces this.