Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 239
WayneZhao Avatar asked May 20 '15 23:05

WayneZhao


2 Answers

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 
like image 62
Christian Gossain Avatar answered Sep 21 '22 02:09

Christian Gossain


The "ITMS-90206" error was resolved in this post: Validation Error: Invalid Bundle. The bundle at ... contains disallowed file 'Frameworks'

The setting needs to be changed from Yes to No within the Build options of your WatchKit Extension:

Embedded Content Contains Swift Code: No 
like image 34
tuc0w Avatar answered Sep 19 '22 02:09

tuc0w