Skip to content

fix(ios): let the watch companion build for the simulator without a team - #11817

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
formed2forge:fix/ios-watch-target-simulator-signing
Aug 18, 2026
Merged

fix(ios): let the watch companion build for the simulator without a team#11817
kodjima33 merged 1 commit into
BasedHardware:mainfrom
formed2forge:fix/ios-watch-target-simulator-signing

Conversation

@formed2forge

@formed2forge formed2forge commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

A contributor with no Apple developer account couldn't run the app on the iOS simulator — normally the account-free on-ramp — because the watch companion target (omiWatchApp) requires a development team even for a simulator destination:

Error (Xcode): No Account for Team "9536L8KLMP". Add a new account in Accounts settings...
Error (Xcode): No profiles for '...development.watchapp' were found

Root cause

Root-caused with -showBuildSettings and the real build log's tool invocations, not guessed. Two hypotheses were tested and ruled out first:

  • A missing watchOS simulator runtime looked promising (my machine had none installed) but was disproven with a clean rebuild after installing the runtime and pairing a watch simulator to the test device — the watch target's resolved SDKROOT was still the device WatchOS SDK, confirmed both via -showBuildSettings and the ExecuteExternalTool ... -isysroot .../WatchOS.platform/... lines in the actual build log.
  • A Base.xcconfig-level CODE_SIGNING_ALLOWED[sdk=*simulator*] = NO override (an earlier attempt) never matched anything, for the same reason: the watch target's own resolved SDK isn't a simulator SDK even when the overall scheme destination is a simulator, so an SDK-qualified condition can't distinguish this build from a genuine device build.

Fix

Since Runner and the widget already build for the simulator without a signing identity, and the watch companion target is SKIP_INSTALL = YES (it's only ever embedded in Runner.app, never independently installed), disabling signing specifically for its dev-flavor configurations is safe:

  • Does not touch Runner's or the widget's signing at all.
  • Does not affect prod/beta, where the watch app may still need real signing for distribution.

Testing

No automated test — this is an Xcode project-settings fix with no Linux-CI-reachable seam (Dart Analyze & Tests runs on Ubuntu, where Xcode doesn't exist), consistent with how #7641's signing changes were verified: manually, on macOS, with a real build.

Verified live and reproducibly, from a fully clean DerivedData:

  • Raw xcodebuild using the exact invocation flutter run constructs (-allowProvisioningUpdates -allowProvisioningDeviceRegistration -workspace ... -scheme dev -destination id=<simulator>) → ** BUILD SUCCEEDED **.
  • The real flutter run --flavor dev -d <simulator>Launching lib/main.dart on iPhone 17 Pro in debug mode... — no signing errors, with the exact same team (9536L8KLMP) this machine has no account for.

Failure-Class: none

Fixes #11776.

Review in cubic

A contributor with no Apple developer account couldn't run the app on
the iOS simulator, even though the simulator is normally the
account-free on-ramp — the watch companion target requires a team even
for a simulator destination:

    Error (Xcode): No Account for Team "9536L8KLMP". Add a new account...
    Error (Xcode): No profiles for '...development.watchapp' were found

Root-caused with `-showBuildSettings` and the real build log's tool
invocations, not guessed. Two hypotheses were tested and ruled out
first:

- A missing watchOS simulator runtime looked promising (this machine
  had none installed) but was disproven with a clean rebuild after
  installing the runtime and pairing a watch simulator to the test
  device — the watch target's resolved SDKROOT was still the *device*
  WatchOS SDK, confirmed both via `-showBuildSettings` and the
  `ExecuteExternalTool ... -isysroot .../WatchOS.platform/...` lines in
  the actual build log.
- An `Base.xcconfig`-level `CODE_SIGNING_ALLOWED[sdk=*simulator*] = NO`
  override (an earlier attempt) never matched anything, for the same
  reason: the watch target's own resolved SDK isn't a simulator SDK
  even when the overall scheme destination is a simulator, so an
  SDK-qualified condition can't distinguish this build from a genuine
  device build.

Since Runner and the widget already build for the simulator without a
signing identity, and the watch companion target is `SKIP_INSTALL =
YES` (it is only ever embedded in Runner.app, never independently
installed), disabling signing specifically for its dev-flavor
configurations is safe: it does not touch Runner's or the widget's
signing at all, and does not affect prod/beta, where the watch app may
still need real signing for distribution.

Verified live and reproducibly: a fully clean `xcodebuild` (cleared
DerivedData) using the exact invocation `flutter run` produces
succeeded, and the real `flutter run --flavor dev -d <simulator>`
reached `Launching lib/main.dart on iPhone 17 Pro in debug mode...`
with the same team (9536L8KLMP) this machine has no account for.

No automated test: this is an Xcode project-settings fix with no
Linux-CI-reachable seam (`Dart Analyze & Tests` runs on Ubuntu, where
Xcode does not exist), consistent with how BasedHardware#7641's signing changes
were verified — manually, on macOS, with a real build.

Failure-Class: none

Fixes BasedHardware#11776.
@formed2forge

Copy link
Copy Markdown
Contributor Author

All CI checks are green and this is ready for maintainer review/merge — I don't have write access to merge it myself.

Summary: the watch companion target (omiWatchApp) required a development team even for simulator builds, blocking the account-free on-ramp for contributors without an Apple developer account. Root-caused with -showBuildSettings and the real build log (two other hypotheses — missing watchOS simulator runtime, an SDK-scoped xcconfig override — were tested and ruled out first, both documented in the PR description). Fix disables signing only on the watch target's dev-flavor configs, directly in project.pbxproj; Runner/widget signing and prod/beta are untouched. Verified live and reproducibly with the exact invocation flutter run constructs.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three-line dev-flavor signing fix for the watch companion so simulator builds work without a team; root-caused with -showBuildSettings, prod/beta signing untouched. Fixes #11776.

@kodjima33
kodjima33 merged commit ef42367 into BasedHardware:main Aug 18, 2026
30 checks passed
mikejsmith1985 pushed a commit to mikejsmith1985/omi that referenced this pull request Aug 19, 2026
…ibutable

Upstream BasedHardware#11817 set CODE_SIGNING_ALLOWED = NO on the watch companion's
dev-flavor configurations so a contributor with no Apple account can run the
app on the simulator. Its reasoning assumed nobody archives the dev flavor
for a device, which is true upstream and not true here: this workflow builds
--flavor dev because local_dev is the only profile that accepts this fork's
own Firebase project.

The result was an unsigned watch app embedded in a signed parent, which the
archive rejects with "Embedded binary is not signed with the same certificate
as the parent app."

Only Release-dev is re-enabled. Debug-dev and Profile-dev keep upstream's
behaviour, so the account-free simulator on-ramp BasedHardware#11817 exists for is
untouched — including for us.

Fork-only. This must never go upstream: there it would undo BasedHardware#11817 for the
contributors it was written for.
@cursor
cursor Bot deleted the fix/ios-watch-target-simulator-signing branch September 2, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS simulator builds require an Apple developer team because the watch target demands signing

2 participants