Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Bundle Structure - iOS

I have tried do submit an application via Xcode (as well as the application loader) to the Apple store, and I received the following error:

Invalid Bundle Structure - The binary file 'xx.app/xx' is not permitted. Your app may contain only one executable file. Refer to the Bundle Programming Guide for information on the iOS app bundle structure.

I checked the files generated files/project settings and I didn't find what's wrong according to the Bundle Programming Guide.

We have attempted to clean our code repository, as well as do clean builds by updated the build folder locations as well as the derived data locations and still get the same error.

The only feedback that Apple has given us is a query about whether we use 3rd party libraries, which we do. This has only happened as of a few days ago.

Any suggestions or step by step instructions to get our binaries uploaded would be greatly appreciated.

We are using Version 4.6.2 (4H1003) as well as Application Loader 2.8 to upload to iTunes, and we have deployed multiple apps with the exact same structure previously (last app was deployed 2 days prior to the error occuring, and now attempting to reupload the last working binary to an alternate app [after changing relevant app specific info] fails).

Thanks in advance.

like image 436
user2359229 Avatar asked May 07 '13 16:05

user2359229


4 Answers

For me the answer was to

  1. go to

    /Users/myusername/Library/Developer/Xcode/Archives

  2. go to the current folder for the latest archive.

  3. right-click the .xarchive and select 'show package contents'

  4. navigate inside the 'products/applications' directory

  5. right-click the myAppName.app and select 'show package contents'

  6. delete the exe at the very bottom that was not named myAppName.exe

like image 64
user1709076 Avatar answered Sep 28 '22 09:09

user1709076


Some developers have hit this issue when integrating the Apptentive iOS SDK. Making the same error with other 3rd-party SDKS will cause the same issue.

Invalid Build Structure

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

Your app may contain only one executable file.

This error occurs when the Apptentive static library is copied to the app bundle.

libApptentiveConnect.a should be added to the target's Link Binary with Libraries build phase.

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

like image 45
pkamb Avatar answered Sep 28 '22 07:09

pkamb


I know this is a rather old post, but I ran into this issue and this is how I fixed it:

  1. In Xcode, click on your project and go to the target's build settings.
  2. Make sure the "Build Variants" setting ONLY has "normal" set for the target.
  3. Clean and rebuild.

I believe this is what fixed the problem, but there is one other change that may have had an effect.

At one point, I had turned off 'Parallelize Build" in my active Scheme. I had since turned it back on, but perhaps it left some artifacts. I doubt this had any connection, but just in case, I went to my build folders and deleted the files inside before I cleaned and built.

I hope this can help someone who runs into this issue.

like image 39
Christine Avatar answered Sep 28 '22 08:09

Christine


I had put my NSBundle.m in Copy bundle resources - don't do that :(

like image 26
Lyck Avatar answered Sep 28 '22 07:09

Lyck