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

kpgalligan

08/03/2018, 2:03 PM
Just published the Droidcon NYC app, which is Android/iOS multiplatform. There's quite a bit of duct tape in there, but it works: https://twitter.com/kpgalligan/status/1025379360910573574
👍 1
👏 7
t

thevery

08/03/2018, 2:27 PM
Maybe create github tag for issues you need some help with?
and btw, have you tried to add come
cancellability
to
backgroundTask()
?
r

russhwolf

08/03/2018, 2:42 PM
Very cool! I already was setting some time aside this weekend to update multiplatform-settings to 0.8.1, so I’ll have to play around with this as well
k

kpgalligan

08/03/2018, 3:44 PM
I'll add a tag to issues. I need to dive in and come up with a good list. Was up pretty late just getting this to "release".
I haven't tried any cancellability. That implementation of backgrounding is intentionally pretty uninteresting. I'm assuming that's one area that jetbrains and/or others will be crushing pretty soon, so didn't put a lot of extra effort into it.
Just an FYI. There were issues with cocoapods and the xcode project on fresh git clones. I added the actual Pods folder, which is kind of ugly but does work. Will discuss during live code.
Updated code and video:

https://www.youtube.com/watch?v=YAeDK3Ei0Lk

r

russhwolf

08/04/2018, 7:49 PM
Nice! That was a lot easier to follow than the live-code video. Two notes: 1. I think you shouldn’t need to manually invoke
./gradlew build
before running the iOS side, since your xcode build script is calling into gradle. I might be wrong but I think the only benefit you’re gaining from that is not seeing errors in xcode before you first build to device. 2. On Unit returns in lambdas, not sure if you’re aware but a similar issue exists for Java interop. When implementing such a lambda in Java you have to return
Unit.INSTANCE
at the end.
k

kpgalligan

08/04/2018, 7:52 PM
#1 I figured the same but have had issues. In this case it probably won’t run sqldelight, but that would be easy to fix. Will try the Xcode-only build later
#2 good to know. Will also check that out
Recorded videos are so much easier. At home have the blue yeti mic and a second monitor with 1920x1080 resolution. Only major issue is my tendency to go on tangents
r

russhwolf

08/04/2018, 7:57 PM
In my experience your tangents tend to be reasonably interesting anyway 🙂
The android java/kotlin interop guide has some notes on unit returns and links a couple youtrack issues: https://android.github.io/kotlin-guides/interop.html#lambda-arguments