Davin reinaldo gozali
03/15/2021, 3:01 AMfun myFunction(param1 : String, error : error : CPointer<ObjCObjectVar<NSError?>>?)
how to user that kind of CPointer type ?Artyom Degtyarev [JB]
03/15/2021, 7:32 AMNSError
and send the pointer to the function. IIRC, something like that should work
memScoped { // All objects allocated in this block will be marked as free when its over, I use it for simplicity here.
val startError = alloc<ObjCObjectVar<NSError?>>()
myFunction(param1 = "Hello", error = startError.ptr))
}
Davin reinaldo gozali
03/15/2021, 8:02 AM