Invalid Bundle, The bundle contains disallowed nested bundles, contains disallowed file 'Frameworks'

WayneZhao picture WayneZhao · May 21, 2015 · Viewed 12.9k times · Source

I added a shared framework to share code between app and watch extension. Later I removed the shared framework since it cause lots of problems. I can build and run my app on iphone and watch. However when I submit to app store, I see these two errors:

ERROR ITMS-90205: "Invalid Bundle. The bundle at 'xxx WatchKit Extension.appex' contains disallowed nested bundles."

ERROR ITMS-90206: "Invalid Bundle. The bundle at 'xxx WatchKit Extension.appex' contains disallowed file 'Frameworks'."

I have tried all the solutions mentioned on stackoverflow(this , this, this) None of them works for me. How do I fix the error? Errors message from apple really doesn't give a clue what I should to.

Answer

cgossain picture cgossain · Jan 3, 2016

I still do not fully understand what causes the issue, but I've stumbled upon an answer that has finally solved the issue for me.

https://github.com/CocoaPods/CocoaPods/issues/4203

Specifically, the post by mikehouse on Oct 12, 2015 was the solution to the the problem.

Add the following run script to ALL you embedded extension targets. In my case I had to add the run script as a build phase to my Today extension and my Apple Watch App extension.

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