My iOS team is running into some issues trying to ...
# apollo-kotlin
n
My iOS team is running into some issues trying to mock objects coming from the our KMM library. In order to mock the response, they have to create this status type, which throws a EXC_BAD_ACCESS exception. But in the debugger somehow I'm able to successfully create the type
m
Native is hard 😅
Not sure what the EXC_BAD_ACCESS comes from. What is
TaskStatusType
? Is that Kotlin or Swift?
If you control the type, maybe try to rename
completed
with something else in case it's a reserved word or something?
n
ok thanks, checking with them now
Hmm, I'm not sure if that is the problem for two reasons:
1. I tried to replace completed with the other enums (like active) and go the same issue.
2. I tried to init the enum in a different way but got EXC_BAD_ACCESS there too. (see screenshots)
m
There's something weird about the case there, it should be uppercase
But other than that, sounds like a more general Kotlin native issue?
Ah if you're calling that from a non main thread, make sure to init the Kotlin runtime
n
ok thanks!