I get a weird exception when I try to use a multip...
# apollo-kotlin
c
I get a weird exception when I try to use a multiplatform apollo client in iOS. The error I get is not very helpful:
Copy code
KotlinException=kotlin.AssertionError: Assertion failed
I've seen a couple sample projects, like the one from Apollo's github, and it has an iOS specific implementation of the repository that does some work with the coroutines scope. Is that what might be causing my issue? Anyone else using apollo client in a multiplatform project in iOS and able to successfully make queries and mutations?
m
I'm guessing you're hitting the main thread precondition?
Apollo Android assumes that flows are started and collected on the main thread on iOS so that might be an explanation but without more context, it could very well be something completely different
❤️ 1
c
Turns out it was the main thread precondition
I just copied what you did in the multiplatform sample and it worked
m
Makes sense... Ultimately, we should lift that restriction but the concurrency stuff has a lot of moving parts
c
No worries at all. Anything concurrency is difficult, not to mention crossplatform concurrency with strict rules. Thanks for the help!