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 port | Reference adapter | Plugin | Needed for |
|---|---|---|---|
SecureStore | PlatformSecureStore (secure_store.dart) | flutter_secure_storage | Always: the session token and caches live here |
StoreBridge | IapStoreBridge (iap_store.dart) | in_app_purchase | purchase_providers contains apple or google_play |
PushBridge | FcmPushBridge (fcm_push.dart) | firebase_core, firebase_messaging | messaging_channels contains push |
SocialSignInBridge | GoogleSignInBridge, AppleSignInBridge (social.dart) | google_sign_in, sign_in_with_apple, crypto | auth_methods contains google or apple |
LocalNotificationsBridge | LocalNotificationsAdapter (local_notifications.dart) | flutter_local_notifications | Local reminders (optional) |
PlatformSecureStore uses the iOS Keychain with first_unlock_this_device accessibility, and Android
EncryptedSharedPreferences.
iOS (ios/Runner)
| Item | Where | Needed for |
|---|---|---|
| Bundle id per flavor | Xcode target or xcconfig | All |
| Deployment target 15.0 (WS10 had to raise it to build the reference app with current Xcode) | Xcode / Podfile | All |
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 notifications | Signing & Capabilities | Push |
| APNs auth key uploaded to the Firebase project. The key is a secret and stays in Firebase. | Firebase console | Push |
Leave FirebaseAppDelegateProxyEnabled at its default (swizzling on) | Info.plist | Push |
| Capability Sign in with Apple | Signing & Capabilities | Apple sign-in |
| Capability In-App Purchase; products created in App Store Connect; sandbox testers | Xcode / App Store Connect | Purchases |
GIDClientID (iOS OAuth client id), GIDServerClientID (web client id), and the REVERSED_CLIENT_ID URL scheme | Info.plist | Google sign-in |
Custom URL scheme equal to AppCoreManifest.deepLinkScheme (CFBundleURLTypes) | Info.plist | Deep 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)
| Item | Where | Needed for |
|---|---|---|
applicationId per flavor | build.gradle(.kts) productFlavors | All |
google-services.json for this flavor, plus the com.google.gms.google-services Gradle plugin | android/app/src/<flavor>/ | Push |
POST_NOTIFICATIONS permission (Android 13+) | AndroidManifest.xml | Push |
| SHA-1 and SHA-256 of the debug, upload and Play app-signing keys registered on the Android OAuth client | Google Cloud console | Google sign-in |
| Products and base plans in Play Console; license testers | Play Console | Purchases |
Intent filter for <scheme>://<app-id>/... | AndroidManifest.xml | Deep links |
RECEIVE_BOOT_COMPLETED and the flutter_local_notifications boot receiver; core library desugaring enabled | AndroidManifest.xml, build.gradle | Reminders |
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 side | Must equal, on the AppCore side |
|---|---|
AppCoreManifest.appId / environmentId | app_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 id | The Apple client id (audience) the identity connection accepts |
| Store product ids | provider_mappings[].product_id in the catalog |
| App Store Server Notifications v2 URL / Play RTDN Pub/Sub push endpoint | https://<your-api-host>/webhooks/apple-store/{connection_ref} / https://<your-api-host>/webhooks/google-play/{connection_ref} |
Build flags (reference app)
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:
flutter analyzeandflutter testinsdk/flutter.- In your app:
flutter build ios --simulator --debugandflutter build apk --debug. grep -rE "sk_live|BEGIN PRIVATE KEY|server_key" build/finds nothing.- A release build pointed at a local fixture URL fails at startup.
AppCoreManifest.validateenforces this.