I’ve built a KMM framework (with shared iOS and An...
# kotlin-native
m
I’ve built a KMM framework (with shared iOS and Android logic) that I embed and wrap inside of another iOS framework. This has worked like a charm for development, however when deploying an app using this XCFramework to the Apple AppStore, we get the message “Invalid Bundle. The bundle… contains disallowed nested bundles”. What’s strange is this works fine on simulator and even on devices. It seems to be purely an AppStore restriction. I know the obvious way to fix this is to deploy the KMM framework as completely separate public module, and then force the app to load it as a separate dependancy. Is there any other known way of handling this so I can keep the KMM framework as a private dependency of the main iOS framework?
👀 1
This seems like a huge deal to me. When building a framework I can’t imagine anyone would want to directly use the monolithic header file that the Kotlin Native framework spits out. The sensible thing to do is wrap the K/N framework in another iOS framework with a hand crafted APIs and verbose documentation. But yet this solution of nesting frameworks isn’t allowed by Apple. It seems like the community would have found some sort of alternative.
A solution I found was to ditch the
embedAndSignAppleFrameworkForXcode
gradle task and instead write my own that builds a static fat framework and links it, but doesn’t embed it.