Search code examples
objective-ciosdebuggingreleasebuild-settings

Xcode builds on Debug but not on Release


So, I have this problem when trying to build my project.

Currently If I run the project in Debug mode, it runs fine, the app starts up on the device and I can test stuff.

However the weird part is when i switch over to the Release build and try to build on the device. When I press the Run button Xcode builds as normal and the build succeeded notification even pops up, but then I get this error code.

Lets call my app xxx

Could not launch "xxx.app"

No such file or directory:

/Users/*my Name*/Library/Developer/Xcode/DerivedData/*Bunch of xcode folders*/Products/Release-iphoneos/xxx.app/xxx

I went into finder and searched up xxx.app and couldn't find it. Furthermore there doesn't even exist a Library folder under /Users/my Name/.

So what is xcode trying to do here, and what should I do to fix this?

Edit: I have also tried Cleaning the project and building again, the error code still comes up.


Solution

  • I get this crap all the time.

    What I do is clean the project, close it, shut down Xcode, start up Xcode, open project, then build and run.

    If that still does not work then find the "DerivedData' folder Organizer->Projects and delete it, then do the above again and try again.