An Tran
11/16/2022, 9:08 AMKotlin enum
from SwiftAn Tran
11/16/2022, 9:10 AMAn Tran
11/16/2022, 9:10 AM@Parcelize
class ErrorModel(
val type: Type
) : Parcelable {
enum class Type {
NETWORK_ERROR,
DEFAULT_ERROR
}
}
Andrei Salavei
11/16/2022, 9:58 AMType
is not a good name for swift enums as it is reserved keyword.
However the enum must be accessible almost as-is:
*let* type = ErrorModel.Type_.defaultError
If not, be sure you properly include the module containing ErrorModel
class to the KMM build and it appears in iOS framework header file.An Tran
11/17/2022, 8:21 AM