Is it possible to export kotlin library as a cocoa...
# multiplatform
m
Is it possible to export kotlin library as a cocoapods dependency or somehow generate obj-c bindings? I'm trying to create swift bindings for Flow like here, but in there XCFramework is used.
v
https://github.com/vanniktech/blurhash - as far as I know you can just create a symlink to the generated podspec file and include that and use
pod .. git branch / tag
to include it
m
So you're saying I should just checkout coroutines library locally and create a podsec for it and that should work?
v
Create your own library, consume coroutines and then use the cocoapods plugin like I do and then on iOS you can include pod your library via pod
m
consume coroutines
- would just adding it as a dependency be enough? If not what else should I do?
Worked around all of this just adding some dummy methods in my main project so that needed classes would be exported to obj-c. Still interested in normal solution though.
j
For dependency code, only classes and extensions that you use in your Kotlin project are exported to ObjC headers, unless you explicitly export the API.
m
Thanks Jeff, that worked.