Konstantin Petrukhnov
10/28/2019, 12:23 PMsvyatoslav.scherbina
10/28/2019, 1:33 PMNow I’m using Bundle.url(forResource) in swift, and then pass path string to kotlin, that will access file.Why not use the same from Kotlin?
alex009
10/28/2019, 2:43 PM.framework
you just should use not Bundle.main
but NSBundle.bundleForClass(object_getClass(this)!!)
(with class from framework)
like in plugin https://github.com/icerockdev/moko-resources/blob/327eef878d929ec78cc38eb7202b99404a400874/gradle-plugin/src/main/kotlin/dev/icerock/gradle/generator/IosMRGenerator.kt#L46Konstantin Petrukhnov
10/29/2019, 6:23 AMalex009
10/30/2019, 7:47 AMNSBundle.bundleForClass(object_getClass(this)!!)
you should give class from framework, not from appKonstantin Petrukhnov
10/30/2019, 7:52 AMalex009
10/30/2019, 9:25 AMsvyatoslav.scherbina
11/01/2019, 9:37 AMNSBundle.bundleForClass
, as all code including classes is linked into main application binary. And this is not Kotlin-specific.Konstantin Petrukhnov
11/01/2019, 10:01 AMsvyatoslav.scherbina
11/01/2019, 10:25 AMisStatic = false
.
You may then require enabling use_frameworks
in your application Podfile
.Konstantin Petrukhnov
11/04/2019, 7:09 AMsvyatoslav.scherbina
11/05/2019, 7:57 AMIf ‘isStatic = false’ uncommented, then other libs are not exported to framework.? I can’t find an
export
in your build script.
Considering isStatic
having no effect: your build script doesn’t seem correct. Replacing binaries.findAll { ... }.every {
with binaries.matching { ... }.all {
makes it.isStatic = false
work as expected.Konstantin Petrukhnov
11/18/2019, 6:04 AM