Skip to content

Fix Apple Watch app not appearing on iPhone#5397

Merged
mdmohsin7 merged 1 commit intomainfrom
fix/enable-watchos-app-embedding
Mar 6, 2026
Merged

Fix Apple Watch app not appearing on iPhone#5397
mdmohsin7 merged 1 commit intomainfrom
fix/enable-watchos-app-embedding

Conversation

@mdmohsin7
Copy link
Member

@mdmohsin7 mdmohsin7 commented Mar 6, 2026

Summary

  • Re-enabled the Apple Watch app embedding in the iOS build by fixing three issues in the Xcode project:
    • Added omiWatchApp.app back to the Embed Watch Content build phase (was empty)
    • Added omiWatchApp as a target dependency on the Runner target (was missing, so the watch app was never built)
    • Changed buildActionMask from 8 (install builds only) to 2147483647 (all builds) so the embed phase runs during debug builds

Test plan

  • Build and install the app on a physical iPhone
  • Open the Watch app on the iPhone and verify omi appears as an available app
  • Install the watch app and verify it launches on Apple Watch
  • Verify simulator builds still work (watch app is excluded via EXCLUDED_SOURCE_FILE_NAMES)

🤖 Generated with Claude Code

The watch app was disabled by removing it from the Embed Watch Content
build phase and the Runner target dependencies. This caused the watch
app to not be built or bundled into the iOS app, so it never appeared
in the Watch app on iPhone.

Changes:
- Re-add omiWatchApp.app to the Embed Watch Content build phase
- Add omiWatchApp target dependency to the Runner target
- Change buildActionMask from 8 (install only) to 2147483647 (always)
@greptile-apps
Copy link

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This PR fixes three related Xcode project configuration issues in Runner.xcodeproj/project.pbxproj that caused the Apple Watch app to never appear on iPhone. The fix re-connects the omiWatchApp target to the main Runner build pipeline by populating the previously empty Embed Watch Content build phase, adding the missing target dependency so the watch app is compiled before being embedded, and widening the buildActionMask so the embed phase executes during debug (development) builds and not only during archive/install.

Key changes:

  • buildActionMask changed from 8 (install-only) → 2147483647 (all builds) for the Embed Watch Content phase — now consistent with every other PBXCopyFilesBuildPhase in the project.
  • 42A7BA3E2E788BD400138969 /* omiWatchApp.app in Embed Watch Content */ added to the phase's files list — the corresponding PBXBuildFile entry (with platformFilter = iphoneos and RemoveHeadersOnCopy) already existed in the project but was never referenced.
  • 42A7BA3D2E788BD400138969 /* PBXTargetDependency */ added to Runner's dependencies — the PBXTargetDependency and its PBXContainerItemProxy were already defined in the file (with platformFilter = iphoneos) but were never wired into the Runner target.
  • Simulator safety is preserved through both the platformFilter = iphoneos attribute on the build file/dependency and the pre-existing EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = omiWatchApp.app setting present across all build configurations.

Confidence Score: 5/5

  • This PR is safe to merge — it makes three precise, well-understood Xcode project file corrections with no logic or runtime risk.
  • All three changes are targeted fixes to pre-existing stubs that were never wired up. The PBXBuildFile, PBXTargetDependency, and PBXContainerItemProxy objects all pre-existed with correct attributes (platformFilter = iphoneos). Simulator exclusion is doubly guarded by both platformFilter and EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]. The buildActionMask = 2147483647 value is already the standard used by every other copy/embed phase in the project. No source code was modified.
  • No files require special attention

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Xcode Build Triggered] --> B{SDK Target?}
    B -- "iphonesimulator" --> C[omiWatchApp dependency skipped\nplatformFilter = iphoneos]
    B -- "iphoneos" --> D[Build omiWatchApp\nPBXTargetDependency]
    D --> E[Build Runner.app]
    E --> F{buildActionMask\ncheck}
    F -- "was 8 = install only" --> G["❌ Embed Watch Content\nskipped on debug builds"]
    F -- "now 2147483647 = all builds" --> H[Run Embed Watch Content phase]
    H --> I{platformFilter?}
    I -- "iphoneos" --> J["✅ omiWatchApp.app\nembedded into Runner\nat Contents/Watch/"]
    I -- "simulator" --> K["⛔ EXCLUDED_SOURCE_FILE_NAMES\nblocks embedding"]
    J --> L[Apple Watch app\nvisible on iPhone]
Loading

Last reviewed commit: 4bbf591

@mdmohsin7 mdmohsin7 merged commit 76ebb8f into main Mar 6, 2026
2 checks passed
@mdmohsin7 mdmohsin7 deleted the fix/enable-watchos-app-embedding branch March 6, 2026 11:29
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.

1 participant