Hi everybody i need your help to know how i could to see an entity in the kotlin shared module (iOSMain). For details i have a pods with his own entities (API and custom iOS pods) that i use with the expect/actual pattern. All work fine but i don’t arrive to see the attributes of my entity. exemple :
@objc public class CourseImpl: NSObject, Decodable, Course {
let objectID: String
let status: Bool
@objc init(objectID: String,
status: Bool,
title: String
) {
self.objectID = objectID
self.status = status
self.title = title
}
in iosMain
actual fun search(words: String): List<Training> {
val client = SearchClient()
client.initializeWithAppId("", apiKey = "")
client.searchWithText(text = words , indexName = "", callback = { response: List<Course> ->
response.map { it.objectID // don't work }
}.freeze() as (List<*>?) -> Unit)
return listOf(Training(id = "1", name = "name1"), Training(id = "2", name = "name2"))
}
could you help me to undestand ? thanks