A friend came to me today looking for some help submitting his app to the iTunes store. He was running into the following error when trying to submit his archived app:
Invalid Bundle Structure - The binary file
'[his-app-name].app/AmazonAd.framework/Versions/Current/AmazonAd' is not
permitted. Your app can't contain standalone executables or libraries, other
than the CFBundleExecutable of supported bundles. Refer to the Bundle
Programming Guide at
https://developer.apple.com/library/ios/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html%23//apple_ref/doc/uid/100000123i-CH101-SW1
for more information on the iOS app bundle structure.
Yes… I typed all of that by hand.
The fix is simple. This error may not seem so obvious but it’s telling you
exactly what the problem is. You have included some standalone executable that
you shouldn’t have… In this case it was the AmazonAd
executable inside the
AmazonAd.framework
.
The problem is that the AmazonAd framework was actually being copied inside his
app bundle. The solution was to remove the AmazonAd.framework
from the Copy
Bundle Resources build phase.
Problem
You are including some executable files in your app that shouldn’t be there.
Solution
Remove them.
- Open the Build Phases tab in the target settings for your application.
- Check under the Copy Bundle Resources phase and make sure there’s nothing
screwy being copied in there. Frameworks do not belong here.
- Press the DEL key or the - button on the ui to remove any frameworks or binaries that shouldn’t be copied.