This question is similar if not identical but there is no solution. I've looked inside the archive and there's only one executable, so I am at a loss as to how to proceed. Any ideas greatly appreciates.
-
I'm not sure, but I wonder whether the "!" in the name is confusing the code that checks the bundle structure. – Tom Harrington Nov 27 '13 at 21:56
-
Thanks Tom. I don't think so, this name hasn't changed. The only change I can think of is an incremental version of XCode. I'll try to change the product name and see if there is any impact. – ToddB Nov 28 '13 at 01:05
-
1I solved it. I'll post the answer when allowed. Believe it or not, a symlink to Xcode had been copied into the bundle. – ToddB Nov 28 '13 at 01:32
7 Answers
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.
-
1This helped me figure out the problem, in my case I was adding the framework as a Linked Library AND as an Embeded binary, Removing the Embeded binary from the general tab did the trick!, thank you a lot! – WilliamX Oct 04 '17 at 21:22
-
In my case I added to XCode project 'upload-symbols' from Firebase Library :p – Ronaldo Albertini Jan 27 '20 at 18:34
-
Oh man, thank you so much! I spend a few days tried figure out what's wrong. – Bugrym Dec 16 '20 at 13:46
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:

- 170
- 1
- 6
-
-
For XCode version 8+ this type of problem seems to cause the app submission process to actually completely crash XCode. – Josh Sep 12 '16 at 19:46
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.

- 2,490
- 3
- 23
- 40
I had this issue for the first time on an app I'd submitted over several versions with no issues.
I found that somehow that although I'd linked to one of my own libraries, one of the source files from that same library appeared in the list of files in the "Copy Bundle Resources" list. I have no idea how it got there but removing it meant that my app build, archived and was submitted successfully. :-)

- 1,700
- 16
- 17
If you are getting error in following format: "Invalid Bundle Structure - The binary file 'Abc.app/AnyFileName.o' is not permitted.
Build Phases > Copy Bundle Resources > check your file AnyFileName.swift will be added too here. (Remove it)
validate it with XCode. Error gone !!

- 5,672
- 42
- 41
In my case I tried to remove references but nothing worked for me. Then I uninstall particular pod, remove references as mentioned here and then install that particular pod again. It worked for me.
For those who required elaboration check below:
1) In Podfile comment the particular pod by adding # in the beginning and save it:
On command line run: pod install // It will uninstall that framework
2) Removed references of that framework from:
- Link Binary with Libraries // In Build Phase
- Copy Bundle Resources // In Build Phase
- Embed Frameworks
3) Now install Pod again, Remove # which you added before and save it.
On command line run: pod install // It will install that framework again

- 645
- 7
- 6
- Just delete the exec file from your bundle and delete the "Executable file" key from your bundle resources.
- After that archive and validate the the the build it will work.

- 139
- 1
- 10