• c

    Chris NL

    3 months ago
    With Kotlin I've created a shared module in Android Studio on my Windows 10 laptop that is used by my Android Mobile and Watch devices without any issues. Since I also wanted to build an IOS and WatchOS app, I've moved the shared library to a new Kotlin MultiPlatform Project in Android Studio Chipmunk on an (older) iMac (Retina 5K, 27-inch, Late 2015 with an 3,3 GHz Quad-Core Intel Core i5 running MacOS Montery 12.4) with xCode 13.4.1. I'm mostly testing on an iPhone 7 and iWatch 7. App development went pretty smoothly using the iPhone. At some stage I added a WatchOS target in xCode to start the App development for the iWatch. At that point I was using an older Android Studio and xCode 13.x version. All went ok, but at a certain moment getting the App(s) compiled is a nightmare. I do manage to get the App compiled and running on the iPhone and/or iWatch, but this requires multiple attempts and a lot of patience. Not really helpfull if you're still developing and just want to change something very minor. When building from xCode, the behaviour is very unpredictable, but most of the times it fails. And when it fails is doesn't always have the same outcome. I've put my project on h9ld for a while, but want to pick it up again. I did post another message on stackoverflow, but no luck/help yet: https://stackoverflow.com/questions/70632359/using-kmm-shared-library-for-use-in-xcode-gives-several-warnings-and-errors-when Some of the errors I get when building: • ld: warning: ignoring file /Users/bash/AndroidStudioProjects/XYZ/shared/build/cocoapods/framework/shared.framework/shared, file is universal (armv7k,arm64_32) but does not contain the arm64 architecture: /Users/bash/AndroidStudioProjects/XYZ/shared/build/cocoapods/framework/shared.framework/share • ld: warning: ignoring file /Users/bash/AndroidStudioProjects/XYZ/shared/build/cocoapods/framework/shared.framework/shared, building for watchOS-arm64_32 but attempting to link with file built for iOS-arm64 • ld: warning: ignoring file /Users/bash/AndroidStudioProjects/XYZ/shared/build/cocoapods/framework/shared.framework/shared, building for watchOS-armv7k but attempting to link with file built for iOS-arm64 I've been playing around with the Excluded Build Architectures, but no luck yet. I also cleaned the project several times. Sometimes it builds (and runs) successfully, but when performing a subsequent build it will most likely fail with an error as mentioned above. Does anyone have a clue?
    c
    1 replies
    Copy to Clipboard
  • n

    Nicolas Verinaud

    3 months ago
    [SOLVED ] I have a strange bug when building the shared xcframework. Everything works fine on my Mac Intel but it fails on a M1 Mac with the error
    Task 'embedAndSignAppleFrameworkForXcode' not found in project ':shared'.
    . Is there a cache or something on the M1 Mac ? It could be related to the kotlin version used but how can I verify ? Is this task unavailable on M1 Macs ?
    n
    Alex Acosta
    19 replies
    Copy to Clipboard
  • An Tran

    An Tran

    3 months ago
    Can anyone help me to cache
    ./konan
    folder as the information from this: https://kotlinlang.org/docs/native-improving-compilation-time.html#general-recommendations. It takes long time for me to build the shared-code, it is about 18 minutes, looks like it creates
    ./konan
    folder everytime
    An Tran
    Jim
    4 replies
    Copy to Clipboard
  • h

    healthsgood

    3 months ago
    when will kotlin multiplatform go to beta version?
    h
    Adam Brown
    +1
    4 replies
    Copy to Clipboard
  • j

    Jeff Lockhart

    3 months ago
    Is there a Kotlin multiplatform JSON library with JSON primitives similar to JVM's
    org.json
    (
    JSONObject
    ,
    JSONArray
    , etc.)? I'm looking to adapt some test code which traverses these JSON primitive types.
    j
    e
    2 replies
    Copy to Clipboard
  • s

    smallufo

    3 months ago
    Hi , I wonder if there is a plan for multiplatform
    Locale
    class ?
  • vishal G

    vishal G

    3 months ago
    How to use compose pagination with moko mvvm
  • vishal G

    vishal G

    3 months ago
    Using livedata
  • c

    Chris NL

    3 months ago
    I'm trying to understand what the best approach is to create a multiplaform app that runs on Android phone, Android Wear, iPhone and iWatch with a shared library. In my post from yesterday I was using Cocoapods for the shared library, but this gives me such a big headache, maybe I have to use XCFramework? I just tried to get it to work with an empty (new) Kotlin Multiplatform App project from Android Studio to get the "Hello, <<platform>>" demo running with the "Regular framework". It runs on the iPhone, but after adding the watchOS target in XCode, the problems start. I have uploaded the demo project to github: https://github.com/Chris-NL/Demo Building and running for iPhone works fine. Building for WatchOS works fine, but give me a warning: "linking against a dylib which is not safe for use in application extensions". When trying to run on the iWatch gives xCode gives me an installation error: "A signed resource has been added, modified, or deleted." I tried adding isStatic = true to build.gradle.kts, although that does remove the warning for watchOS, it results in installation errors on the iPhone. iMac (Retina 5K, 27-inch, Late 2015 with an 3,3 GHz Quad-Core Intel Core i5 running MacOS Montery 12.4) Android Studio Chipmunk xCode 13.4.1 all the latest plugins installed Anyone a clue on how to get this poperly to work?
    c
    1 replies
    Copy to Clipboard
  • Luan Pereira

    Luan Pereira

    2 months ago
    I'm getting this error after calling a fun that returns a Promise:
    Unhandled Runtime Error TypeError: hidden._get_entries__31877249_iz8n5_k$ is not a function
    browser request is responding 200 Any idea? The fun in js target:
    fun initialize (formId: String, hidden: Map<String, String>): Promise<InitializationResult> = GlobalScope.promise{ internalForm.initialize(formId, hidden)}
    Luan Pereira
    Trevor Stone
    15 replies
    Copy to Clipboard