Vivek Gupta
05/27/2025, 10:33 AMRaphael TEYSSANDIER
05/29/2025, 10:19 PMpublishAndReleaseToMavenCentral
on github actions. But I get an error for iOS:
> Task :xxx:compileKotlinIosSimulatorArm64
e: file:///Users/runner/work/xxx/xxx/xxx/build/generated/ksp/metadata/commonMain/kotlin/io/dot/lorraine/db/XXXConstructor.kt:5:24 'actual object XXXConstructor : RoomDatabaseConstructor<XXXDB>' has no corresponding expected declaration
e: file:///Users/runner/work/xxx/xxx/xxx/build/generated/ksp/metadata/commonMain/kotlin/io/dot/xxx/db/XXXConstructor.kt:5:24 XXXConstructor: expect and corresponding actual are declared in the same module.
> Task :xxx:compileCommonMainKotlinMetadata FAILED
e: file:///Users/runner/work/xxx/xxx/xxx/build/generated/ksp/metadata/commonMain/kotlin/io/dot/xxx/db/XXXConstructor.kt:6:23 'actual fun initialize(): XXXDB' has no corresponding expected declaration
e: file:///Users/runner/work/xxx/xxx/xx/src/commonMain/kotlin/io/dot/xxx/db/XXXConstructor.kt:6:24 XXXConstructor: expect and corresponding actual are declared in the same module.
Any idea how to fix it ?Muaz KADAN
06/01/2025, 8:26 AMfun StringResource.localized(): String {
return runBlocking { getString(this@localized) }
}
Anant Kumar Gupta
06/07/2025, 4:21 AMCGImage
in Kotlin/Native?
Warning - Cannot access class 'cnames. structs. CGImage' in the expression type. While it may work, this case indicates a configuration mistake and can lead to avoidable compilation errors, so it may be forbidden soon. Check your module classpath for missing or conflicting dependencies.
fun generateVideoThumbnailIOS(
uri: String
): ImageBitmap? = memScoped {
val nsUrl = NSURL.Companion.fileURLWithPath(uri.removePrefix("file://"))
val asset = AVURLAsset.URLAssetWithURL(nsUrl, null)
val generator = AVAssetImageGenerator(asset)
generator.appliesPreferredTrackTransform = true
val requestedTime = CMTimeMake(1, 1).useContents { readValue() }
val actualTime: CMTime = alloc<CMTime>()
val errorPtr = alloc<ObjCObjectVar<NSError?>>()
val cgImage = generator.copyCGImageAtTime(
requestedTime = requestedTime,
actualTime = actualTime.ptr,
error = errorPtr.ptr
) ?: run {
println("Error: ${errorPtr.value?.localizedDescription}")
return@memScoped null
}
val uiImage = UIImage.imageWithCGImage(cgImage)
val nsData = uiImage.pngRepresentation() ?: return@memScoped null
val length = nsData.length.toInt()
val bytePtr = nsData.bytes?.reinterpret<ByteVar>() ?: return@memScoped null
val byteArray = bytePtr.readBytes(length)
val finalThumbnail = Image.makeFromEncoded(byteArray).toComposeImageBitmap()
return@memScoped finalThumbnail
}
Jasmin
07/04/2025, 8:47 AMcommonMain/resources/files/frontend
.
How do I need to configure Gradle to bundle these assets in the XCFramework and access them via NSBundle
?
I know it must be possible somehow, because of the composeResources, which are getting correctly included.
Here is my current access code:
val basePath = NSBundle.mainBundle.resourcePath + "/files/frontend/"
Every help is appreciated 🙂Max
07/05/2025, 11:18 AMMario
07/08/2025, 8:09 AMAVCaptureVideoDataOutputSampleBufferDelegateProtocol
because both its method definitions are the same, just with different names:
public expect interface AVCaptureVideoDataOutputSampleBufferDelegateProtocol : platform.darwin.NSObjectProtocol {
@kotlin.commonizer.ObjCCallable @kotlinx.cinterop.ObjCMethod public open expect fun captureOutput(output: platform.AVFoundation.AVCaptureOutput, didOutputSampleBuffer: kotlinx.cinterop.CPointer<cnames.structs.opaqueCMSampleBuffer>? /* from: platform.CoreMedia.CMSampleBufferRef? */, fromConnection: platform.AVFoundation.AVCaptureConnection): kotlin.Unit { /* compiled code */ }
@kotlin.commonizer.ObjCCallable @kotlinx.cinterop.ObjCMethod public open expect fun captureOutput(output: platform.AVFoundation.AVCaptureOutput, didDropSampleBuffer: kotlinx.cinterop.CPointer<cnames.structs.opaqueCMSampleBuffer>? /* from: platform.CoreMedia.CMSampleBufferRef? */, fromConnection: platform.AVFoundation.AVCaptureConnection): kotlin.Unit { /* compiled code */ }
}
When I try to implement it, I get the following error:
object : NSObject(), AVCaptureVideoDataOutputSampleBufferDelegateProtocol {
override fun captureOutput(
output: AVCaptureOutput,
didOutputSampleBuffer: CMSampleBufferRef?,
fromConnection: AVCaptureConnection
) {
super.captureOutput(output, didOutputSampleBuffer, fromConnection)
}
}
The corresponding parameter in the supertype 'AVCaptureVideoDataOutputSampleBufferDelegateProtocol' is named 'didDropSampleBuffer'. This may cause problems when calling this function with named arguments.
Anmol Verma
07/17/2025, 5:21 PMGNKumar
07/22/2025, 4:11 AMKashismails
07/29/2025, 8:52 AMxxfast
08/06/2025, 1:19 AMExecution failed for task ':connect:compileKotlinIosArm64'.
> Error while evaluating property 'kotlinNativeProvider$kotlin_gradle_plugin_common.kotlinNativeBundleVersion$kotlin_gradle_plugin_common' of task ':connect:compileKotlinIosArm64'.
Showing All Messages
> java.nio.file.FileAlreadyExistsException: /Users/User/.konan/kotlin-native-prebuilt-macos-x86_64-2.2.0/tools/konan_lldb.py
Fernando
08/11/2025, 6:18 PMiosApp
into an apps
directory. I was able to move everything else but the iOS project, for some reason, it won't work. I've tried moving it with the Terminal, but it will not allow me to run the iOS project from the IDE (trough the Kotlin Multiplatform Project)
Does anybody knows how can I move it while being able to run it from the IDE?Excellence kawej
08/13/2025, 10:48 AMExcellence kawej
08/13/2025, 10:55 AM/Users/ctrltech/StudioProjects/Tmaterials/iosApp/iosApp/FirebaseBridge.swift:37:69 Trailing closure passed to parameter of type 'String' that does not accept a closure
Here is my implementation:
import Foundation
import FirebaseCore
import Firebase
import FirebaseAuth
import GoogleSignInSwift
import GoogleSignIn
@objc class FirebaseBridge: NSObject {
@objc static func configureFirebase() {
if <http://FirebaseApp.app|FirebaseApp.app>() == nil {
FirebaseApp.configure()
}
}
@objc static func isUserSignedIn() -> Bool {
return Auth.auth().currentUser != nil
}
@objc static func signOut() {
try? Auth.auth().signOut()
}
@objc static func signInWithGoogle(presenting: UIViewController, completion: @escaping (FirebaseUserWrapper?, Error?) -> Void) {
guard let clientID = <http://FirebaseApp.app|FirebaseApp.app>()?.options.clientID else {
completion(nil, NSError(domain: "NoClientID", code: 0))
return
}
let config = GIDConfiguration(clientID: clientID)
GIDSignIn.sharedInstance.signIn(withPresenting: presenting) { result in //error happens here
switch result {
case .success(let signInResult):
let user = result.user
guard let idToken = user.idToken?.tokenString else {
completion(nil, NSError(domain: "MissingIdToken", code: 1))
return
}
let accessToken = user.accessToken.tokenString
guard let idToken = idToken else {
completion(nil, NSError(domain: "MissingIdToken", code: 1))
return
}
let credential = GoogleAuthProvider.credential(withIDToken: idToken, accessToken: accessToken)
Auth.auth().signIn(with: credential) { authResult, error in
if let error = error {
completion(nil, NSError(domain: error.localizedDescription, code: 1))
} else if let firebaseUser = authResult?.user {
completion(FirebaseUserWrapper(user: firebaseUser), nil)
} else {
completion(authResult?.user.uid, nil)
}
}
case .failure(let error):
if let error = error {
completion(nil, error)
return
}
guard let result = result else {
completion(nil, NSError(domain: "GoogleSignInError", code: 1))
return
}
}
}
}
}
@objc class FirebaseUserWrapper: NSObject {
let uid: String
let email: String?
let displayName: String?
init(user: User) {
self.uid = user.uid
self.email = user.email
self.displayName = user.displayName
}
}
Mirzamehdi
08/28/2025, 5:38 PMMirzamehdi
08/31/2025, 3:46 PMVadim Briliantov
09/01/2025, 11:03 AMiOS
support now!
The most advanced JVM framework for building AI agents is now also the first AI framework in the world that brings full-scale agentic flows to backend, browser, WebAssembly, Android — and iOS 🔥Alexis
09/02/2025, 12:54 PMExited with status code 127
, and when looking at the report's details, I see this: /var/folders/ms/rzc7s4cj287gp9gvj1cs_ng00000gn/T/SchemeScriptAction-bjyy1r.sh: line 3: ./gradlew: No such file or directory
.
My folder structure is the following:
• my_app_kmp
◦ shared (kmp modules)
◦ umbrella (umbrella module for ios)
◦ androidApp
◦ iosApp
▪︎ App
▪︎ Packages
• feature_package
Here's the script I've put in Edit Scheme > Build > Pre-Actions > New Run Script Action *cd* ..
./gradlew :umbrella:embedAndSignAppleFrameworkForXcode
My umbrella's module build.gradle.kts contains this:
kotlin {
...
val xcfName = "Shared"
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { target ->
target.binaries.framework {
export(projects.shared.data)
export(projects.shared.di)
export(projects.shared.domain)
export(projects.shared.presentation)
baseName = xcfName
isStatic = true
}
}
...
}
And when trying to build from Android Studio I simply get this error: Build failed with 0 errors and 1 warning in 196 ms
Anyone has an idea what I might be missing?
EDIT: Looks like $SRCROOT
is not available in pre actions, so I had to use something like that: *cd* "$(dirname "$PROJECT_FILE_PATH")/.."
darkmoon_uk
09/09/2025, 7:38 AMEdgars Malahovskis
09/17/2025, 6:54 AMThierry Kh
09/18/2025, 1:47 PMval settingsUrl = NSURL.URLWithString(UIApplicationOpenSettingsURLString)
settingsUrl?.let {
UIApplication.sharedApplication.openURL(it, emptyMap<Any?, Any?>(), null)
}
MarkRS
09/19/2025, 2:24 PMPearce Keesling
09/19/2025, 3:13 PMColton Idle
09/26/2025, 3:33 PMThierry Kh
09/26/2025, 5:25 PMxxfast
09/29/2025, 1:23 AMFailed to build module; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 6.1 effective-5.10 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)', while this compiler is 'Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)'). Please select a toolchain which matches the SDK.
Mateus Bauer
10/02/2025, 1:03 AMFernando
10/08/2025, 9:19 AMplatform
package, and how does it gets autogenerated? 🤔
I wanted to do some experiments to use the new FoundationModels directly from Kotlin, but I don't seem to have access to that package. Does it auto generate, do I need to wait for a new kotlin release that comes with that interop?
I'm using kotlin 2.3.0-Beta1 (just for test)Alex Styl
10/13/2025, 12:47 PMColton Idle
10/15/2025, 2:45 PM