Thread
#multiplatform
    kpgalligan

    kpgalligan

    3 years ago
    Are there any good tutorials on multiplatform, specifically for native mobile? I'm sort of really deep in the weeds on it, and am trying to bring some of the team up to speed and realizing how much needs to be explained.
    russhwolf

    russhwolf

    3 years ago
    unless that's too hello world for your needs
    kpgalligan

    kpgalligan

    3 years ago
    No. I need "from scratch". The main dev right now I'm trying to onboard is primarily an ios/swift dev. Interesting perspective. Years ago I was trying to walk my aunt through a computer problem over the phone. "Click x, you should see y", and she kept saying it wasn't working. Took a while till I figured out, "LEFT-click x, ...". We're sort of there. So many assumptions when talking to an Android dev.
    However, the similarities of swift to kotlin make some things easier. Trying to get a Java dev used to kotlin is tough. I don't need to explain extension functions to a Swift dev, for example.
    russhwolf

    russhwolf

    3 years ago
    Yeah I guess most materials I'm aware of come assume you're coming from Java or Kotlin/JVM
    kpgalligan

    kpgalligan

    3 years ago
    I'm starting an outline of a class to teach. Not that I do this kind of stuff, but assuming we'll be onboarding people internally, will need it. The kotlin/jvm stuff should be external, but once we get into expect/actual, etc, the stuff I'm finding out on the web is either kind of outdated or, frankly, wrong.
    russhwolf

    russhwolf

    3 years ago
    Yeah that sounds like an interesting project
    I haven't looked closely at it but you could also try this recent Ray Wenderlich post: https://www.raywenderlich.com/7357-ios-app-with-kotlin-native-getting-started
    kpgalligan

    kpgalligan

    3 years ago
    Ah, just talked to them at droidcon sf. Said they were going to be doing a bunch more stuff.
    kenkyee

    kenkyee

    3 years ago
    Would love to see the class guide if you do end up doing that to onboard people 🙂
    d

    drofwarcs

    3 years ago
    @russhwolf you beat me to the punch, was going to post that....especially since I'm the author 🙂. @kpgalligan that post is geared at 100% Kotlin on iOS only(no mpp). But it does cover alot of things that iOS developers wanting to see how kotlin works/interop with iOS looks like
    The main thing missing is how memory management work and the threading model, which I think will be an interesting conversation starter for native iOS developers lol
    russhwolf

    russhwolf

    3 years ago
    Well the fun thing about threading and memory on K/N is it’s generally pretty new and unfamiliar regardless of which platform you’re coming from.
    kpgalligan

    kpgalligan

    3 years ago
    "the fun thing"
    Dico

    Dico

    3 years ago
    Frankly, it's just a hurdle for everyone to jump over in order to use kotlin native, and its restrictions apply to common code in multiplatform projects. I haven't even considered trying to do multithreading there.
    No offense intended to the developers
    louiscad

    louiscad

    3 years ago
    @drofwarcs Do you think reading a getting started book at iOS 3-4 time (consequently Obj-C) may help an experienced Android developer like me make a 100% Kotlin iOS app (with shared code where possible)?
    kpgalligan

    kpgalligan

    3 years ago
    Multithreading common isn't too bad once you get the rules. It's definitely something you'll need to understand to do anything reasonably involved. Even if you're not managing threads in common code, you'll eventually have to understand how having that code called from multiple threads will impact your project.
    d

    drofwarcs

    3 years ago
    @louiscad that will be a good start. The main things you need learn is the frameworks, the lifecycle stuff, frameworks, and the basic stuff with ARC and memory management. I wouldn't suggest a 100% Kotlin iOS app however. Working with Storyboards can get really big and working with them manually can be really error prone. Also, the swift/objc/kotlin interop is awesome enough where you can work with the language that works best for the needed task(i.e. swift for ViewControllers/Views, Kotlin for business logic and shared code)
    louiscad

    louiscad

    3 years ago
    @drofwarcs Thanks for the advice! About storyboards, it's been a year I write Android UIs without xml, using self-made, then open sourced Splitties Views DSL (a lighter and more flexible #anko alternative), so I will try to make UIs with just Kotlin code, without involving storyboards at all, likely making something like Splitties Views DSL for iOS in the process. This is achievable, right? Then, no need for Swift, is that right?
    s

    Sam

    3 years ago
    Yes. You can do an app entirely in code without storyboards. I wouldn’t say it is a 50/50 split but there is a significant amount of developers that prefer to do a UI in code over storyboards. The newer anchor syntax for layout constraints makes it a lot cleaner. You’ll still want to develop some higher level positioning functions like
    pin
    that generate all the constraints needed.
    d

    drofwarcs

    3 years ago
    As a side note, that tutorial uses AppCode 2018.2. Appcode 2018.3 came out recently but does not have a compatible Kotlin Native plugin yet. So stick with 2018.2 if you are going through the tutorial.