I have done a TON of research and done several things to try and get rid of this error. Absolutely nothing works. =(
When I go to upload my archive to the app store from within Xcode, I get the following error:
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '.app/constants.o' 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/go/?id=bundle-structure for information on the iOS app bundle structure."
I have looked at several StackOverflow pages that reference this error. None of them resolve the error.
I can't even find "constants.o" in my file directory structure (in Xcode) or via command line.
For my Copy Build Resources, I only have the following:
- font file (file.ttf)
- Image Assets file
- Main.Storyboard file
So, this is not the problem.
The only entitlement I have enabled in Capabilities is Push Notifications.
I'm pretty certain the issue is the "constants.o" that shows up on the first page when I go through the upload archive process. But, I do not know where it's coming from. Does anyone know where this file is coming from? How do I get rid of it??
In my case an implementation file was in the Copy Bundle Sources section of the Build Phases. I know OP did not have that issue but this helped me.
I had the provisioning profile set to Automatic for Xcode to determine the correct profile to use. This was the issue. Xcode was not picking the correct profile
The provisioning profile wasn't setting correctly when it was set to Automatic. I had to specifically set this in the Build Settings instead.
Constants.o should not show up in the archive process. Check your provisioning profile and make sure it is set correctly for Release Version.
来源:https://stackoverflow.com/questions/37222102/iphone-app-submitting-error-itms-90171-invalid-bundle-structure-constants-o