How to debug “Invalid Bundle” error which happens only after submitting to app store

Got an answer from Apple Developer Technical Support which says it is a bug on Apple’s side. this is the suggested workaround below which did not work for me:

To diagnose this issue, you should export the IPA you are sending to
the App Store from Xcode. Since IPAs are zip files, you can
decompress it by right clicking and saying Open With > Archive
Utility. You should find your main executable inside the unzipped
folder structure and run otool at the command line to see the library
list: otool -L

The list of paths you get should match what you find inside of your
IPA. All of your libraries should start with @rpath. A simple
comparison of everything in this list with the unzipped IPA folders
should reveal what is missing.

Once you know what is missing, go to your Xcode build phases setup.
There should be a build phase for either Copy Files or Embed
Frameworks that includes the missing library — you should just add the
library to the list. If you don’t see either of these build phases,
you can recreate it by adding a new Copy Files build phase, setting
the Destination to Frameworks, and adding the library to the list,
ensuring that Code Sign On Copy is checked.

If you don’t find anything missing in your main binary, make sure to
do the same search on any other binaries you may have, like for a
watchOS app or an iOS app extension.

If you find that all of the frameworks are in this build phase, please
take a look at the Embedded Binaries section of your app target’s
General page, and let me know if you see multiple levels of ../ next
to the binary that you found is missing.

Please let me know if it works for you!

Leave a Comment