Fail to link file

I made two iOS Apps ready. One is in the Appstore, the other one is waiting to check by Apple.

Now I want to test my third app on a test device. But I got problems to compile the app. I apply on the apple developer web site a new explizit App ID.

Then I apply a new provisioning profile for developing and downloaded it. I can see the provisioning profile in Xcode. But when I compile the app I got the error: Compilation of “xxx” failed. Fail to link file.

With the first app I got no problems with that. The second app was also difficult, because it does´t work with a wildcard app id. With a explicit app id it works. That was the reason to use a explicit app id for the third app.

Does somebody know help or know a secure way that works every time?


Are you sure that the fail to link error is due to the provisioning profile?

This is likely due to an incorrect declare in your project. If you look in Console there should be a message explaining what is wrong.

I found the Problem. Antonio was right, it was not the provisioning profile.

I used in my app a msgbox. I copied the code for the msgbox from the iOSAlerts example file. I tried to compiled the example, but I get the same error. So that example didn´t work.

I did not get messages in the console during compiling. Is there a trick to get them?

In the iosAlert example you have to correct the path in the ObjCLib constant. Change its definition from libobjc.dylib to /usr/lib/libobjc.dylib
Otherwise it will not run (sorry I asked to update the example)

So if you used that example you have to correct the same constant

Sorry, I meant /Applications/Utilities/ and not the console in the IDE.