From af149768e791bed3da6745daedaace36c59281e4 Mon Sep 17 00:00:00 2001 From: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Date: Sat, 31 Oct 2026 01:12:09 -0400 Subject: [PATCH] fix(#1037): iOS bundles native assets without the flag The assertion stayed green with the flag off, and run 41171197215 listed sqlite3.framework and llamadart.framework, so the plan's hypothesis was wrong. The flag is gone, the assertion still guards every build, and it is proven able to fail against an empty app. The plan now says so, and records the run ID as the build number. Negative steps discard their output so their error lines do not annotate a passing job. Epic #1013, Feature #200. Agent: ChartreuseBay (session 425e424d) Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build.yml | 7 ++++--- .github/workflows/ios-signed.yml | 2 -- docs/initiatives/standalone/200-ios-app-store/PLAN.md | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bcf0e2a..e2147af4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -144,7 +144,8 @@ jobs: run: | set -u mkdir -p "${RUNNER_TEMP}/empty.app/Frameworks" - if bash .github/scripts/ios-assert-frameworks.sh "${RUNNER_TEMP}/empty.app"; then + # Output discarded: its ::error lines would annotate a passing job. + if bash .github/scripts/ios-assert-frameworks.sh "${RUNNER_TEMP}/empty.app" > /dev/null; then echo "::error::The framework assertion passed on an empty app." exit 1 fi @@ -168,12 +169,12 @@ jobs: CHECK=.github/scripts/ios-altool-check.sh bash "${CHECK}" upload 0 "${T}/ok.txt" || { echo "::error::A clean upload was refused."; exit 1; } for f in error mixed silent empty; do - if bash "${CHECK}" upload 0 "${T}/${f}.txt"; then + if bash "${CHECK}" upload 0 "${T}/${f}.txt" > /dev/null; then echo "::error::Exit 0 with '${f}' output was accepted." exit 1 fi done - if bash "${CHECK}" upload 1 "${T}/ok.txt"; then + if bash "${CHECK}" upload 1 "${T}/ok.txt" > /dev/null; then echo "::error::A non-zero exit was accepted." exit 1 fi diff --git a/.github/workflows/ios-signed.yml b/.github/workflows/ios-signed.yml index ae9d4afe..442cc7ad 100644 --- a/.github/workflows/ios-signed.yml +++ b/.github/workflows/ios-signed.yml @@ -162,8 +162,6 @@ jobs: env: GIPHY_API_KEY: ${{ secrets.GIPHY_API_KEY }} run: jq -n --arg k "$GIPHY_API_KEY" '{GIPHY_API_KEY:$k}' > dart_defines.json - - name: Enable native assets (bundles sqlite3 + llamadart libs, #445) - run: flutter config --enable-native-assets # The build number is the run ID, not the run number: testflight.yml and # release-signed.yml each count their own runs, so run numbers collide diff --git a/docs/initiatives/standalone/200-ios-app-store/PLAN.md b/docs/initiatives/standalone/200-ios-app-store/PLAN.md index 214a4a8a..e9b2f91f 100644 --- a/docs/initiatives/standalone/200-ios-app-store/PLAN.md +++ b/docs/initiatives/standalone/200-ios-app-store/PLAN.md @@ -23,7 +23,7 @@ Research is on [#958](https://github.com/OffbandMesh/meshcore-client/issues/958) |---|---|---|---| | 1 | The `ios` CI job only compiles. | `flutter build ios --release --no-codesign` (`build.yml:134`) `[verified]` | Green proves nothing installable. Everything below the compile is unbuilt. | | 2 | The `ios` job writes no Giphy define. | No `dart_defines.json` step in `build.yml:116-135`, unlike android, linux, web and windows `[verified]` | A signed build made the same way would ship with a broken GIF picker. | -| 3 | Native assets are not enabled for iOS. | linux, macos and windows run `flutter config --enable-native-assets` to bundle `sqlite3` and `llamadart` (#445); `ios` does not. `project.pbxproj` already carries a build phase for `io.flutter.flutter.native-assets.*` frameworks `[verified]` | The largest "compiles but does not work" risk: storage or translation missing at runtime. `[hypothesis: untested]` | +| 3 | iOS bundles native assets without the flag. | linux, macos and windows run `flutter config --enable-native-assets` (#445); `ios` does not, and run 41171197215 on Flutter 3.44.1 still produced `sqlite3.framework` and `llamadart.framework` `[verified]` | The first draft's hypothesis that the flag was needed was wrong. The risk of a build that compiles but lacks them stays, so an assertion guards every build. | | 4 | The project targets iPhone **and** iPad. | `TARGETED_DEVICE_FAMILY = "1,2"` (`project.pbxproj:438`) `[verified]` | Contradicts the iPhone-only decision, and would require iPad screenshots. iPhone-only apps still run on iPad. `[hypothesis: standard iPadOS compatibility mode]` | | 5 | Signing is Automatic with no team. | `CODE_SIGN_STYLE = Automatic`, no `DEVELOPMENT_TEAM` (`project.pbxproj:468`) `[verified]` | The signed lane must supply manual signing at build time. | | 6 | The iOS bundle id differs from Android's. | Apple refused `app.offband.meshcore` as not available, and the owner's team did not hold it `[verified: owner screenshots 2026-10-31]`. The owner created the app as `app.offband.meshcore.ios` | The Xcode project moves to the new id. Android stays `app.offband.meshcore`. Who holds the original is unknown. | @@ -79,7 +79,7 @@ Needs the real certificate, profile and API key, so it waits on owner rounds 2 a | Task | Pts | |---|---| -| **B1 · Close the compile job's gaps** in `build.yml`'s `ios` job and the project: `TARGETED_DEVICE_FAMILY = 1`, native assets enabled, Giphy define written. Plus an assertion that the built `.app` actually contains the `sqlite3` and `llamadart` frameworks, made to fail first by building without native assets. | 3 | +| **B1 · Close the compile job's gaps** in `build.yml`'s `ios` job and the project: `TARGETED_DEVICE_FAMILY = 1`, Giphy define written. Plus an assertion that the built `.app` actually contains the `sqlite3` and `llamadart` frameworks, shown able to fail on every run against an empty app, because a build without the flag still contains them (finding 3). | 3 | | **B2 · `ios-signed.yml`,** a `workflow_call` workflow in Environment `apple-signing`: decode secrets (stop if any is empty), temporary keychain, install profile, write `ExportOptions.plist` (App Store Connect, manual signing, team, profile), `flutter build ipa` with `--build-name` from pubspec and `--build-number` per choice 1, the framework assertion again on the IPA, a `codesign` check that the app inside the IPA is signed by the Apple Distribution certificate (made to fail first against a wrong name, matching the Android fingerprint pin), then `altool` validation and upload, both always run. Keychain and key files removed with `if: always()`. | 4 | | **B3 · Callers:** `testflight.yml` on `workflow_dispatch`, and an `ios` job in `release-signed.yml` after `gate`. **`release` does not depend on it**, per choice 4. Neither workflow gains a `pull_request` trigger. | 3 | | **B4 · Read `man altool` on the runner** for the `.p8` location, failure reporting, and the current validate and upload subcommands (`--validate-app`, and whether `--upload-app` or `--upload-package` is current), and parse the upload output so an error that exits 0 still fails the job. | 2 | @@ -171,7 +171,7 @@ No branch proceeds. There is deliberately **no** "skip upload" or dry-run input: - **Acceptance bar:** - A1's import check green on the legacy `.p12` and refusing a wrong password, with the default format's result recorded. - B2's signing check red against a wrong certificate name, green against the real one. - - B1's framework assertion red without native assets, green with them. + - B1's framework assertion red on an empty app, green on the real one. - A build in App Store Connect with the expected version and build number. - D1's positive and negative cases all at their expected result on a real iPhone. @@ -186,7 +186,7 @@ No branch proceeds. There is deliberately **no** "skip upload" or dry-run input: | # | Question | Option A | Option B | Rec. | Your choice | |---|---|---|---|---|---| -| 1 | Where does each upload's build number come from? | The CI run number, stamped at build time: always unique, never a commit | The pubspec `+N`, matching Android, but every beta then needs a pubspec commit | ⭐ A | A | +| 1 | Where does each upload's build number come from? | The CI run number, stamped at build time: always unique, never a commit | The pubspec `+N`, matching Android, but every beta then needs a pubspec commit | ⭐ A | A, using the run **ID**: the two callers each count their own run numbers, so run numbers would collide | | 2 | CoreScope sends packet hashes to `map.okimesh.org`, a server you help run. Declare it? | Declare nothing | Declare "Other Data, not linked to the user, App Functionality" | ⭐ B, safe to take unread | B | | 3 | The support URL App Review requires | A small `offband.org/support` page (`offband-site` work) | The privacy page's contact line | ⭐ A | A | | 4 | Should the GitHub release wait on the iOS upload? | No: an Apple outage cannot block Android and desktop | Yes: all platforms or none | ⭐ A | A |