• s

    Sean

    1 year ago
    Heya, Any advice for a rookie on figuring out how to get started with multiplatform for android + web (planning on firebase handling the backend)? I can use the new project template from the android studio plugin, and I found the KaMPKit and MOKO templates, but those are all for android/iOS. Which causes two problems, one is I don't have a mac so the iOS side is busted, and two the whole reason I want a template is because I'm in over my head tinkering with a dev environment (Gradle especially) so the webapp not being there at all is not great. Maybe I'm expecting too much for something so new though, I can always just work on a native kotlin/android app and worry about the web side later. Thanks!
    s
    russhwolf
    2 replies
    Copy to Clipboard
  • Paul Woitaschek

    Paul Woitaschek

    1 year ago
    I want to encode the version of my library in the framework. Currently in the plist, the
    CFBundleVersion
    is always
    1
    . How can I set this value?
    Paul Woitaschek
    louiscad
    4 replies
    Copy to Clipboard
  • a

    Alfred Lopez

    1 year ago
    I’ve searched this channel for answer to this, and found nothing (perhaps I’m doing it wrong 😃 ), but is there a way to do the following using KClass... Class.forName(...).newInstance()
    a
    s
    4 replies
    Copy to Clipboard
  • Halil Ozercan

    Halil Ozercan

    1 year ago
    Is there anyone who is experiencing a similar issue to this one https://youtrack.jetbrains.com/issue/KTOR-1071 ? I'm trying to make a request to an
    https
    endpoint and it fails on MacOS app with
    kotlin.IllegalStateException: TLS sessions are not supported on Native platform
    Halil Ozercan
    1 replies
    Copy to Clipboard
  • Animesh Sahu

    Animesh Sahu

    1 year ago
    I don't see SimplePlatform class described in the video

    Diving into Kotlin Multiplatform

    at timestamp 27m 34s. Anybody tried using it, to define targets like allExceptJs or something?
    Animesh Sahu
    russhwolf
    +1
    4 replies
    Copy to Clipboard
  • d

    Daniele B

    1 year ago
    About MVI and Multiplatform: All articles talking about MVI with Kotlin I have been reading just deal with Kotlin/Android and not with Kotlin/MultiPlatform. They all seem to use SealedClasses for defining the Intents. For any event, the Android UI layer references a Sealed Class Intent. However in a multiplatform context, on iOS is not really possible to reference a SealedClass Intent, AFAIK. For this reason, my MVI/KMP implementation doesn’t use Sealed Classes for Intents, but just standard functions defined on the shared ViewModel. I wonder if anyone has some different suggestions.
    d
    ankushg
    +3
    12 replies
    Copy to Clipboard
  • jean

    jean

    1 year ago
    I’m trying to integrate mixpanel to a js target but I’m not sure how to do it. That’s what I have for ios :
    import cocoapods.Mixpanel.Mixpanel
    
    actual class MixpanelFactory {
        actual fun createTracker(): Tracker {
            val actualMixpanel = Mixpanel("", mapOf<Any?, Any>(), 0)
            return object : Tracker {
                override fun sendEvent(event: Event) {
                    actualMixpanel.track(event.name, event.asMap() as Map<Any?, Any>)
                }
            }
        }
    }
    I did add the npm dependency for the js target and tried something like this, to not avail :
    @JsModule("mixpanel-browser")
    external val mixpanel: Mixpanel
    
    actual class MixpanelFactory {
        actual fun createTracker(): Tracker {
            val actualMixpanel = Mixpanel("")
            return object : Tracker {
                override fun sendEvent(event: Event) {
                    actualMixpanel.track(event.name, event.asMap())
                }
            }
        }
    }
    
    // js code to use
    var mixpanel = require('mixpanel-browser');
    mixpanel.init("YOUR_TOKEN");
    mixpanel.track("Sign up");
    jean
    1 replies
    Copy to Clipboard
  • a

    Alfred Lopez

    1 year ago
    @Vsevolod Ganin It happens to me too, but I"ve noticed that IntelliJ does know what you're coding based on the module and it will "code complete" appropriately. For example, if I'm editing a Kotlin file in commonMain and I have java.util.*, IntelliJ tells me it cannot find it, but if I'm editing a Kotlin file in jvmMain that has the same line, then it "finds it". It could be a real feature, a fluke, or I'm imagining it all. 🙂
    a
    Vsevolod Ganin
    4 replies
    Copy to Clipboard
  • James Sherlock

    James Sherlock

    1 year ago
    Bit of a bizarre one but has anyone had any success with an iOS app using purely Swift Package Manager? We've got a branch working using the CocoaPods plugin in conjunction with https://github.com/ge-org/multiplatform-swiftpackage - the iOS app itself completely ignores the pods and only brings in things via SPM but we have a dependency on Firebase which is now freaking out with the SPM plugin when we remove CocoaPods from the Kotlin side of things.
    ld: framework not found FirebaseFirestore
    (as part of the linkReleaseFrameworkIosArm64 step) We're hoping to try and completely remove Pods but it looks like the KMM project can't build without it? Any guidance appreciated 🙏 Thank you
    James Sherlock
    1 replies
    Copy to Clipboard
  • Elyes Ben Salah

    Elyes Ben Salah

    1 year ago
    Hi guys , I would like to know how to import and use a KLib
    Elyes Ben Salah
    Kris Wong
    8 replies
    Copy to Clipboard