07 July 2021
ITMS-90205 - Invalid Bundle

The Problem

While publishing your .ipa file to the App Store, you may encounter the following:

ERROR ITMS-90205: "Invalid Bundle. The bundle at XXX contains disallowed nested bundles."
ERROR ITMS-90206: "Invalid Bundle. The bundle at XXX contains disallowed file 'Frameworks'."

Not the most helpful message. You will likely see the above if your app has code seperated into a framework.

The Solution

The problem is that you are likely using nested frameworks which are unfortunately not supported. You can see the technical note from Apple here (although it’s pretty ancient at this stage).

It’s likely that you have a framework in your project that is embedding another library or framework, which is not allowed. You may see something similar to this:

Screenshot 1

One solution would be to change it to this:

Screenshot 2

You can then embed the offending library into the main application instead:

Screenshot 3

That doesn’t feel right though! We want to be able to use our framework in a project without needing to remember this step. The best solution that I could find was to migrate the offending library to SwiftPM.

SwiftPM allows you to specify a library’s dependencies in its manifest and prevents errors similar to the above from happening.

This may be related to ITMS-90685.