https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Mike

09/20/2021, 10:10 AM
Hi, I’m using Kotlin multiplatform in one of my iOS projects. I need to write several features which will run in the background while the app is not running (main thread is not allowed in background tasks, the OS will silently kill the task if it tries to use main thread), these include things like background tasks, widgets, etc. I’ve been running into problems with kotlin multiplatform code crashing due to the current memory model and I’ve been investigating. Has anyone been able to successfully use kotlin multiplatform for background tasks on iOS?
b

Bailey Pollard

09/20/2021, 11:12 AM
Are you using the
native-mt
branch of coroutines?
m

Mike

09/20/2021, 11:30 AM
I’m not, but I’ll take a look
b

Bailey Pollard

09/20/2021, 11:31 AM
Give that a shot
👍 1
m

Mike

09/20/2021, 12:00 PM
Cool I was not aware of the changes coming to 1.6. I hope KN solves the memory model issue, it’s the one thing I spend most of my time debugging when using Kotlin multiplatform on iOS.
b

Bailey Pollard

09/20/2021, 12:01 PM
Story of our life lol