You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a multiplatform library that uses CryptoKit. I've implemented code similar to the KCrypto example. When building a framework for iOS or when running a test on the iOS simulator, everything works fine. However, since I'm building a library, I want to publish it. I've added the maven-publish plugin to my build.gradle.kts file.
Now when I run publishIosSimulatorArm64PublicationToMavenLocal (or any other iOS publish task) it fail because it cannot find the types from the swift file.
Hello!
Publishing of KMP libraries containing native code is somewhat complicated at the moment and require additional steps for publisher, such as writing cocoapods or spm definitions and publishing XCFramework somewhere accessible to library users.
I'm currently making my own library using this plugin and once I'm done I will describe how to do it properly in a blog post.
I will return in this issue once it's done 🙂
I'm trying to build a multiplatform library that uses CryptoKit. I've implemented code similar to the KCrypto example. When building a framework for iOS or when running a test on the iOS simulator, everything works fine. However, since I'm building a library, I want to publish it. I've added the
maven-publish
plugin to mybuild.gradle.kts
file.Now when I run
publishIosSimulatorArm64PublicationToMavenLocal
(or any other iOS publish task) it fail because it cannot find the types from the swift file.In my
build.gradle.kt
:native/KCrypto/PublicKeyEncoder.swift
:In a iOS specific Kotlin (located in
src/iosMain/kotlin
:Generates the following error:
As mentioned, this error only occurs when publishing. The same code runs fine in other scenarios.
The text was updated successfully, but these errors were encountered: