Am developing an existing iOS application and I have to write unit test cases for this project. It is building and running in Simulator 6.0. Whenever I try to test t
Create a new scheme. The bundle id / target name / executable / project name etc. are all slightly different concepts. If you change one (as I did) the old scheme may still be set to look for the old value as the name of the executable, while the build process may have been updated to no longer build that executable.
In Xcode 11 select Product -> Scheme -> new Scheme
this worked for me. Image
Steps to resolve:
Delete old scheme
Add new scheme
Where the problem came from:
I changed my product name and disabled the snapshot option. Then, suddenly, this error popped out:
ld: file not found:.././previousproductname.app/previousproductname
Steps I followed unsuccessfully to debug:
Deleted deriveddata, restarted Xcode. - not resolved.
Followed the steps of this: link http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/ - same error; not resolved.
Finally, I changed the Scheme name, deleted my old scheme and added new, have solved my issue.
The answer lies on your Build Settings > Library Search Paths entry. Make sure there are no fully qualified paths listed there. Decorate them with the $SRCROOT idiom and enclose the path with double quotes. If there are any escape backslashes make sure to remove them as well.
Do a Clean and then Build and you should be back in business. This seem to be an issue with Xcode 5.x
On xcode 6 you need to:
Works for me!
Delete your scheme then re-create it (click new icon or using autocreate of xcode). It works for me.