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

蹲街弑〆低调 提交于 2019-12-18 12:13:45

问题


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.


回答1:


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



回答2:


The above didn't work for me.

Embedded Content Contains Swift Code: NO

Didn't really do anything for me.

I experienced this issue using a dynamic framework. My dynamic framework contained other dynamic frameworks which made it OK to have:

Embedded Content Contains Swift Code: YES

And instead having the other dynamic frameworks set it to No instead. But instead of that I had to set

Always Embed Swift Standard Libraries: NO

under Build Phases.

Having this one set to YES generated the frameworks folder causing upload to ITC fail.




回答3:


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



回答4:


I had a framework that builded with the following build settings:

Always Embed Swift Standard Libraries: YES

Allow Non-Modular includes in Framework Modules: YES

So I changed both to NO and build framework again.

Always Embed Swift Standard Libraries: NO

Allow Non-Modular includes in Framework Modules: NO

I added new build of framework to my project so It uploaded to iTunes Connect successfully.



来源:https://stackoverflow.com/questions/30361864/invalid-bundle-the-bundle-contains-disallowed-nested-bundles-contains-disallow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!