• Ahmet Özcan

    Ahmet Özcan

    6 days ago
    Hi everyone, Do you know how can i add an aar file (3rd party dependency) to one of my multi platform module for android platform side i tried to create an empty folder with that build.gradle file and aar file
    configurations.maybeCreate("default")
    artifacts.add("default", file('3rd_party_sdk.aar'))
    then i add that as a dependency to my mainAndroid dependency and it worked but now there are bunch of errors when syncing gradle which also ends with success but i cant use any code complation etc.
    Ahmet Özcan
    m
    24 replies
    Copy to Clipboard
  • Anders Kielsholm

    Anders Kielsholm

    4 months ago
    Not sure if this is the appropriate channel, but hope you can help 🙂 After updating to Chipmunk (Android Studio), the editor editor suddenly states that there's an "unresolved reference" to one of my model classes (that's located in another module). I have two "core" modules (multiplatform with a JVM target), a shared (multiplaform with an Android target) module and my main android app module (standard Android module). The weird thing is that it builds and runs - it's just the editor that complains. Furhtermore, the references I have in the shared module to the core modules aren't complaining. And the references from the android module to the shared module is also fine. It's just that single reference from the Android module to the core module with my model classes. It wasn't an issue until yesterday when I updated to Chipmunk so I assume it's related to that. I tried downgrading gradle/AGP without any luck. Might just be a visual thing, but autocomplete is tottally broke when it comes to the model classes. Anyone else experiencing the same? Hope you'll be able to help - thanks in advance.
    Anders Kielsholm
    e
    +11
    157 replies
    Copy to Clipboard
  • Nadeem Aslam

    Nadeem Aslam

    6 days ago
    Hey! I am trying to setup my system for KMM and i am facing an issue for hours.
    Cocoapods
    ruby (ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]) * System ruby is currently used Consider installing ruby 2.7 via Homebrew, rvm or other package manager in case of issues with CocoaPods installation ruby gems (3.0.3.1) cocoapods (1.11.3) * cocoapods-generate plugin not found Get cocoapods-generate from https://github.com/square/cocoapods-generate#installation Here is the stack overflow link for question.KMM KDoctor cocoapods error.
    Nadeem Aslam
    Konstantin Tskhovrebov
    6 replies
    Copy to Clipboard
  • Trey

    Trey

    1 week ago
    I've got an existing KMM project that was created by the wizard. I'd like to add another target to create another app for Android that uses the shared module. Are there any instructions on all the edits I need to make to the project files to add another target to an existing workspace? I expect not, but I figured I would ask before I attempt it.
    Trey
    m
    3 replies
    Copy to Clipboard
  • Trey

    Trey

    4 days ago
    Is there a class in Kotlin common that can be used like a WeakReference in Java? I see that there is a native version of this class. I'm confused why there isn't a common class that wraps the native implementations.
  • Stylianos Gakis

    Stylianos Gakis

    5 days ago
    I was wondering, we are looking to move into using version catalogs for some KMP code. However we didn’t find a way to migrate dependencies that use
    npm
    like this one:
    implementation(npm("@emotion/styled", "x.x.x))
    . We can’t just define a dependency like
    emotion.styled = "@emotion/styled"
    since version catalogs is complaining. Is there any workaround we can do to get something like this working?
    Stylianos Gakis
    e
    2 replies
    Copy to Clipboard
  • Ahmet Özcan

    Ahmet Özcan

    4 days ago
    Hey again, Im having problem with cocoapods referenced from kmm module i added PubNub pod to one of my kmm modules but then i tried to build ios iget this error
    Undefined symbol: _OBJC_CLASS_$_PubNub
    Can you help me about that pls ty.
    Ahmet Özcan
    kpgalligan
    11 replies
    Copy to Clipboard
  • vishal G

    vishal G

    4 months ago
    Kotlin coroutines latest version 1.6. 1 not compatible with iOS in kmm
    vishal G
    John O'Reilly
    10 replies
    Copy to Clipboard
  • j

    Javal

    4 days ago
    Hello 👋 We have a kmm project and it was all good until we tried to run it on Xcode 14 😅 iOS is calling a shared api which is a suspend function. It was working fine till now but crashes in Xcode 14 with
    Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared
    Shared kotlin code:
    open val content: suspend () -> Content =
                { getContent() }
    getContent() calls other suspend function to retrieve data from local cache. iOS code:
    func getContent() async -> Content {
        await sharedGetApi.content.execute() //accessing shared `content` here.
    }
    
    
    extension KotlinSuspendFunction0 {
        func execute<T>() async -> T {
            do {
                let result: T? = try await self.invoke() as? T
                if let result = result {
                    return result
                } else {
                    fatalError("\(T.self) can not be nil")
                }
            } catch {
                fatalError(error.localizedDescription)
            }
    }
    library versions: coroutines = "1.6.3" kotlin = "1.6.10" Any help would be appreciated 🙏 TIA
    j
    Alex Acosta
    2 replies
    Copy to Clipboard
  • j

    Jared Vu

    3 days ago
    Hi 👋 my team has been writing shared business logic in KMM for our native apps and web apps. When our kotlin data classes is exported to JS the
    val
    names are replaced. For the given class,
    @JsExport
    data class Foo (
      val configs: Configs?,
    )
    I would expect the exported JS to have a key
    configs
    but instead it is replaced with
    this.b1q_1 = configs;
    Is there any way to preserve the human readable val names within our exported class?
    j
    e
    3 replies
    Copy to Clipboard