https://kotlinlang.org logo
#moko
Title
# moko
a

Andy Gibel

11/10/2019, 5:56 AM
I've added a lot to the mpp-library and Android works but now iOS build process gives me
Command PhaseScriptExecution failed with a nonzero exit code
is the iOS framework generation still happening somewhere behind the scenes? I changed and removed some of the modules of the mpp-library. Do I need to update something to let iOS know how to build it now?
a

alex009

11/10/2019, 6:03 AM
Show build log from xcode please
a

Andy Gibel

11/10/2019, 6:12 AM
looks like my issue is with an external common library I used
can you help me understand the MultiplatformLibrary() and why it must have a common/iOS/iOS64? Most K/N libraries don't have these modules it seems
For example I had added 3 libraries like this:
Copy code
val mppUuid = MultiPlatformLibrary(
                common = "com.benasher44:uuid:${Versions.Libs.MultiPlatform.uuid}"
            )

            val klock = MultiPlatformLibrary(
                common = "com.soywiz.korlibs.klock:klock:${Versions.Libs.MultiPlatform.klock}"
            )

            val bigNum = MultiPlatformLibrary(
                common = "com.ionspin.kotlin:bignum:${Versions.Libs.MultiPlatform.bigNum}"
            )
but I think you cannot ignore the others as the error I have now is
> Could not find com.ionspin.kotlin:bignum-ios:0.1.1
implying that such a module must exist
a

alex009

11/10/2019, 8:08 AM
MultiPlatformLibrary is just container for dependency artifacts declaration. If dependency was published with Gradle metadata you can just set
common
artifact. If you want export declarations from dependency to framework header so you should write both iOS artifacts
As I see in bignum maven have not artifacts to x64 architecture
0.1.1 you can use only with ios32arm or ios64arm on ios
Your setup tried use metadata from https://repo1.maven.org/maven2/com/ionspin/kotlin/bignum/0.1.1/bignum-0.1.1.module and here not contains iosX64 architecture
Try compile to iOS device
a

Andy Gibel

11/10/2019, 2:47 PM
Oh I see! This is why that Gradle metadata thing keeps coming up. Thanks so much for explanation, I will try on a device
4 Views