Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Kable as an XCFramework? #710

Open
twyatt opened this issue Jul 6, 2024 · 0 comments
Open

Provide Kable as an XCFramework? #710

twyatt opened this issue Jul 6, 2024 · 0 comments

Comments

@twyatt
Copy link
Member

twyatt commented Jul 6, 2024

My understanding is that the inability to include multiple KMP xcframeworks had been resolved, as mentioned in KT-42254:

Kotlin/Native compiler can produce Swift/Obj-C frameworks from Kotlin code. Multiple frameworks can be used in the single application, they are usually properly isolated from each other.

I did a quick experiment, and I am able to build an iOS app with multiple KMP xcframeworks. There are warts with the process (e.g., all the frameworks will have their own KotlinBase, KotlinNumber, KotlinMutableSet, etc., which makes it impossible to cast base types between one framework and the other), but it does seem to be possible.

Our use case is that we (the Skip project) would like to have a bluetooth framework that can be included independently from the iOS and Kotlin sides of the app without needing to make the user manually build and include the framework. For the time being, we will follow your advice and make our own cover library and publish the xcframework as a GitHub release, but it may be something you want to consider adding in the future for your own users.

A more general benefit is that iOS users who don't use KMP at all would still be able to use the framework by adding it as a SwiftPM binary dependency.

Originally posted by @marcprux in #703 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant