julien hamon
03/09/2022, 6:25 AM@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 ? thanksSam
03/09/2022, 1:16 PMjulien hamon
03/09/2022, 2:04 PMprotocol Course {
var uuid: String { get }
}
Sam
03/09/2022, 7:32 PMjulien hamon
03/10/2022, 3:05 AM