Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix XCode 4 error: app depends on itself. This target might include its own product...?

Tags:

xcode4

How to fix XCode 4 build and clean error: "XXX.app depends on itself. This target might include its own product"...?

Upgraded my dev environment to latest Xcode 4. Opened an existing project previously built and cleaned in XCode 3.x.x. Attempted to clean: Clean failed with the same error "target might include..." Attempted to build for debug on simulator. Build failed with the same error.

I've been stumped by this one. The responses to correct this have all been around Xcode 3.x.x

I thought others might run into this and want an answer.

After much gnashing of teeth, I found an answer (there may be other more elegant ways to fix this):

Go to Project Navigator. Scroll down the list of Classes, Resources and find the PRODUCT group. The actual product in the group may display in red if you previously cleaned it in XCode 3.x.x. DELETE the entire PRODUCT group. You can then re-run your clean or build action.

Hope this helps others and prevents alot of frustration.

like image 669
David Baltozer Avatar asked Nov 01 '11 18:11

David Baltozer


1 Answers

Click Products/***.app file.

and you can see the file info in Utilities Window.

Uncheck Target! That's it!

enter image description here

like image 184
Jinbom Heo Avatar answered Oct 01 '22 06:10

Jinbom Heo