{
    "url": "https://delaparra-services.nl/skills/flutter-store-cd",
    "locale": "en",
    "title": "1. bump the version name in pubspec.yaml (the build number is ignored, see below) | DeLaParra Services",
    "description": "Use when setting up or debugging continuous delivery of a Flutter app to the App Store and Google Play with GitHub Actions - a tag that builds and uploads both apps, Android upload-keystore signing, iOS manual signing with a certificate and provisioning profile on a macOS runner, App Store Connect API keys, Play service accounts, build numbers, or when a store upload or CI build fails (draft app errors, SDK version 409, altool timeouts, codesign hangs, pods refusing a profile). Also covers the first-release traps around the pipeline - first manual Play upload, Play App Signing fingerprints for Firebase and App Check, and submitting the first subscriptions.",
    "alternates": {
        "en": "https://delaparra-services.nl/skills/flutter-store-cd",
        "nl": "https://delaparra-services.nl/nl/skills/flutter-store-cd"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/skills/flutter-store-cd.csv",
        "md": "https://delaparra-services.nl/skills/flutter-store-cd.md",
        "json": "https://delaparra-services.nl/skills/flutter-store-cd.json",
        "zip": "https://delaparra-services.nl/skills/flutter-store-cd.zip",
        "pdf": "https://delaparra-services.nl/skills/flutter-store-cd.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/skills/flutter-store-cd.csv",
            "encodingFormat": "text/csv",
            "name": "flutter-store-cd.csv"
        },
        {
            "url": "https://delaparra-services.nl/skills/flutter-store-cd.json",
            "encodingFormat": "application/json",
            "name": "flutter-store-cd.json"
        },
        {
            "url": "https://delaparra-services.nl/skills/flutter-store-cd.md",
            "encodingFormat": "text/markdown",
            "name": "flutter-store-cd.md"
        },
        {
            "url": "https://delaparra-services.nl/skills/flutter-store-cd.pdf",
            "encodingFormat": "application/pdf",
            "name": "flutter-store-cd.pdf"
        },
        {
            "url": "https://delaparra-services.nl/skills/flutter-store-cd.zip",
            "encodingFormat": "application/zip",
            "name": "flutter-store-cd.zip"
        },
        {
            "url": "https://delaparra-services.nl/skills/flutter-store-cd/download",
            "encodingFormat": "application/zip",
            "name": "flutter-store-cd-files.zip"
        }
    ],
    "markdown": "# 1. bump the version name in pubspec.yaml (the build number is ignored, see below)\n\n \n\nUse when setting up or debugging continuous delivery of a Flutter app to the App Store and Google Play with GitHub Actions - a tag that builds and uploads both apps, Android upload-keystore signing, iOS manual signing with a certificate and provisioning profile on a macOS runner, App Store Connect API keys, Play service accounts, build numbers, or when a store upload or CI build fails (draft app errors, SDK version 409, altool timeouts, codesign hangs, pods refusing a profile). Also covers the first-release traps around the pipeline - first manual Play upload, Play App Signing fingerprints for Firebase and App Check, and submitting the first subscriptions.\n\n \n\n**Licence** MIT\n\n \n\n**Source** gabuldev/flutter-skills\n\n \n\n**This skill contains executable scripts.**\n\n [Download zip](<https://delaparra-services.nl/skills/flutter-store-cd/download>)   \n\nYou are setting up, or fixing, the pipeline that takes a Flutter app from a git tag to TestFlight and Google Play. The design in one line: **push a ` v* ` tag, two independent workflows build, sign and upload each platform; nothing else triggers a store build.**\n\n \n\nTwo ready workflows sit next to this file, written in full from a production app. Copy them to ` .github/workflows/ `, then set the ` env: ` block at the top of each:\n\n \n\n- ` templates/android-play.yml `: ubuntu, signs an App Bundle, uploads it to Play \n- ` templates/ios-testflight.yml `: macOS, archives and signs an IPA, uploads it to TestFlight\n\n \n\nThe rest of this skill is the reasoning behind them and the traps each line guards against. Read it before changing a line: most lines exist because something broke.\n\n \n\n## The release flow\n\n \n\n```\n# 1. bump the version name in pubspec.yaml (the build number is ignored, see below)\nversion: 1.4.0+1\n\n# 2. commit, merge, tag, push\ngit tag v1.4.0 && git push origin v1.4.0\n```\n\n \n\n- **One tag, two workflows.** Both trigger on ` push: tags: ['v*'] `, so both stores get the same version. Each also has ` workflow_dispatch `, so you can rerun one platform alone. \n- **Never on every push.** macOS runners bill at 10x. On the Free plan, 2,000 minutes are about 200 macOS minutes, a few dozen iOS builds a month. \n- **Android on ubuntu.** It already has the Android SDK and a JDK, and bills at 1x. Building Android on macOS pays ten times more for nothing. \n- **Gates before compiling.** ` flutter analyze ` and ` flutter test ` (and ` dart test `/` dart analyze ` for each local package) run first. They take seconds and fail before any expensive compile time is spent.\n\n \n\n## Build numbers: let CI own them\n\n \n\n```\nflutter build appbundle --build-number=\"${{ github.run_number }}\"\nflutter build ios       --build-number=\"${{ github.run_number }}\"\n```\n\n \n\nBoth stores reject a build number they have already seen. ` github.run_number ` only goes up, so nobody has to remember to bump ` +N ` in ` pubspec.yaml `. The version *name* still comes from ` pubspec.yaml `.\n\n \n\nEach workflow has its **own** counter, so Android and iOS build numbers differ for the same tag. That's fine, since the stores never compare them.\n\n \n\n**Renaming or recreating a workflow file resets its counter**, and the next upload collides with an old number. If you must, add an offset: ` --build-number=$(( ${{ github.run_number }} + 100 )) `.\n\n \n\nPass the tag into the app if you show it anywhere: ` --dart-define=APP_VERSION=${{ github.ref_name }} `.\n\n \n\n## Secrets vs variables\n\n \n\n- **Secrets** hold whatever lets someone ship as you: \n\n- the keystore and its passwords \n- the ` .p12 ` and its password \n- the provisioning profile \n- the App Store Connect ` .p8 ` \n- the Play service-account JSON \n- **Variables** hold public values: \n\n- Apple team id and profile name \n- client-side SDK keys that are meant to ship inside the app (RevenueCat ` appl_ `/` goog_ `, Firebase options). Putting them in secrets only hides them from the logs where you need to debug. \n- A missing ` --dart-define ` is an **empty string**, not an error. Make the app degrade safely on an empty key, for example paywalls unlocked instead of crashing, and remember that an empty variable in CI ships exactly that. \n- Write keys to ` $RUNNER_TEMP ` (or ` $HOME/... ` with a ` trap ... EXIT ` that deletes them), never inside the working tree. Base64 binary secrets straight to the clipboard so they never land in shell history: \n\n- macOS: ` base64 -i file | pbcopy `. The BSD ` base64 ` has no ` -w `, and its output is already one line. \n- Linux: ` base64 -w0 file | xclip -selection clipboard `\n\n \n\n## Android\n\n \n\n### Gradle reads ` key.properties `, falls back to debug\n\n \n\n```\n// android/app/build.gradle.kts\nval keystorePropertiesFile = rootProject.file(\"key.properties\")\nval keystoreProperties = Properties().apply {\n    if (keystorePropertiesFile.exists()) {\n        FileInputStream(keystorePropertiesFile).use { load(it) }\n    }\n}\n\nandroid {\n    signingConfigs {\n        create(\"release\") {\n            keyAlias = keystoreProperties.getProperty(\"keyAlias\")\n            keyPassword = keystoreProperties.getProperty(\"keyPassword\")\n            storePassword = keystoreProperties.getProperty(\"storePassword\")\n            storeFile = keystoreProperties.getProperty(\"storeFile\")?.let { file(it) }\n        }\n    }\n    buildTypes {\n        release {\n            // No key.properties means debug signing, so `flutter run --release`\n            // still works locally. Play rejects a debug-signed bundle, so a\n            // missing file in CI fails loudly at upload instead of shipping.\n            signingConfig = if (keystorePropertiesFile.exists())\n                signingConfigs.getByName(\"release\")\n            else signingConfigs.getByName(\"debug\")\n        }\n    }\n}\n```\n\n \n\n- Gitignore ` key.properties `, ` *.jks ` and ` *.keystore `. CI writes ` key.properties ` with ` storeFile ` pointing at ` $RUNNER_TEMP/upload.jks `. \n- Build with **` flutter build appbundle `**, not ` ./gradlew `. ` settings.gradle.kts ` reads ` flutter.sdk ` from ` local.properties `, which only ` flutter ` generates. \n- AGP 8.x needs **JDK 17** (` actions/setup-java `, temurin 17).\n\n \n\n### Uploading to Play\n\n    Trap What happens / what to do     First upload of a new app The API refuses it. Upload the first ` .aab ` by hand in Play Console (download it from the workflow artifact).   App never published yet ` Only releases with status draft may be created on draft app `. Use ` status: draft ` until the first publish.   Still ` draft ` after publishing Every later release sits as a draft nobody installs. It looks like success. **Switch to ` completed `** right after the first publish.   ` track: ` singular Deprecated in ` r0adkll/upload-google-play `. Use ` tracks: internal ` (comma-separated).   Personal account (created after 13 Nov 2023) Production unlocks only after 12 testers spend 14 days in **closed** testing (` alpha `). Internal testing doesn't count. Organization accounts are exempt: check the account type on the Console home before planning around it.   Service account Create it in Google Cloud, then invite its email in Play Console → Users and permissions with release rights for the app.    \n\n### Play App Signing changes your SHA fingerprints\n\n \n\nWith Play App Signing (the default), **the build users install is signed by Google's key, not your upload key**. Anything that checks the signature against a registered fingerprint works in your sideloaded build and fails only from the store:\n\n \n\n- **Firebase App Check (Play Integrity)**, plus Google Sign-In and other Google APIs keyed by SHA \n- Symptom: every App Check-protected call (Firebase AI Logic, Firestore with enforcement) is rejected in production only.\n\n \n\nFix:\n\n \n\n1. Copy the **app signing key** SHA-256 (and the upload key's) from Play Console → Test and release → App integrity → App signing. \n1. Register them on the Firebase Android app (` firebase apps:android:sha:create <appId> <sha> `). \n1. Register the app in App Check → Apps → Play Integrity.\n\n \n\nThe fix takes effect without a new release, once the app restarts.\n\n \n\n## iOS\n\n \n\n### Signing: manual, in the Release config only\n\n \n\nSet this on the **Runner target's Release** build configuration in ` ios/Runner.xcodeproj/project.pbxproj `, in Xcode or by hand:\n\n \n\n```\nCODE_SIGN_STYLE = Manual;\nDEVELOPMENT_TEAM = <TEAM_ID>;\nCODE_SIGN_IDENTITY = \"Apple Distribution\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"Apple Distribution\";\nPROVISIONING_PROFILE_SPECIFIER = \"<profile name>\";\n```\n\n \n\n- **Not on the ` xcodebuild ` command line.** Passed there, it applies to every target, including the CocoaPods ones, which refuse a provisioning profile and break the archive. \n- Debug and Profile stay ` Automatic `, so local development is unaffected. \n- ` flutter build ios --release --no-codesign ` compiles the Dart side, then ` xcodebuild archive ` and ` xcodebuild -exportArchive `, with an ` ExportOptions.plist ` generated in the workflow, sign the app.\n\n \n\n### Runner traps\n\n    Trap Guard     ` codesign ` hangs until timeout It is waiting on a keychain prompt. Use a temp keychain plus ` security set-key-partition-list -S apple-tool:,apple:,codesign: `.   ` Validation failed (409) SDK version issue ` App Store Connect requires a minimum iOS SDK. Pin ` xcode-version ` (` maxim-lobanov/setup-xcode `) to one that meets it, with a Flutter version that supports that Xcode.   Firebase pods fail to compile The Firebase iOS SDK needs a recent Swift. Same fix: newer Xcode.   ` altool ` fails with NSURLErrorDomain -1001 A transient CDN timeout before the upload. Retry three times, 60 s apart, so a finished 15-minute build isn't lost.   Bundle id mismatch iOS bundle ids are case-sensitive and can differ from the Android ` applicationId ` (` com.x.myApp ` vs ` com.x.myapp `). Keep a separate env var.    \n\n### Getting the credentials (once)\n\n    Secret Where     Distribution ` .p12 ` Keychain Access → request a CSR → developer.apple.com → Certificates → Apple Distribution → install → export as ` .p12 ` with a password   Provisioning profile developer.apple.com → Profiles → App Store Connect distribution, for the bundle id and that certificate. Its *name* goes in ` IOS_PROFILE_NAME `.   App Store Connect API key App Store Connect → Users and Access → Integrations → App Store Connect API → **App Manager** role. The ` .p8 ` downloads only once.    \n\n### Entitlements that only matter in release\n\n \n\nIf the app uses **App Attest** (Firebase App Check on iOS), add to ` Runner.entitlements `:\n\n \n\n```\n<key>com.apple.developer.devicecheck.appattest-environment</key>\n<string>production</string>\n```\n\n \n\nWithout it, TestFlight and App Store builds get \"App Check token is invalid\" while everything else looks right.\n\n \n\n## First submission: traps the pipeline can't catch\n\n \n\nThe upload is the easy half. These blocked the first review of an app with subscriptions:\n\n \n\n- **Agreements first.** Paid apps and in-app purchases need the *Paid Apps* agreement active (bank account and tax forms done) in App Store Connect → Business. Until then StoreKit returns no products and the paywall loads empty, even in TestFlight. \n- **Each subscription needs a review screenshot** of the purchase screen. A widget test that pumps the real paywall with a fake store and writes a PNG at the required size (for example 1206×2622) is quicker than a simulator. \n- **The first subscriptions must go in the same submission as an app version**, together with their subscription group. A version submitted without them ships an app whose purchases fail in production. Add the subscriptions, the group and the version to one draft submission, then submit it. \n- **Apps that need hardware** (Bluetooth adapters, wearables) get a \"2.1 Information Needed\" asking for a video filmed by a second camera, showing a physical device and the hardware pairing and working together. A built-in simulator mode helps the reviewer but doesn't replace the video. Budget for it before the first submission. \n- **New developer accounts** are asked for a screen recording plus written answers (purpose, setup, external services, regions, in-app purchases). Keep them under 4,000 characters, which is the limit for both the reply and the App Review Notes field. After replying, **resubmit**: a reply alone can leave the submission parked in \"Unresolved issues\".\n\n \n\n## Files\n\n \n\n- ` LICENSE ` \n- ` SKILL.md ` \n- ` SOURCE.md ` \n- ` templates/android-play.yml ` \n- ` templates/ios-testflight.yml `\n\n \n\n## Related terms\n\n \n\n- [Flutter App Store Deployment](<https://delaparra-services.nl/knowledge-hub/flutter-app-store-deployment>)\n\n \n\n## Related services\n\n \n\n- [App development](<https://delaparra-services.nl/services#service-02>)\n\n \n\n[Installing an agent skill in Claude Code, Codex, Cursor and Copilot](<https://delaparra-services.nl/manuals/een-skill-installeren-in-je-ai-assistent>)\n\n[HTML version](https://delaparra-services.nl/skills/flutter-store-cd)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://delaparra-services.nl/skills/flutter-store-cd#webpage",
                "url": "https://delaparra-services.nl/skills/flutter-store-cd",
                "name": "1. bump the version name in pubspec.yaml (the build number is ignored, see below) | DeLaParra Services",
                "description": "Use when setting up or debugging continuous delivery of a Flutter app to the App Store and Google Play with GitHub Actions - a tag that builds and uploads both apps, Android upload-keystore signing, iOS manual signing with a certificate and provisioning profile on a macOS runner, App Store Connect API keys, Play service accounts, build numbers, or when a store upload or CI build fails (draft app errors, SDK version 409, altool timeouts, codesign hangs, pods refusing a profile). Also covers the first-release traps around the pipeline - first manual Play upload, Play App Signing fingerprints for Firebase and App Check, and submitting the first subscriptions.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/skills/flutter-store-cd#breadcrumb"
                }
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/skills/flutter-store-cd#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "1. bump the version name in pubspec.yaml (the build number is ignored, see below)"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "SoftwareSourceCode",
                "@id": "https://delaparra-services.nl/skills/flutter-store-cd#skill",
                "url": "https://delaparra-services.nl/skills/flutter-store-cd",
                "name": "1. bump the version name in pubspec.yaml (the build number is ignored, see below)",
                "description": "Use when setting up or debugging continuous delivery of a Flutter app to the App Store and Google Play with GitHub Actions - a tag that builds and uploads both apps, Android upload-keystore signing, iOS manual signing with a certificate and provisioning profile on a macOS runner, App Store Connect API keys, Play service accounts, build numbers, or when a store upload or CI build fails (draft app errors, SDK version 409, altool timeouts, codesign hangs, pods refusing a profile). Also covers the first-release traps around the pipeline - first manual Play upload, Play App Signing fingerprints for Firebase and App Check, and submitting the first subscriptions.",
                "inLanguage": "en",
                "license": "https://spdx.org/licenses/MIT.html",
                "subjectOf": {
                    "@id": "https://delaparra-services.nl/skills/flutter-store-cd#dataset"
                }
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/skills/flutter-store-cd#dataset",
                "name": "1. bump the version name in pubspec.yaml (the build number is ignored, see below)",
                "description": "Use when setting up or debugging continuous delivery of a Flutter app to the App Store and Google Play with GitHub Actions - a tag that builds and uploads both apps, Android upload-keystore signing, iOS manual signing with a certificate and provisioning profile on a macOS runner, App Store Connect API keys, Play service accounts, build numbers, or when a store upload or CI build fails (draft app errors, SDK version 409, altool timeouts, codesign hangs, pods refusing a profile). Also covers the first-release traps around the pipeline - first manual Play upload, Play App Signing fingerprints for Firebase and App Check, and submitting the first subscriptions.",
                "url": "https://delaparra-services.nl/skills/flutter-store-cd",
                "identifier": "https://delaparra-services.nl/skills/flutter-store-cd#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/skills/flutter-store-cd#skill"
                },
                "creditText": "gabuldev/flutter-skills",
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://spdx.org/licenses/MIT.html",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "dateModified": "2026-11-30T13:17:19+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#skills",
                    "name": "Skills for AI coding assistants",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "flutter-store-cd.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-store-cd.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-store-cd.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-store-cd.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-store-cd.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-store-cd.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-store-cd.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-store-cd.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-store-cd.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-store-cd.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "flutter-store-cd-files.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/skills/flutter-store-cd/download",
                        "inLanguage": "en",
                        "dateModified": "2026-11-30T13:17:19+00:00",
                        "license": "https://spdx.org/licenses/MIT.html"
                    }
                ]
            }
        ]
    }
}