https://kotlinlang.org logo
m

MJegorovas

07/30/2021, 12:28 PM
Hey everyone, I'm trying to upload ios app to store but when building archive for it I get error from my swift library interop task (followed this guide)
Exception in thread "main" java.lang.IllegalStateException: Could not find 'libCryptoKitWrapper.a' binary in neither of [CryptoKitWrapper/build/Release-iphoneos]
even though the file is present in the location. Any ideas what might be wrong?
Related interop task:
Copy code
iosTarget("ios") {
    val platform = when (preset?.name) {
        "iosX64" -> "iphonesimulator"
        "iosArm64" -> "iphoneos"
        else -> error("Unsupported target $name")
    }
    compilations.getByName("main") {
        cinterops.create("CryptoKitWrapper") {
            val interopTask = tasks[interopProcessingTaskName]
            interopTask.dependsOn(":CryptoKitWrapper:build${platform.capitalize()}")
            includeDirs.headerFilterOnly("$rootDir/CryptoKitWrapper/build/Release-$platform/include")
        }
    }
}