hfhbd
12/02/2022, 12:34 PMAndrei Salavei
12/02/2022, 12:47 PMhfhbd
12/02/2022, 12:57 PMcoroutines-core
as a dependency in commonMain and exports this dependency using export(...'core')
.
I have another gradle module called testCounter
using coroutines-core
as a dependency and also exports this dependency (without it, the types (once shaded, once exported) don't match in Swift).
Now I want to use both frameworks in my test module of my iOS app.
1. I can't import both xcframework modules in one Swift file, because Swift has no packages so Flow
is ambiguous. I need a typealias to prevent this error.
2. Even with typecasting, the types are not the same, so I need a cast. And this cast fails during runtime: Could not cast value of type 'TestCounter_kobjcc0' (0x6000024fdf80) to 'Testing_coroutinesFlow' (0x105a3c1e8).
Another error: I was unable to import two xcframeworks stored in a folder with the same name: debug
. Don't know, if this is a Kotlin bug or a spm one.hfhbd
12/02/2022, 12:58 PMduplicate dependency 'debug'
hfhbd
12/02/2022, 12:59 PMmacosCI
branch and only use the gradle and the spm project, not the Xcode projectAndrei Salavei
12/02/2022, 1:50 PMMACH_O_TYPE = mh_dylib;
,isStatic = false
in Gradle or type: .dynamic
in Swift Package Manager. The test target must include all libraries exactly once.
Just to warn: the load of dynamic library takes some time, so it isn’t good for production when number of custom dynamic libraries are huge.hfhbd
12/02/2022, 4:05 PMisStatic
is false
. And using type: .dynamic
for binary target is not allowed in SPMAndrei Salavei
12/02/2022, 4:24 PMhfhbd
12/02/2022, 4:26 PMkpgalligan
12/02/2022, 5:49 PMkpgalligan
12/02/2022, 5:49 PMhfhbd
12/02/2022, 5:56 PMEirik Vale Aase
04/21/2024, 1:44 PMEirik Vale Aase
04/21/2024, 1:47 PMkpgalligan
04/21/2024, 2:30 PM