We are using kotlin-native to build a crossplatfor...
# kotlin-native
k
We are using kotlin-native to build a crossplatform library used on android and iOS. On iOS the the binaries for the different apple platforms are bundled in a xcframework and distributed inside a binary SPM-package. Everything works as expected when deploying locally but apple keeps rejecting our binary appstore with the following errors. Anyone has experienced the same and give us a hint how to fix this?
App Store Connect Operation Error
ERROR ITMS-90205: "Invalid Bundle. The bundle at '<http://XXXX.app/Frameworks/XXXXMobileShared.framework|XXXX.app/Frameworks/XXXXMobileShared.framework>' contains disallowed nested bundles."
App Store Connect Operation Error
ERROR ITMS-90206: "Invalid Bundle. The bundle at '<http://XXXX.app/Frameworks/XXXXMobileShared.framework|XXXX.app/Frameworks/XXXXMobileShared.framework>' contains disallowed file 'Frameworks'."
@Paul Woitaschek cc
g
My guess is that the framework is added to the target bundle by Xcode. Make sure the framework is not part of the 'copy bundle resources' build phase.
k
The framework is not copied as a resource. It is used in multiple targets (main app, extensions) tho.
The issue is based on the Problem described here: https://forums.swift.org/t/swift-packages-in-multiple-targets-results-in-this-will-result-in-duplication-of-library-code-errors/34892/39 SPM thinks every xcframework contains a dynamic framework and copy it. The workaround is to modify the archive as mentioned in step two in the post I linked. This can be scripted in the Post-Actions of a build.
­čĹŹ 1