3
votes

I have an app that includes a Watch Extension and App target. I would to be able to have one of my configurations (for a beta) exclude these targets from the target dependencies so that I can distribute the build without the Watch Extension/App. However I still want my debug configuration to include them. Is this possible? Perhaps there is some run script that could add Target Dependencies manually? Thanks.

2

2 Answers

2
votes

Duplicate your "Release" Configuration, that will include your Watch Extension. Here the official resource: https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/BasingBuildConfigurationsonConfigurationFiles.html

enter image description here

In this configuration.

  1. Remove the WatchKit extension from Target Dependencies
  2. Remove WatchKit extension from Embed App Extensions
0
votes

Duplicate your main target and remove the dependencies from the copy. Then duplicate your scheme and set its target to your new target.

Another solution would be to wrap the build and embedding into a separate script and run it manually, you can see how cocoapods are doing that.