I’ve working on a simple Kotlin Multiplatform project that target iOS and Android. I have a Repository class for combining the data from the network and local database. and I would like to expose this data through my shared module as a suspending functions with the Result type like so:
However, in my Swift ViewModel the suspending function’s callback resolves with an
type. I can print this data and it looks correct in the console, but can’t use the value as anything other than an
. I’ve tried casting to
but to no avail. Is this use case supported or should I just fallback to throwing exceptions/writing a custom ResultType?