https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
multiplatform
  • b

    Bradleycorn

    05/13/2021, 7:51 PM
    Hey all … I’ve created a new multiplatform project that creates a library and one of its targets is javascript. I’m trying to produce a package that I can publish to an npm registry. Everything complies OK, but the output for the js target seems …. odd. The produced
    package.json
    files have a few problems: 1. they have dependencies with “hardcoded” absolute file paths, like:
    "kotlin": "file:/Users/brad.ball/dev/multiplatform/new/wager-utils/build/js/packages_imported/kotlin/1.5.0",
    2. the dependencies list contains entries for
    kotlin-test-js-runner
    and
    kotlin-test
    . Why would those be dependencies for a published package? Seems like at best they should be devDependencies. With the hard coded file paths, you can’t really publish the package or use it anywhere but on the machine where it was generated… The full package.json output is included in the replies thread… Am I doing something wrong? I have a pretty standard gradle config, haven’t really changed much from what was produced by IntelliJ when creating the project.
    1 reply · 1 participant
  • t

    Tom Wayne

    05/14/2021, 9:31 AM
    Hello, I have KMP module which is shared for iOS and Android client. On android everything is working good. However when I run iOS client we start to get this error:
    2021-05-14 10:05:02.962001+0200 sts[1040:3855803] KMP_ClosedTicket: state: loading
    Function doesn't have or inherit @Throws annotation and thus exception isn't propagated from Kotlin to Objective-C/Swift as NSError.
    It is considered unexpected and unhandled instead. Program will be terminated.
    Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen com.betsys.util.PlatformCache@28c4da8
    The PlatformCache object which throws this error looks like this:
    object PlatformCache {
        var isLogsEnabled: Boolean = false
            private set
    
        fun setIsLogEnabled(isEnabled: Boolean) {
            isLogsEnabled = isEnabled
        }
    }
    As far as I understand this error is thrown when our logger instance acces the isLogsEnabled field from Logger.
    actual open class Logger {
        actual companion object {
            actual val INSTANCE: Logger
                get() = Logger()
        }
    
        actual open fun v(msg: String) {
            log(msg)
        }
    
        actual open fun d(msg: String) {
            log(msg)
        }
    
        actual open fun i(msg: String) {
            log(msg)
        }
    
        actual open fun w(msg: String) {
            log(msg)
        }
    
        actual open fun e(error: Throwable, msg: String) {
            log(msg, error)
        }
    
        private fun log(msg: String, error: Throwable? = null) {
            // Set by BSPlatform
            if (PlatformCache.isLogsEnabled) {
                if (error == null) {
                    println("❤️ KMPLog: $msg")
                } else {
                    println("❤️ KMPLog: $msg  error: ${error.message}")
                }
            }
        }
    }
    Do you have some idea on how to avoid this crash? I do not know anything about freezing in K/N. 🙂
    k
    k
    4 replies · 3 participants
  • f

    Fernando Angli

    05/14/2021, 8:03 PM
    Hi guys, have someone used GRPC with KMM? I'm thinking about building an sdk for both ios and android, it uses GRPC - Protobuf for communication. I would love to reuse as much code as possible and write as little ios code as possible too, but I haven't found any multiplatform solution for this communication stack. Any suggestions?
    p
    l
    +1
    9 replies · 4 participants
  • j

    Jeff Tycz

    05/14/2021, 11:56 PM
    when building my KMM project it runs any tests that there are. I comment the test out when trying to do a build but but I don't want to keep having to do that is there a way to build without running the tests?
    r
    1 reply · 2 participants
  • d

    Dominaezzz

    05/16/2021, 10:48 AM
    How do people do
    -Xopt-in=kotlin.RequiresOptIn
    in multiplatform projects? IntelliJ annoyingly keeps asking me to add it but I have.
    targets.all {
            compilations.all {
                kotlinOptions {
                    freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
                }
            }
        }
    ⬆️ 1
    1 reply · 1 participant
  • s

    sushma nayak

    05/16/2021, 1:32 PM
    Is it possible to have a bitbucket pipeline setup for KMM projects? Atleast to build and run tests.
    m
    1 reply · 2 participants
  • a

    archana 0623

    05/16/2021, 2:46 PM
    Hi, Is there any tool/framework/plugin that can give a seed multiplatform project setup such that the code is shared across web, android and desktop, I mean there are multiplatform plugins from from kotlin but they only share code either between android and IOS or android and desktop....And I am not good at gradle...since I am from JS background..So please let me know if there is a possibility of getting basic setup for sharing code across web android and desktop
    m
    a
    +1
    4 replies · 4 participants
  • i

    iamthevoid

    05/17/2021, 7:11 AM
    Is there any chance to use Firebase Crashlytics in shared code in KMM project? I heard about it (without any explanations: “crashlytics doesn’t need google services, blah-blah…“) but when i’ve started implement it i’ve got build exception
    An exception occurred applying plugin request [id: ‘com.google.firebase.crashlytics’]
    > Failed to apply plugin ‘com.google.firebase.crashlytics’.
    > Applying the Firebase Crashlytics plugin to a library project is unsupported. It should only be applied to the application module of your project to enable automatic upload of obfuscation mapping files for your application.
    k
    2 replies · 2 participants
  • c

    Christian Gaisl

    05/17/2021, 10:42 AM
    I am trying to build a Multiplatform library: I heard in a few talks, that one of the advantages of Interfaces vs expect/actual is that you can write the implementation in Swift. For me, that works just fine if I am building a self contained app (Interface declared in common code, implementation inside of the iOS app in swift). But how would I bundle this implementation into a library? With my current approach, the user of the library would have to implement the swift implementation of the Interface themselves, which kind of defeats the purpose of a library in the first place.
    r
    7 replies · 2 participants
  • p

    Paul Woitaschek

    05/17/2021, 1:03 PM
    How do you handle inline classes? On 1.4.x we've exposed the kotlin duration to ios. But now with the changes of the internal representation from millis to long the exposed value isn't usable any longer. I thought about `actual typealias`ing it for ios to a regular class and keep duration for android but that won't work either because you'd need to chose between an interface and a class.
    l
    11 replies · 2 participants
  • p

    Philipp Mayer

    05/17/2021, 3:36 PM
    Hello everyone, I'm running into a problem when testing my code in
    commonMain
    . I can't use
    kotlin.test.Test
    . I followed https://kotlinlang.org/docs/gradle.html#set-dependencies-on-test-libraries, which resulted in the following `build.gradle.kts`:
    kotlin {
        android()
        jvm("desktop") {
            compilations.all {
                kotlinOptions.jvmTarget = "11"
            }
        }
        sourceSets {
            jvm {
                testRuns["test"].executionTask.configure {
                    useJUnitPlatform()
                }
            }
    
    ...        
    
            val commonTest by getting {
                dependencies {
                    implementation(kotlin("test-common"))
                    implementation(kotlin("test-annotations-common"))
                    implementation("io.kotest:kotest-assertions-core:${Versions.kotest}")
                }
            }
    ...
    The project overall is pretty empty, as in there are only the basic build steps. I looked up some other example repositories and also refreshed the dependencies, but it seems that I have missed something. I would be more than happy if anyone has a heads up of what might be wrong. Thanks in advance!
    r
    j
    +1
    16 replies · 4 participants
  • a

    atsushieno

    05/17/2021, 6:48 PM
    Hi folks. I have been working on my cross-platform MIDI library in Kotlin MPP (originally from C#, but I'm porting it). It would be interesting for those who understand, in that it supports MIDI 2.0 (partially). Kotlin is the 3rd. or 4th. language that supports it now. https://atsushieno.github.io/2021/05/18/ktmidi.html
    🎉 1
    r
    l
    6 replies · 3 participants
  • r

    rb90

    05/17/2021, 6:50 PM
    Hi 🙂, I have currently the problem with tests written for the androidMain that they do not run in Android Studio, the error is "No tasks available", can you please tell me what I need to change or setup that they work? I use the newest Android Studio Canary Build:
    ✅ 1
    e
    4 replies · 2 participants
  • d

    Daniele B

    05/17/2021, 10:58 PM
    I am currently working at the D-KMP navigation. It’s indeed possible to achieve almost similar syntax between Kotlin and Swift. The extra casting you see on SwiftUI is due to the fact that it’s not possible to export Kotlin Reified functions to iOS (a non-reified function had to be added). But that’s really the only thing. On the other hand, Swift has the advantage over Kotlin not to require to type the Enum class name.
    👍🏽 1
    r
    2 replies · 2 participants
  • j

    Jeff Tycz

    05/17/2021, 11:28 PM
    I am trying to publish my KMM library to Maven, when I add the dependency into a non-KMM Android app I get this error
    Execution failed for task ':app:checkDebugAarMetadata'.
    > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
       > Could not resolve io.github.tyczj:tweedle-android:0.3.0.
         Required by:
             project :app
          > No matching variant of io.github.tyczj:tweedle-android:0.3.0 was found. The consumer was configured to find a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
              - Variant 'commonMainMetadataElements-published' capability io.github.tyczj:tweedle-android:0.3.0:
                  - Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
                  - Other compatible attribute:
                      - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
              - Variant 'metadataApiElements-published' capability io.github.tyczj:tweedle-android:0.3.0:
                  - Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
                  - Other compatible attribute:
                      - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
              - Variant 'releaseApiElements-published' capability io.github.tyczj:tweedle-android:0.3.0 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
                  - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
              - Variant 'releaseRuntimeElements-published' capability io.github.tyczj:tweedle-android:0.3.0 declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
                  - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
    The KMM module works fine if the app references it locally. I am not sure what I need to do to be able to use the Android dependency correctly, this is my first time making a KMM library
    r
    3 replies · 2 participants
  • n

    Napa Ram

    05/18/2021, 8:42 AM
    Hi, is there any example using Realm database with KMM as there sample app is not running https://github.com/realm/realm-kotlin/tree/master/examples/kmm-sample
    j
    p
    +1
    34 replies · 4 participants
  • b

    Ben Lancaster

    05/18/2021, 2:31 PM
    I have a multi-module Kotlin Multiplatform library for Android+iOS+tvOS that looks something like the following:
    MyProject
    ├── Library
    ├── Library-common
    ├── Library-submodule
    └── Library-submodule-with-cinterops # has a cinterop def for a native dependency, let's call it Foo
    The idea is that Library depends on
    Library-submodule
    and
    Library-submodule-with-cinterops
    , both of which depend on
    Library-common
    . All is working fine, with the exception of the
    Library-submodule-with-cinterops
    . I can build that module in isolation, which generates the .aar, .framework files, and .klibs, but when I build
    Library
    , the linker fails with the following:
    The /Applications/Xcode <http://11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld|11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld> command returned non-zero exit code: 1.
    output:
    ld: framework not found Foo
    I’m not sure why
    -framework Foo
    is being added to the
    ld
    command (executed as part of
    :Library:linkReleaseFrameworkApple
    ), I’m guessing I need to tell the linker where to find it, but I’m not sure how to go about it. Does anyone have any pointers for how I might fix it?
    1 reply · 1 participant
  • t

    Tiago Nunes

    05/18/2021, 4:37 PM
    Hi! I want to create a Swift class and use it in Kotlin in "iosMain". Can I just create both files in iosMain, or do I need to do some extra steps?
    k
    k
    26 replies · 3 participants
  • b

    Boris Yordanov

    05/18/2021, 6:58 PM
    Has anyone done CI with a ios/android project? What would be the steps to build both apps in parallel?
    a
    m
    3 replies · 3 participants
  • n

    Napa Ram

    05/19/2021, 6:41 AM
    Hi anyone is having example of LiveData used in Shared common code
    a
    j
    5 replies · 3 participants
  • a

    Akshat Sharma

    05/19/2021, 10:24 AM
    Hi Team, I am a react native developer and interested in migrating my React Native App to Kotlin Multiplatform. Any suggestions on how should i start? Ps: no experience with iOS, Android or Kotlin Development.
    n
    3 replies · 2 participants
  • c

    Charles Prado

    05/19/2021, 11:45 AM
    Hello everyone! Someone here already had problems with XCode SwiftUI previews while using KMM? The preview updates are paused every time for me, it seems that it's only happening in KMM projects. I already set all my scripts to run only on install but that doesn't solve the problem.
    r
    w
    6 replies · 3 participants
  • b

    Barry Fawthrop

    05/19/2021, 7:47 PM
    What is the status of using MongoDB and Mongo Realm with KMM?
    b
    j
    4 replies · 3 participants
  • r

    rb90

    05/19/2021, 8:19 PM
    Hello 👋, yesterday (18.05.2021) Android Studio Arctic Fox reach the Beta release state, first of all congrats to this 🚀. But with that Beta Android studio I am also able now to work on KMP projects. Does that maybe mean that Kotlin Multiplatform has reached BETA? 😁
    ✅ 1
    k
    j
    3 replies · 3 participants
  • r

    Rémy

    05/20/2021, 9:21 AM
    [FIXED] Hi everyone 🙂 I have a problem when I try to build my android app (thread). I can’t find this issue on Google 🤔... Do you have an idea please?
    3 replies · 1 participant
  • t

    Tom Wayne

    05/20/2021, 9:44 AM
    Hey all, I am have an KMP project which contains iOS app, Android app and shared KMP module. When I try to build the iOS app from the Android Studio (in order to be able to debug it) the build succeed. 🙂 The problem is that the build always (when you change a code) take around 12 minutes. Which is way to long when you are debugging and often testing if given code works. The 90% percent of time spent on build is used to run these tasks:
    Task :kmpcorelib:linkDebugFrameworkIosArm64
    > Task :kmpcorelib:linkDebugFrameworkIosX64
    > Task :kmpcorelib:linkKMPCoreDebugFrameworkIosArm64
    > Task :kmpcorelib:linkKMPCoreDebugFrameworkIosX64
    > Task :kmpcorelib:linkKMPCoreReleaseFrameworkIosArm64
    > Task :kmpcorelib:linkKMPCoreReleaseFrameworkIosX64
    > Task :kmpcorelib:linkReleaseFrameworkIosArm64
    > Task :kmpcorelib:linkReleaseFrameworkIosX64
    My question is: Is there a way how to run the app on iOS simulator without running all these task? I dont know why the studio needs to link the RELEASE version of the framework. Also I dont understand why it has to run the iOSArm64 variants when its running the on the X64 simulator. Also whats the difference between running
    linkDebugFrameworkIosArm64
    and
    linkKMPCoreDebugFrameworkIosArm64
    isnt it duplication? PS: I run the iOS buld via clicking the default configuration in Android studio. Not some custom gradle script
    :thread-please: 5
    2 replies · 1 participant
  • t

    Tiago Nunes

    05/20/2021, 10:44 AM
    Hi! I have a ios app that imports a KMM via pod. In Swift, I have access to the compiled kotlinx_coroutines_coreFlow, Shouldn't I also have access to a kotlinx_coroutines_core_kotlinx_coroutines_flowcallbackFlow, to have access to the callbackFlow function (https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/callback-flow.html) in Swift/Objective C, for example? Isn't callbackFlow and flowOf, and all of kotlin code compiled to Obj C?
    r
    l
    3 replies · 3 participants
  • h

    Helena Kot

    05/20/2021, 1:18 PM
    Hello - Android Studio source project linking issue here I was using Koltin MP for android/iOS app, and It worked well on Android studio 2.2 Canary build, Foolishly I installed stable version of 2.2 replacing Canary build, and now everything works in exception that code analysis don't see commonMain from androidMain. It does work between iosMain and commonMain. Reinstallation of AS, plugins, invalidate and restart, cache deletions don't fix this issue. Newly generated projects from new > KMP project have the same issue Does anyone else have the same problem? Or I am missing something in setup?
    p
    3 replies · 2 participants
  • b

    Ben Woodworth

    05/20/2021, 9:15 PM
    Aside from that, is there a way to add native platform dependencies to a source set? I have
    desktop
    with
    dependsOn(common)
    , and all the *_x64 source sets with
    dependsOn(desktop)
    , but I'm not sure how to use the platform libs in desktop
    common
    - jvm
    - js
    - desktop (uses platform.zlib)
      - linux_x64
      - mingw_x64
      - macos_x64
    m
    3 replies · 2 participants
  • x

    xxfast

    05/21/2021, 1:44 AM
    how do we switch through kotlin enums in swift? figured it out
    a
    d
    5 replies · 3 participants
Powered by Linen
Title
x

xxfast

05/21/2021, 1:44 AM
how do we switch through kotlin enums in swift? figured it out
a

Abhishek Dewan

05/21/2021, 1:47 AM
Kotlin Enums should be converted to SwiftEnums I think. Can you try .<enumvalue> to see if it shows up.
x

xxfast

05/21/2021, 1:50 AM
switch progressState.step {
case .checkingcredentials:
    ProgressView("Checking credentials")
case .registeringdevice:
    ProgressView("Registering device")
case .updatingmanifests:
    ProgressView("Updaing manifests")
default:
    ProgressView("Loading")
}
works the same as swift enums - nice
🆒 1
a

Abhishek Dewan

05/21/2021, 1:51 AM
🙂
d

darkmoon_uk

05/21/2021, 6:50 AM
Can I just say @xxfast perfect handling of Slack in the way you edited the question and provided the solution in-thread 👌 Gold standard for us all.
👌 2
View count: 5