https://kotlinlang.org logo
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
  • t

    Travis Reitter

    06/20/2022, 8:55 PM
    hi, I just upgraded Android Studio from Bumblebee to Chipmunk and now the KMM plugin is disabled and if I re-enable it then restart, I hit this:
    plugin 'com.jetbrains.kmm' failed to initialize and will be disabled. Please restart Android Studio.
    
    java.lang.NoSuchMethodError: 'java.lang.String org.jetbrains.kotlin.konan.MetaVersion$Companion.getDEV-CSrMgVE()'
        at com.jetbrains.mpp.workspace.WorkspaceBaseKt.<clinit>(WorkspaceBase.kt:31)
        at com.jetbrains.mpp.workspace.WorkspaceBase.setKonanVersion(WorkspaceBase.kt:82)
        at com.jetbrains.mpp.workspace.WorkspaceBase.setKonanHome(WorkspaceBase.kt:43)
    ...
    any ideas?
    d
    • 2
    • 4
  • r

    rkeazor

    06/21/2022, 1:46 AM
    So crazy question: When they say Kmm is going to Beta, are they referring to the IDE plugin alone? Or are KMP Library framework also including within the same versioning
    b
    • 2
    • 1
  • s

    Sam

    06/21/2022, 10:35 AM
    Anyone used this library and have any thoughts? https://github.com/icerockdev/moko-resources
    🔥 1
    m
    w
    v
    • 4
    • 8
  • c

    coolcat

    06/21/2022, 1:42 PM
    Does anybody have a preferred way of synchronising configuration values for app flavors between Android and iOS? I guess I’m looking for something similar to this utility for React Native: https://github.com/luggit/react-native-config
    m
    • 2
    • 2
  • m

    Marco Righini

    06/21/2022, 2:28 PM
    Building a fat xcframework takes a considerable amount of time, is it possible to parallelize it? (e.g build device, simulator and simulator m1 in parallel and merge then in a single framework)
    m
    • 2
    • 1
  • m

    Matthias Geisler

    06/21/2022, 8:14 PM
    New Version of KMock is out: https://github.com/bitPogo/kmock/releases
  • m

    Matthias Geisler

    06/21/2022, 8:14 PM
    And KFixture https://github.com/bitPogo/kfixture
  • a

    An Tran

    06/22/2022, 3:30 AM
    hi guys, how can we test web app locally with remote dependency, for example, in case android we have
    aar
    file
  • c

    colintheshots

    06/22/2022, 6:46 PM
    Hmm, why can’t we upgrade the Kotlin plugin independently of the Android Studio version? I’m having issues where the Kotlin Multiplatform Plugin requires a certain version of IDE and Kotlin plugin. So the newest Android Studio Electric Eel canaries won’t run the KMM plugin. It looks like this guy is having the same issue: https://youtrack.jetbrains.com/issue/KTIJ-22063/
    💯 2
  • s

    Shervin

    06/22/2022, 8:18 PM
    Hey everyone! I have a question about multi-module structure in kotlin-multiplatform. I have a few kotlin modules which I am adding to my
    shared
    module as “api”, how ever I’m not able to access them from Xcode. I am adding
    kotlin("multiplatform")
    and also:
    kotlin {
        jvm()
        iosX64()
        ios() 
    }
    to the target module which I want to have access from Xcode. I can verify that the
    shared
    module can be imported in Xcode, but not the modules that it depends on. Any idea what might be the issue? Thanks in advance
    m
    • 2
    • 4
  • d

    darkmoon_uk

    06/23/2022, 5:06 AM
    ❓ Keen to hear anyone's experiences of supporting multiple Android 'platforms' with Kotlin Multiplatform I have a need to support iOS and Android (via KMM 👍), while I also need to have two major Android variants based on the hardware I will be deploying on... Conceptually this could be supported with multiple
    android(...)
    platform entries in the
    multiplatform
    plugin, but have heard this is unsupported or problematic at the moment. Is it recommended to use Androids own flavour/dimensions instead? Does this Android feature play nicely with
    multiplatform
    source folders?
    v
    m
    • 3
    • 5
  • a

    andylamax

    06/23/2022, 10:09 AM
    What version of IJ are y'all using for kotlin multiplatform?? Ever since I migrated to kotlin 1.7.0, all my gradle scripts are red, and the IDE fails to import some identifiers sometimes even from the stdlib. Building in terminal works just fine. Anyone with some insights?
    m
    v
    a
    • 4
    • 9
  • t

    timkranen

    06/23/2022, 1:07 PM
    Hey everyone. How are you guys exposing ViewState in iOS? Normally, in pure android/kotlin I would so something to the likes of this:
    sealed class ViewState<T> {
    object Loading<T> : ViewState()
    class Success<T>(val data: T) : ViewState()
    class Failure<T>(val error: Throwable): ViewState()
    }
    But since sealed classes don’t play nice in iOS, I’m wondering what approach you guys are taking?
    m
    m
    • 3
    • 3
  • m

    Michael Paus

    06/23/2022, 3:20 PM
    Is there already any multiplatform solution to show a location on an external map. Something that you would do in Android via https://developers.google.com/maps/documentation/urls/android-intents
    a
    • 2
    • 21
  • k

    krzysztof

    06/24/2022, 8:32 AM
    How to set which iOS simulator to use for tests? I don’t have
    iPhone 12
    in my simulator list and
    iosX64Test
    task fails with
    Invalid device: iPhone 12
    java.lang.IllegalStateException: command '/usr/bin/xcrun' exited with errors (exit code: 148)
    m
    m
    l
    • 4
    • 6
  • m

    Mendess

    06/24/2022, 10:18 AM
    I added this to build.gradle.kts. But I can't find how to make the tests run in CI, using github actions. Anyone have an example?
    b
    • 2
    • 2
  • i

    Igal Avraham

    06/24/2022, 12:10 PM
    Hello 👋
  • i

    Igal Avraham

    06/24/2022, 12:12 PM
    Is there a right way to add a cocoapods dependency which is swift only (no module.map) and it depends on iOS frameworks… currently I am at dead end 🤷
    👍 1
    l
    • 2
    • 2
  • u

    Umberto Pompei

    06/24/2022, 3:32 PM
    Hello, I am looking for some help on iOS Release framework generation. If I try to run packForXcode in Debug Mode I can build framework successfully but as soon as I switch to Release Mode I get an exception and build fails, here s stacktrace of exception and iOS target configuration. Can’t figure out what’s wrong. I am on kotlin 1.4.32
    d
    • 2
    • 1
  • l

    Landry Norris

    06/24/2022, 9:30 PM
    Is it just me, or did the GitHub Package Registry quit randomly returning 409 Conflicts when publishing Kotlin Multiplatform projects?
    • 1
    • 1
  • b

    Brian Estrada

    06/25/2022, 2:27 PM
    Has anyone had any luck running SQL delight with Kotlin 1.7.0?
    t
    m
    k
    • 4
    • 3
  • m

    Matti MK

    06/27/2022, 7:30 AM
    I’m looking to use
    PropertyListEncoder
    https://developer.apple.com/documentation/foundation/propertylistencoder in my shared module, in the
    iosApp
    sourceset. It appears that it’s not included, or at least I cannot import it. Should it be available?
    t
    • 2
    • 3
  • m

    Michal Klimczak

    06/27/2022, 12:33 PM
    there has to be a better way of matching all apple targets?
    project.extensions.getByType<KotlinMultiplatformExtension>().sourceSets
                .matching {
                    it.name.contains("ios")
                            || it.name.contains("macos")
                            || it.name.contains("watchos")
                            || it.name.contains("tvos")
                }.configureEach { ...
  • m

    Mendess

    06/27/2022, 1:25 PM
    My android artifacts get published with a
    -android
    suffix and this ruins the build system. For example I have
    my-module-core
    and
    my-module-foo
    that depends on core, these get published under
    com.example:my-module-foo-android:1.0.0
    . Which would be fine but when I try to pull this artifact in an android app I get this error:
    Could not find 'com.example:my-module-core:1.0.0'
    , this I guess means that
    my-module-foo-android
    is expecting something without the suffix
    m
    • 2
    • 22
  • c

    Chris NL

    06/27/2022, 4:11 PM
    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?
    p
    • 2
    • 1
  • n

    Nicolas Verinaud

    06/27/2022, 7:41 PM
    [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 ?
    :plus1: 1
    a
    • 2
    • 19
  • a

    An Tran

    06/28/2022, 2:34 AM
    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
    j
    • 2
    • 4
  • h

    healthsgood

    06/28/2022, 3:33 AM
    when will kotlin multiplatform go to beta version?
    a
    i
    • 3
    • 4
  • j

    Jeff Lockhart

    06/28/2022, 4:56 AM
    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.
    e
    • 2
    • 2
  • s

    smallufo

    06/28/2022, 4:58 AM
    Hi , I wonder if there is a plan for multiplatform
    Locale
    class ?
    👍 4
Powered by Linen
Title
s

smallufo

06/28/2022, 4:58 AM
Hi , I wonder if there is a plan for multiplatform
Locale
class ?
👍 4
View count: 5