How to fix "contains disallowed nested bundles" and "contains disallowed file 'Frameworks'" errors

Hi,


My iOS Swift app contains a in-house built framework (A), which is also using Swift. This framework includes 2 in-house built frameworks (B and C) using Objective-C.


"Embedded Content Contains Swift Code" is set to YES for the app and to NO for the A, B and C frameworks.


When I try to submit the app to iTC, I get these errors:


ERROR ITMS-90205: "Invalid Bundle. The bundle at 'yourapp.app/Frameworks/A.framework' contains disallowed nested bundles."...


ERROR ITMS-90206: "Invalid Bundle. The bundle at 'yourapp.app/Frameworks/A.framework' contains disallowed file 'Frameworks'."...


How can I fix those?

Hi


Had the same problem. In short, I set the "Embedded Content Contains Swift Code" setting to "No" in my targets. Check out the link below which helped me:


http://stackoverflow.com/questions/25777958/validation-error-invalid-bundle-the-bundle-at-contains-disallowed-file-fr?lq=1


Good luck!


Regards

Lee Francis

This solution is only for Swift Projects or also for Objective C Proejcts.

As I am building one Objective C Project and facing same problem.

Nested frameworks are not supported on iOS. Please see the Embedding Frameworks tech note for more information, as well as alternatives to nesting frameworks.

Thanks for information.

Can you please also tell. If I add dependent frameworks on App level I am getting Abiguity issues.

One of the two will be used. Which one is undefined.

I have given weak link to third party framework in my framework so that It dont give linker error.

And adding same third party framework on App level also. It is working fine.

But getting Ambiguity errors.

Please provide the full error message.

For anyone stuck on this (as I was), my issue was that I did not change my imported framework in my extension from "embed and sign" to "do not embed". Changing this ensures everything builds but does not include the nested framework in the bundle which generates this error.
The only solution that worked for me was to add this Run Script to the App Extension target:

cd "${CONFIGURATIONBUILDDIR}/${UNLOCALIZEDRESOURCESFOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi

I used Unity 2020.3.17 and Facebook Sdk 9.2.0

it's solved for

ERROR ITMS-90206: "Invalid Bundle. The bundle at 'yourapp.app/Frameworks/A.framework' contains disallowed file 'Frameworks'."...

You need to disable the swift libraries in the UnityFramework:

  1. Go to Build Settings
  2. Select UnityFramework from the Targets panel
  3. Under "Build Options" Set "Always Embed Swift Standard Libraries" to "No"
  4. You're welcome!

12
How to fix "contains disallowed nested bundles" and "contains disallowed file 'Frameworks'" errors
 
 
Q