• c

    Christian Sousa

    2 years ago
    How do you guys get over the
    unresolved reference: platform
    in a mpp project? It seems that this happens according to the weather or something like that, sometimes it works fine and I can use autocomplete for the
    platform
    but other time it simply doesn’t. I already tried invalidating caches and restart, tried removing some folder that I saw in a random stackoverflow thread, but it still happens.
    c
    Artyom Degtyarev [JB]
    4 replies
    Copy to Clipboard
  • c

    Christian Sousa

    2 years ago
    Hello guys, I’m trying to get the
    GoogleTagManager
    DataLayer in a kotlin multiplatform project, and I got it working for the Android easily. Problem is with iOS, following their guide I need to use the GoogleTagManager cocoapod: https://developers.google.com/tag-manager/ios/v3/swift I also needed to create a BridgingHeader as their tutorial says. What I did was: Create a BridgingHeader.framework myself, with the following headers that are here: https://github.com/jigish/GoogleTagManager/tree/master/GoogleTagManager/Library plus a BridgingHeader-umbrella.h as follows:
    #ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #else
    #ifndef FOUNDATION_EXPORT
    #if defined(__cplusplus)
    #define FOUNDATION_EXPORT extern "C"
    #else
    #define FOUNDATION_EXPORT extern
    #endif
    #endif
    #endif
    #import "TAGManager.h"
    #import "TAGContainer.h"
    #import "TAGContainerOpener.h"
    #import "TAGDataLayer.h"
    #import "TAGLogger.h"
    Added a module.modulemap like so:
    framework module BridgingHeader {
      export *
      umbrella header "BridgingHeader-umbrella.h"
      header "TAGContainer.h"
      header "TAGContainerOpener.h"
      header "TAGContainerOpener.h"
      header "TAGDataLayer.h"
      header "TAGLogger.h"
      header "TAGManager.h"
    }
    And my BridgingHeader.def is:
    language = Objective-C
    modules = BridgingHeader
    compilerOpts = -framework BridgingHeader
    linkerOpts = -framework BridgingHeader
    But it doesn’t seem right. Anyone had something similar like this that could provide some insight? Also, thanks to @magnumrocha for his help with this issue before 🙂
    c
    1 replies
    Copy to Clipboard
  • John O'Reilly

    John O'Reilly

    2 years ago
    Somewhat related to that....has anyone an example of using Ktor on macOS (as part of Multiplatform project)? I can use Ktor 1.3.2 with Coroutines 1.3.5-native-mt on iOS but doesn't work on macOS.
    John O'Reilly
    mbonnin
    4 replies
    Copy to Clipboard
  • u

    ushort

    2 years ago
    Hello, was wondering how I'd go about creating a multiplatform project that targets android but also jvm for desktop. Basically sharing logic between android and desktop applications. I tried creating new jvm target with different name and came across some variant errors.
    u
    t
    3 replies
    Copy to Clipboard
  • j

    judrummer

    2 years ago
    Hi, I have a problem after I upgrade Kotlin multiplatform version from 1.3.61 to 1.3.71. It's work fine in iOS 13.3 but when I try to run in iOS12.0 , It's crash as screenshot below. Anyone met this issue before? I test on Xcode 11.3.1 and 11.4
    j
    b
    3 replies
    Copy to Clipboard
  • Kweku

    Kweku

    2 years ago
    How is everyone currently handling dependency Injection? The app I'm working on for Android and IOS use KMP for the domain and data layers then Flutter for the UI. I was thinking of handling DI outside of KMP, for exame using dagger for Android as in native Android I've mages to use Dagger in a way where my domain and data layers have no dependencies on Dagger. The problem is I'm unsure about doing this for Ios having never developed for it before although I've read Needle and Dagger are similar? I've seen Koin( which I've used before) and KodeIn (which I haven't) be mentioned but haven't seen any example usage and theres also the option of doing it myself(Pure DI) Basically I've done a some research but it's the native part that is making me wary as I've seen things about concurrency issues TDLR: I'd like to know if anyone has any experience with DI on KMP
    Kweku
    j
    +3
    12 replies
    Copy to Clipboard
  • d

    Damiano Giusti

    2 years ago
    I receive the following error:
    Could not find method npm() for arguments [cheerio] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.
    I’m using the Groovy DSL
    d
    p
    2 replies
    Copy to Clipboard
  • ritesh

    ritesh

    2 years ago
    Hey folks 👋 Can someone point me in the right direction regarding how & where to host my private KMP lib which needs to be consumed in a separate Android project? 🤔 (jitpack?)
    ritesh
    c
    +4
    9 replies
    Copy to Clipboard
  • g

    Gunslingor

    2 years ago
    is it possible to make a mutliplatform project with all of the above: js, jvm, android, ios, common?
    g
    spierce7
    4 replies
    Copy to Clipboard
  • phldavies

    phldavies

    2 years ago
    Is anyone aware of an eventbus library for KMP, supporting at least JVM (Android) and K/N (iOS)? And is there any directory of KMP libraries where we can go to discover what’s out there?
    phldavies
    Alex Pogrebnyak
    +1
    3 replies
    Copy to Clipboard