Invalid bundle structure - The app may contain only one executable file. Invalid bundle structure - The app may contain only one executable file. xcode xcode

Invalid bundle structure - The app may contain only one executable file.


Invalid Build Structure

The binary file 'YourApp.app/libYourLibrary.a' is not permitted.

Your app may contain only one executable file.

This error occurs when a static library file is mistakenly copied into the app bundle.

You should link the libYourLibrary.a static library via a Link Binary with Libraries build phase.

It should NOT be added to the target's Copy Bundle Resources build phase.


My app was rejected with the same error message. It turned out that I was copying a third party framework (Fiksu) in the 'Copy Bundle Resources' build phase. The framework contained an executable and was already linked to in the 'Link Binary With Libraries' build phase. I deleted the framework from the 'Copy Bundle Resources' build phase. The framework continued to work normally in a release build. I resubmitted the app and it passed validation. Similar solution was posted here:

https://devforums.apple.com/message/1020254#1020254


In hindsight the error is straightforward. An executable file was accidentally added to the project. In my case "Develop!.app/Xcode" meant that Xcode was the executable. Checking the list of files in the project I found a symlink to Xcode. (Maybe I dragged it from the dock somehow and dropped it into the project).

If you are getting this error look at the files in your project -- there is an executable there somewhere.