26

File .../FaceDeFace.app depends on itself.
This target might include its own product.

File .../FaceDeFace.app depends on itself.
This target might include its own product.

I have done my project in os Snow leopard but now my os version also changed and it is now 10.7.3. This is installed in my Imac machine. This app start first in MacBook but now I want to develop it in IMac. But the above error is shown so what i have to do. Though I have change all of my certificate, and all provisioning profiles newly. Please help. Thanks i advance.

5 Answers 5

60

Select the target in your Xcode project and click the Build Phases tab. Look at the Target Dependencies list; the target's product should not be listed there, but it sounds like it may have been added to that list by mistake. Also check the other areas in that same tab -- you don't want your product listed in Copy Bundle Resources or Link Binary With Libraries, either -- you obviously can't use the thing that you're building as a resource or library to build the product in the first place. That's what Xcode seems to be complaining about.

3
  • 11
    It works fine when i am deleting product.app from Copy Bundle resources under Targets->Build Phases->Copy Bundle Resources. Thanks for helping me.
    – Banshi
    May 7, 2012 at 4:56
  • Just used this to solve a problem with the file path getting longer than the buffer size.
    – Tim
    Jul 12, 2018 at 12:13
  • Anyone with an issue in building a #filemaker plugin should refer to the answer above. Jul 1, 2019 at 11:38
6

Ran across this issue using Xcode 7 (beta 1) when trying to build a Static Library target. Here was the error message from the build output:

Unable to run command 'CopySwiftLibs libMyStaticLibraryName.a' - this target might include its own product.

(I substituted libMyStaticLibraryName.a above in place of the actual name of my static library.)

The problem turned out to be that this static library target had the Embedded Content Contains Swift Code build setting (EMBEDDED_CONTENT_CONTAINS_SWIFT) set to YES, when in reality there was no Swift code associated with this target. Setting this to NO in Xcode fixed the issue.

Static libraries cannot include Swift code, so if this build setting is set it causes the error, even if there is no actual Swift code in the target.

0

In my case, very simple, please delete Universal target, then add new target. That's all

0

In my case my project had submodule inside, so commands git submodule add submoduleURL git submodule init git submodule update

solved this issue.

0

I had the same problem, when podspec file was incorrect. My mistake was that I didn't specify .h and .m extensions for source_files. Because of that .xib files were added twice. This is a correct example:

  s.source_files = 'YourTarget/Classes/**/*.{h,m}'

  s.resources = ['YourTarget/Classes/UIComponents/**/*.xib']

See https://guides.cocoapods.org/syntax/podspec.html#source_files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.