10

i have a problem which puzzles me a few days now and i cannot find a solution. What i want to do is archiving an iOS app including a watchOS app in Xcode.

The normal debug build (of both iOS App and WatchOS App) works fine on real devices and simulators (note: CocoaPods included). But when i try to archive the project the following error occurs:

error: /Users/username/Library/Developer/Xcode/DerivedData/Build/Intermediates/ArchiveIntermediates/AppName/BuildProductsPath/Release-watchos/AppNameWatch.app: No such file or directory

I tried to clean up everything, delete the DerivedData folder, restart Xcode, delete the App from the devices, restart the Mac... but nothing solves the problem. I also tried to archive without CocoaPods integration (I removed CocoaPods from my Project completely). I also played around with the target build phases (removing the embedded watch content).

Maybe somebody has an idea...

Thanks

Steffen

Steffen Ruppel
  • 331
  • 2
  • 11

1 Answers1

10

I managed to solve this error, marked as PBCXCp Error, by correcting my Target Dependencies from Project->Build Phases. Here is how the Target Dependencies should look:

iOS app target

enter image description here

Watch app target

enter image description here

Watch extension target

enter image description here

I've accidentally added my iOS app as a target dependency to my watch extension target and that generated the error.

Hope it helps, cheers.

victor.vasilica
  • 1,491
  • 12
  • 14