yonaskolb / yonaskolb/XcodeGen
watchOS app embedded in Watch/ instead of PlugIns/ — fails on Xcode 26
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
Summary
When a watchOS app target is declared as a dependency with embed: true, XcodeGen generates a "Embed Watch Content" copy phase using dstSubfolderSpec = 16 and dstPath = "$(CONTENTS_FOLDER_PATH)/Watch".
Starting with Xcode 26, this causes an install failure because watchOS apps must be embedded in the parent app's PlugIns/ directory (dstSubfolderSpec = 13, empty dstPath), the same as foundation extensions.
Error
MyWatchApp.app is a Foundation extension and must be embedded in the parent app bundle's
PlugIns directory, but is embedded in the parent app bundle's Watch directory.
project.yml
targets:
MyApp:
type: application
platform: iOS
dependencies:
- target: MyWatch Watch App
embed: true
MyWatch Watch App:
type: application
platform: watchOS
Expected
The generated copy phase should use:
dstPath = "";
dstSubfolderSpec = 13;
Actual
The generated copy phase uses:
dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
dstSubfolderSpec = 16;
Workaround
Post-gen sed patch in project.yml:
options:
postGenCommand: sed -i '' -e 's|dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";|dstPath = "";|' -e 's|dstSubfolderSpec = 16;|dstSubfolderSpec = 13;|' MyApp.xcodeproj/project.pbxproj
Environment
- XcodeGen 2.45.3
- Xcode 26.4 (17E192)
- macOS 26.3.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dependency embedding logic that handles a watchOS application declared with embed: true, using the project.yml example and generated MyApp.xcodeproj/project.pbxproj as the reproduction. Verify that the generated copy phase uses an empty dstPath and dstSubfolderSpec = 13, then confirm the project installs successfully with Xcode 26.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100