Skip to content

Conversation

Copy link

Copilot AI commented Jan 21, 2026

Xcode builds were failing with "Multiple commands produce" errors due to duplicate file additions to watch app targets. Additionally, developers needed control over Info.plist, xcprivacy files, and selective file inclusion.

Changes

Fixed duplicate file additions

  • Created addTargetWithoutFiles() that builds target structure without auto-adding all directory files
  • Files now explicitly added via controlled source/resource scanning only
  • Eliminates "Multiple commands produce" build errors

Added configurable file paths

  • infoPlistPath: Specify custom Info.plist location, auto-copied to target with INFOPLIST_FILE build setting
  • xcprivacyPath: Specify custom Privacy Manifest location, auto-copied and added as resource

Added glob-based file exclusions

  • resourcesExclude: Array of glob patterns to exclude from resources
  • srcExclude: Array of glob patterns to exclude from sources
  • Implemented using minimatch for pattern matching

Example configuration:

{
  "infoPlistPath": "../shared/Info.plist",
  "xcprivacyPath": "../shared/PrivacyInfo.xcprivacy",
  "resourcesExclude": ["**/Info.plist", "**/node_modules/**"],
  "srcExclude": ["**/Debug/**", "**/*.template.swift"]
}

All options are backward compatible - existing configurations work unchanged.

Original prompt

i need some fixes to IOSWatchAppService and handling of watchapp.json:

  • i need a way to set the "path" of the Info.plist. The Info.plist i want to use for the watch app target already exist, i want xcode to use it. I would set the path through the watchapp.json. If needed the file could only be copied to the right location for the xcode project to find it for the watchapp target
  • i need a way to exclude files for "resources" or "src". I should be able to exclude files with glob. For example i want to ignore the Info.plist file which is in one of the directories.
  • same thing as Info.plist i would like to set the xcprivacy file from a path configurable in the watchapp.json
  • When i try to build the generated project i get this error:
Prepare build
error: Multiple commands produce '/Users/mguillon/Library/Developer/Xcode/DerivedData/activelook-avajvaecgbfyvwdtmqxwfohvirkn/Build/Products/Debug-watchsimulator/ActivelookWatch.app/ActivelookWatch'
    note: Target 'ActivelookWatch' (project 'activelook'): CopyAndPreserveArchs /Users/mguillon/Library/Developer/Xcode/DerivedData/activelook-avajvaecgbfyvwdtmqxwfohvirkn/Build/Products/Debug-watchsimulator/ActivelookWatch.app/ActivelookWatch
    note: Target 'ActivelookWatch' (project 'activelook') has link command with output '/Users/mguillon/Library/Developer/Xcode/DerivedData/activelook-avajvaecgbfyvwdtmqxwfohvirkn/Build/Products/Debug-watchsimulator/ActivelookWatch.app/ActivelookWatch'


Multiple commands produce '/Users/mguillon/Library/Developer/Xcode/DerivedData/activelook-avajvaecgbfyvwdtmqxwfohvirkn/Build/Products/Debug-watchsimulator/ActivelookWatch.app/ActivelookWatch'

Maybe other fixes would fix it? if you have any idea fix it


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 21, 2026 15:53
…s in watchapp.json

Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issues with IOSWatchAppService and watchapp.json handling Add custom file path configuration and glob exclusions for iOS Watch apps Jan 21, 2026
Copilot AI requested a review from farfromrefug January 21, 2026 15:58
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.

2 participants