PC パソコン

How to Fix App Store Connect ‘ITMS-90206 Invalid Bundle’

When uploading an Xcode archive to App Store Connect, you may encounter ERROR ITMS-90206: Invalid Bundle. A common form of this error appears when a .framework or .appex contains a disallowed Frameworks directory or another embedded framework inside it.

Example error message

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

Common causes

  • A framework embeds another framework inside itself
  • An App Extension (.appex) contains an unnecessary Frameworks directory
  • CocoaPods or Swift Package dependencies are embedded by more than one target
  • A custom framework such as UnityFramework embeds Swift runtime libraries in the wrong place
  • The same framework is copied or embedded multiple times through Build Phases

Typical situations

The project may build and run correctly on a device, but validation or upload fails only after you create an Archive. This is especially common in projects that use Unity, Notification Service Extensions, Widgets, Watch extensions, custom frameworks, CocoaPods, or Swift Package Manager.

How to diagnose the problem

1. Inspect the Archive contents

In Xcode Organizer, locate the archive, reveal it in Finder, and inspect the package contents. Look for structures like these:

MyApp.app/Frameworks/Example.framework/Frameworks/Another.framework
MyApp.app/PlugIns/MyExtension.appex/Frameworks/Example.framework

You can also inspect an extracted IPA or archive from Terminal:

find Payload -type d -name Frameworks
find Payload -type d -name "*.framework"

2. Review Build Phases

Check Link Binary With Libraries, Embed Frameworks, Copy Files, and CocoaPods’ [CP] Embed Pods Frameworks phase for the app target, extensions, and custom framework targets. Make sure the same dependency is not being embedded in multiple places.

Fix 1: Embed dependencies in the main app target

If a custom framework depends on another framework, avoid placing that dependency inside the custom framework bundle. In most cases, the dependency should be embedded by the main application under MyApp.app/Frameworks, not under another framework’s own Frameworks directory.

Important: Linking and embedding are different operations. A target may link against a dependency without needing to embed its own copy.

Fix 2: Correct the extension target’s embed settings

If a Notification Service Extension, Widget, or another extension embeds a shared framework, change it to Do Not Embed when the framework should be supplied by the containing app. After rebuilding, inspect the archive again and confirm that the extension no longer contains a disallowed Frameworks directory.

Fix 3: Check Always Embed Swift Standard Libraries

The main application may need to embed Swift standard libraries, but enabling this setting on every custom framework or extension can produce an invalid bundle structure. Review ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES for each target.

xcodebuild -showBuildSettings | grep ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

Fix 4: Remove duplicate CocoaPods or Swift Package embedding

If the same Pod or package is added to both the app and an extension, verify whether the extension truly needs to embed it. Keep dependencies scoped to only the targets that require them.

target 'MyApp' do
  pod 'ExampleSDK'
end

target 'MyExtension' do
  # Add only dependencies that the extension actually needs
end

After changing your Pod configuration, regenerate the integration:

pod deintegrate
pod install

Fix 5: Check UnityFramework embedding

For Unity projects, ITMS-90206 often points to UnityFramework.framework/Frameworks. Review the UnityFramework target’s Build Phases and any CocoaPods embed scripts. Avoid manually deleting the Frameworks directory from the finished archive unless you fully understand the dependency layout, because the app may upload successfully but crash at runtime if a required library is missing.

Clean and create a new Archive

After changing build settings, create a fresh archive rather than reusing an old one. You can also clear Derived Data if stale build products remain.

rm -rf ~/Library/Developer/Xcode/DerivedData/*

Notes

Apple’s current App Store Connect documentation states that a failed upload should have all reported errors resolved before the build is uploaded again. The detailed path in the ITMS-90206 message is therefore the most useful clue for finding the target that produced the invalid bundle.

Because ITMS-90206 is a broad Invalid Bundle validation error, always read the exact bundle path in the message. The corrective action differs depending on whether the invalid content is inside a framework, an app extension, or a UnityFramework bundle.

Summary

ITMS-90206 usually means that your archive contains a framework or extension with a bundle structure that App Store Connect does not accept, most commonly a nested Frameworks directory or nested framework. Inspect the archive, remove duplicate embedding, and keep framework dependencies embedded at the correct application level. Then clean the project, create a fresh archive, and validate the new build before uploading again.