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
kotlin-native
  • a

    Alexander von Below

    08/27/2020, 8:13 AM
    Hello everyone! Is there anyone currently working on
    KonanTarget.MACOS_ARM64
    ?
    👀 4
    k
    l
    +1
    6 replies · 4 participants
  • r

    rocketraman

    08/27/2020, 1:24 PM
    I know in the past the answer to this was "no", but in the latest updates of Kotlin Native, is it possible to create iOS applications on Linux rather than a Mac?
    k
    m
    +4
    22 replies · 7 participants
  • s

    Sam Garfinkel

    08/27/2020, 5:53 PM
    What’s the current status of multi-threaded coroutines on K/N? Are there
    async
    and
    launch
    implementations? Doesn’t seem to be available in
    common
    k
    r
    +3
    6 replies · 6 participants
  • s

    ShawnV

    08/28/2020, 1:32 AM
    Hello, I’m trying to do a kotlin multiplatform app, and I’m using ktor for network calls, but when I do a network call that fails on iOS, it crashes the app. The stack trace says that I should add the @Throws annotation I tried to add it as described here https://github.com/JetBrains/kotlin-native/issues/2122 and when I try to add it it as shown here
    actual typealias Throws = kotlin.native.Throws
    and try to compile it gives me this error
    Right-hand side of actual type alias should be a class, not another type alias
    a
    b
    +1
    6 replies · 4 participants
  • t

    timo

    08/28/2020, 11:58 AM
    Hello, I’m trying to make a POC of kotline native and I would like to use Ktor to do a simple http call, but I’m wondering if it will be possible to use ktor on linux arm64 arch
    👀 2
    a
    2 replies · 2 participants
  • u

    ursus

    08/30/2020, 2:28 AM
    Naive question, why is expect+actual a thing? Why not just interface+override?
    g
    1 reply · 2 participants
  • u

    ursus

    08/30/2020, 2:30 AM
    Also, I want to start to get my feet wet, however I dont have a mac. Should I start with JS as the other platform? Or windows maybe?
    g
    1 reply · 2 participants
  • h

    Hyun

    08/31/2020, 12:15 AM
    Hi, I’m trying CocoaPods integration I have done the below step • Add a dependency between a Kotlin Pod and Xcode project with one target and Xcode recognize kotlin multiplatform module’s pod. but, when I build xcode project, the attached error occurs. I’m new on ios development. so, I don’t know from where I have to start to solve the error. my project contains the below • android Jetpack compose • multiplatform module use multipltform library, • Ktor, Ktor client • Sqldelight • coroutine mt kindly let me know if further information required🙏🙏🙏
    Untitled
    k
    4 replies · 2 participants
  • t

    timo

    08/31/2020, 8:22 AM
    👋 is here a plan to build coroutine for linuxArm64 ?
    a
    n
    3 replies · 3 participants
  • a

    arnis71

    08/31/2020, 4:01 PM
    Hello, I'm new to KN an I am trying to make my Multiplatform project run on iOS but I can't get it to work. I need to use the function from external library that takes callback in a form of lambda. When this lambda gets invoked it passes data object that I later want to set to
    StateFlow
    . The problem is that this lambda gets called on some other thread so I have to freeze it. But when I freeze it the data objects also gets frozen and in turn it freezes the
    StateFlow
    and then it crashes with mutability exception. Is it even possible to do what I described with current KN memory model? Any help would be appreciated, thanks!
    m
    k
    17 replies · 3 participants
  • f

    Fabian Landis

    09/01/2020, 12:17 AM
    Hi, I am looking at using grpc (client) on a kotlin-native project (targets linuxX64 and linuxArm32Hpf at the moment). Any examples and library recommendations would be great. Or is it better to stick to kotlin jvm and use something like graalvm?
    k
    1 reply · 2 participants
  • k

    Kris Wong

    09/01/2020, 3:00 PM
    I accidentally updated ktor to 1.4 in a project using kotlin 1.3.72 and it works. I would have expected it to fail due to K/N. are the 2 compatible?
    2 replies · 1 participant
  • a

    aleksey.tomin

    09/02/2020, 10:57 AM
    Has anyone submitted an application to AppStope? iOS or OSX.
    t
    t
    +3
    6 replies · 6 participants
  • a

    aleksey.tomin

    09/02/2020, 1:55 PM
    Why kotlin-native API in macOS doesn’t contains
    ATTrackingManager
    https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager ?
    s
    6 replies · 2 participants
  • n

    natario1

    09/02/2020, 8:02 PM
    Has anyone moved to
    mimalloc
    ? Any negative/positive comments?
    s
    1 reply · 2 participants
  • s

    Skolson5903

    09/03/2020, 12:10 AM
    Hopefully quick question, as I am new to Native - given a C function returning "unsigned char *", cinterop stub returns CPointer<UByteVar> which makes sense. And the pointer this function is returning points to a string of UTF-8 bytes. But it looks like there is no toKString() for UByteArray in stdlib, correct? If so, what's the correct way to recast this so toKString is usable? Thanks in advance for any tips
    b
    11 replies · 2 participants
  • f

    fengsheng

    09/04/2020, 2:15 PM
    Hi, I use
    getStackTraceAddresses
    to creat crash report in my iOS application. When I use debug build I can got a detailed report. But when I use release build, I just got some address in iOS no share code address. Any idea?
    k
    12 replies · 2 participants
  • a

    agrosner

    09/04/2020, 7:18 PM
    Anyone know why this would happen on Desktop and ios x64. (kotlin 1.4) Desktop is pointing to macosx64:
    > Task :lib:compileTestKotlinDesktop FAILED
    w: duplicate library name: org.jetbrains.kotlinx:kotlinx-coroutines-core
    e: Compilation failed: IrPropertyPublicSymbolImpl for public **.api/httpClient|-3923667219442095515[0] is already bound: PROPERTY name:httpClient visibility:internal modality:FINAL [val]
    
     * Source files: Client.kt, Auth.kt, AuthApi.kt, Location.kt, LocationsApi.kt, Movie.kt, MoviesApi.kt
     * Compiler version info: Konan: 1.4 / Kotlin: 1.4.0
     * Output kind: LIBRARY
    
    e: java.lang.IllegalStateException: IrPropertyPublicSymbolImpl for public **.api/httpClient|-3923667219442095515[0] is already bound: PROPERTY name:httpClient visibility:internal modality:FINAL [val]
            at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.bind(IrPublicSymbolBase.kt:49)
            at org.jetbrains.kotlin.ir.declarations.impl.IrPropertyImpl.<init>(IrPropertyImpl.kt:215)
            at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer$deserializeIrProperty$$inlined$withDeserializedIrDeclarationBase$lambda$1.invoke(IrFileDeserializer.kt:1327)
    2 replies · 1 participant
  • h

    Hyun

    09/05/2020, 2:43 AM
    Hi, guys. I’m trying to use cocoapod library on multiplatform library There are - ios library on Xcode - multiplatform library : depends on ios library - multiplatform module : depends on multiplatform library - ios project on Xcode : depends on multiplatform module by cocoapod it’s success to build the multiplatform library with cocoapod library but when I build ios project on Xcode, build failed. is it available to use cocoapod on multiplatform library?
    i
    8 replies · 2 participants
  • f

    frankelot

    09/06/2020, 1:06 AM
    I generated the kotlin bindings using the
    cinterop
    tool, but when running the application, I get
    Undefined symbols for architecture x86_64:
    which is pretty much what I was expecting
    2 replies · 1 participant
  • v

    Vsevolod Ganin

    09/07/2020, 1:15 PM
    Hi! I have a generic interface
    interface GenericInterface<T> {
        fun add(value: T)
    }
    and I have an abstract class which inherits from this interface
    abstract class ConcreteClass : GenericInterface<DataClass>
    and I want to implement
    ConcreteClass
    in Swift. Unfortunately the type information about
    DataClass
    is lost in interop code. Is there a way to workaround this?
    1 reply · 1 participant
  • m

    Martin Gagnon

    09/08/2020, 4:30 PM
    Does anybody understand why this crash on X64/ARM64 ?
    open class IOSSerialDispatchQueue(identifier: String) : DispatchQueue {
        private val serialQueue = dispatch_queue_create(
            "com.mirego.trikot.foundation.serial_dispatch_queue.$identifier",
            dispatch_queue_serial_t()
        )
    
        override fun isSerial() = true
    
        override fun dispatch(block: DispatchBlock) {
            freeze(block)
    
            dispatch_async(serialQueue, freeze {
                runQueueTask(block)
            })
        }
    
        private fun runQueueTask(block: DispatchBlock) {
            block()
        }
    }
    The crash happens in class initialization at line
    dispatch_queue_create("...", dispatch_queue_serial_t())
    . I can reproduce with the following swift code
    let _ = IOSSerialDispatchQueue(identifier: "None")
    in my AppDelegate.swift file . The crash is
    EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    (Kotlin 1.4)
    s
    1 reply · 2 participants
  • h

    Hanzhen

    09/09/2020, 3:07 PM
    Anyone have same issue?
    1 reply · 1 participant
  • a

    agta1991

    09/10/2020, 8:43 AM
    Hi! Is there someone who have experience with cocoapods plugin and running tests targeting the iOS target. It seem like the linker can't see the imported frameworks when generating the test executable. Does anyone have the same issue?
    a
    3 replies · 2 participants
  • b

    basher

    09/11/2020, 3:04 PM
    Are there any notable changes to how StableRef works in Kotlin 1.4? We had some assumptions we made about what StableRef.asCPointer() means in Kotlin 1.3.x, which seem to have changed in 1.4
    k
    8 replies · 2 participants
  • t

    tieskedh

    09/11/2020, 6:30 PM
    I have a question. I want to do a graduationship in a company which has developers for IPads but is lacking Android-developers. To reduce the problem, I want to reduce the Android-specific code or in other words use Kotlin Multiplatform. I don't have knowledge about IpadOs/IOS etc... My question is: Does Kotlin Native support IpadOs?
    k
    l
    4 replies · 3 participants
  • e

    Elka

    09/14/2020, 8:45 AM
    kotlinx-datetime crashes on arm32 iOS9. Any suggestion on how to solve it?
    s
    i
    8 replies · 3 participants
  • r

    ribesg

    09/14/2020, 2:48 PM
    I’m updating my project from 1.3.61 to 1.4.10 and something that worked no longer compiles:
    @ExportObjCClass
    class CandidateInfoUITableViewCell @OverrideInit constructor(
        style: UITableViewCellStyle = UITableViewCellStyle.UITableViewCellStyleDefault,
        reuseIdentifier: String? = null
    ) : UITableViewCell(style = style, reuseIdentifier = reuseIdentifier) {
        ...
    Error:
    ...CandidateInfoUITableViewCell.kt: (24, 5): constructor with @OverrideInit doesn't override any super class constructor.
    It must completely match by parameter names and types.
    I don’t understand. This compiled in 1.3.61 and the parameter names are the right type and names. IDEA doesn’t even show any error.
    1 reply · 1 participant
  • s

    Skolson5903

    09/14/2020, 6:33 PM
    Debugger question - I've been trying out the native debugger plugin in Idea Ultimate on windows and am hitting a number of bugs. I searched youtrack and am finding mentions of some stuff in native debugger on windows not supported, like debugging from a gradle build for example. Before I start filing defects I'd like to find out what is and is not supported for the windows flavor of the native debugger. Anybody know if this is documented somewhere? My searches are coming up empty. In the meantime I'm trying it out on the same project using an Ubuntu install, will see what defects pop up there compared to windows. Thanks in advance for any info...
    s
    1 reply · 2 participants
  • s

    Skolson5903

    09/14/2020, 6:42 PM
    Lol I hope so. Got my first project working but had to resort to printlns since breakpoints often don't work depending on the code, the variables display often is empty or displays useless ObjHeader * values, navigating the stack goes to the wrong source lines sometimes, I have a whole list :-)
    1 reply · 1 participant
Powered by Linen
Title
s

Skolson5903

09/14/2020, 6:42 PM
Lol I hope so. Got my first project working but had to resort to printlns since breakpoints often don't work depending on the code, the variables display often is empty or displays useless ObjHeader * values, navigating the stack goes to the wrong source lines sometimes, I have a whole list :-)
Lol sorry to cause trouble on main panel :-)
View count: 5