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
Summary
When a watchOS app target is declared as a dependency with
embed: true, XcodeGen generates a "Embed Watch Content" copy phase usingdstSubfolderSpec = 16anddstPath = "$(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, emptydstPath), the same as foundation extensions.Error
project.yml
Expected
The generated copy phase should use:
Actual
The generated copy phase uses:
Workaround
Post-gen sed patch in
project.yml:Environment