https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
p

Peter Hsu

01/30/2023, 8:26 AM
Can an iOS app consume multiple XCFrameworks that are generated by separate KMP projects? Is there any code duplication (kotlin stdlib) if it is possible?
h

hfhbd

01/30/2023, 8:54 AM
Nope, it is not. Each framework is closed world, it contains all dependencies and its definition. It is not possible to cast the (same) kotlin type between two xcframeworks.
k

Kamil Kalisz

01/30/2023, 9:40 AM
I think that overall answer is yes, you can consume multiple XCFrameworks generated by KMP in single IOS app. But as Philip mentioned each of the framework is completely closed entity so there is no easy way for interaction between them.
t

Trevor Stone

01/30/2023, 2:40 PM
There historically has been an issue with using two kotlin projects at the same time on iOS. The work-around is an umbrella kmm project that includes the others into a single framework output. I am unsure if this has been resolved, but I don't believe it has been
7 Views