m

    MJegorovas

    1 year ago
    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:
    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")
            }
        }
    }