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

    kpgalligan

    11/02/2020, 1:37 PM
    I am kind of stuck on iOS packaging options and am looking for some help. The goal is to build static frameworks that can be published with cocoapods, but also possibly other options in the future. I've tried the following configurations (a thread):
    g
    d
    • 3
    • 10
  • v

    v79

    11/02/2020, 6:20 PM
    With a huge amount of thanks to @Marcin Wisniowski and @Big Chungus I've got a Kotlin Native application running on the Pi, using a Linux shared library. And that's cross-compiled from Windows X86 to Linux ARM32Hfp for my Raspberry Pi. And the mistake I had made? Windows can't follow a linux symbolic link, so it wasn't finding
    libcurl.so
    because the true library file was
    libcurl.so.4.5.0
    - just a naming problem.
    🎉 3
    m
    • 2
    • 1
  • l

    Leon K

    11/02/2020, 11:51 PM
    Hey folks! We're trying to see if we can write a Window manager with Kotlin/Native, but starting out with it, we're hitting some issues we cannot seem to figure out. this is working c code:
    xcb_connection = create_xcb_connection();
    xcb_setup = xcb_get_setup(xcb_connection);
    xcb_screen_iterator = xcb_setup_roots_iterator(xcb_setup);
    xcb_screen = xcb_screen_iterator.data;
    xcb_root = xcb_screen->root;
    and this is the kotlin counterpart to the c code above, but it unfortunately crashes with a null-pointer,
    import kotlinx.cinterop.*
    import xcb.*
    
    fun main() {
        val connection = xcb_connect(null, null)
        val xcb_setup = xcb_get_setup(connection)!!
        val xcb_screen_iterator = xcb_setup_roots_iterator(xcb_setup)
    
        // val xcb_screen = xcb_screen_iterator.placeTo(scope).pointed.data!!
    
        // This !! crashes, indicating that the data value here is null. in the equivalent C code shown above, 
        // This exact same value is _not_ null however, which makes us think
        // that we are wrongly using the Kotlin/Native C interop somehow.
        val xcb_screen = xcb_screen_iterator.useContents { data }!!
    
        val xcb_root = xcb_screen.pointed.root
        
        println("okidoki")
    }
    As described in the comment, we're getting a null value on
    xcb_screen_iterator.useContents { data }
    , which - as far as we understand - should be equivalent to the C code given above, which does work. Any help would be appreciated. LIkely, we're just failing to understand how to use kotlin native's C interop
    n
    • 2
    • 4
  • a

    Arnaud Vallat

    11/03/2020, 12:17 AM
    Hi, I'm building a library in Kotlin Multiplatform and Kotlin Native that targets different platform including linuxArm32Hfp. The code I have on the linux side that interacts with the shared kotlin library code is in C++. Is there a way to change the projection to C++ instead of C? I found it extremely verbose to allocate objects and call their methods. I couldn't find something in the documentation about that, so curious. Thank you
    n
    d
    • 3
    • 3
  • e

    Elias

    11/04/2020, 11:55 AM
    Hi there. I have been looking at compiling a native project for linux arm32 v7 but are struggling to get my binary to run. I have attempted to compile down to linuxArm32Hfp. The code is for now an simple auto generated Hello World program that runs fine on my computer when compiled to mac. This is configured in a build.gradle.kts file. If it needs to be done elsewhere to get more control that should note be an issue. The unit in question has the following processor and linux version, in case I have misconstrued what the target is. • Linux version 3.12.10+ (root@localhost) (gcc version 4.9.3 (GCC) ) #1 custom • Model name: ARMv7 Processor rev 2 (v7l) • Features : swp half fastmult vfp edsp neon vfpv3 tls vfpd32 We are currently running a golang binary on the unit, that is compiled with the following parameters. • GOOS=linux GOARCH=arm GOARM=7 Thanks in advance for any help!
    n
    j
    • 3
    • 18
  • p

    phisch

    11/04/2020, 2:43 PM
    How do you guys test your kotlin native code (ideally multiplatform). Do you just add another target jvm to get junit integration in IDEA, or how is your workflow? I have no idea how to set this up properly to be able to generate test from within IDEA etc.
    k
    t
    • 3
    • 27
  • a

    Arnaud Vallat

    11/04/2020, 5:01 PM
    Hi, is there a way to have data classes being projected better as a C struct without a function pointer for each member to access its data?
    ➕ 1
    🤔 1
    r
    • 2
    • 3
  • v

    Vinod Rai

    11/05/2020, 8:53 AM
    Hey! I am getting while compileKotlinIos. Can anyone pls tell me how to rectify this issue I am not available to get the root cause earlier it was working fine.
    2020-11-05T14:06:50.543+0530 [ERROR] [system.err] e: Compilation failed: null
    * Compiler version info: Konan: 1.4.10 / Kotlin: 1.4.10
    2020-11-05T14:06:50.543+0530 [ERROR] [system.err]  * Output kind: LIBRARY
    2020-11-05T14:06:50.543+0530 [ERROR] [system.err]
    2020-11-05T14:06:50.544+0530 [ERROR] [system.err] e: java.lang.StackOverflowError
    2020-11-05T14:06:50.544+0530 [ERROR] [system.err] 	at org.jetbrains.kotlin.psi2ir.generators.IrSyntheticDeclarationGenerator.visitCall(IrSyntheticDeclarationGenerator.kt:17)
    2020-11-05T14:06:50.544+0530 [ERROR] [system.err] 	at org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl.accept(IrCallImpl.kt:78)
    2020-11-05T14:06:50.544+0530 [ERROR] [system.err] 	at org.jetbrains.kotlin.ir.expressions.impl.IrMemberAccessExpressionBase.acceptChildren(IrMemberAccessExpressionBase.kt:57)
    2020-11-05T14:06:50.544+0530 [ERROR] [system.err] 	at org.jetbrains.kotlin.ir.expressions.impl.IrCallWithIndexedArgumentsBase.acceptChildren(IrCallWithIndexedArgumentsBase.kt:63)
    2020-11-05T14:06:50.544+0530 [ERROR] [system.err] 	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoidKt.acceptChildrenVoid(IrElementVisitorVoid.kt:275)
    a
    • 2
    • 2
  • w

    william

    11/06/2020, 12:08 AM
    can anyone help me understand how atomicfu library works? what does it do under the hood that allows you to mutate something wrapped with
    atomic(...)
    ? i understand that the object in
    atomic
    is frozen, but its unclear to me why it can be mutated. (also what does
    fu
    stand for / mean?)
    e
    • 2
    • 2
  • j

    Jamie Craane

    11/06/2020, 8:54 AM
    I have some problems setting up a dependency in a KMM project from a jvmmodule to the shared code. In short, the attached image shows what I want to do. The jvmmodule has a class called Test with a main method which uses code from the shared module. I tried several solutions, none which are 100% working: 1. (https://github.com/jcraane/kmm-with-jvmmodule/tree/jvm-kotlin-lib) jvmmodule is configured as a regular kotlin jvm module which also has the application plugin enabled for testing purposes. The module has a project dependency on the shared module. When the Test class is ran using the ./gradlew :jvmmodule:run command everything works as expected. The output in the console should be ‘Hello from JVM’. In IntelliJ or Android Studio the Greeting class in Test.kt cannot be found (not in the editor, compile error) and not at runtime. When running the classes from the gutter icon the following error occurs:
    Caused by: java.lang.ClassNotFoundException: Greeting
       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
       ... 1 more
    2. (https://github.com/jcraane/kmm-with-jvmmodule/tree/jvm-mp-lib) (inspired by kotlinconf app) jvmmodule is configured as a multiplatform module with a single jvm target and a project dependency on the shared module. In this scenario code completion works in IntelliJ but when the Test class is run from the gutter icon the following error occurs:
    Error: Could not find or load main class TestKt
    Caused by: java.lang.ClassNotFoundException: TestKt
    Is this the correct way of using shared code from a plain kotlin (kvm) module?
    a
    • 2
    • 4
  • v

    v79

    11/07/2020, 8:58 AM
    I'm having trouble using a cinteropt enum in my Kotlin code. Given the following C header:
    typedef enum
    {
        BCM2835_GPIO_FSEL_INPT  = 0x00,
    ...
    } bcm2835FunctionSelect;
    I have added this as a strictEnum to `libbcm.def`:
    strictEnums = bcm2835FunctionSelect
    Then when I try to use it in Kotlin code, there are two issues. Firstly, I have to use it rather verbosely:
    bcm2835_gpio_fsel(pin, bcm2835FunctionSelect.BCM2835_GPIO_FSEL_INPT.value.toUByte());
    And secondly it doesn't compile, with the following error:
    e: kotlin.UninitializedPropertyAccessException: Parent not initialized: org.jetbrains.kotlin.ir.declarations.impl.IrEnumEntryImpl@31d85176
            at org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.getParent(IrDeclarationBase.kt:39)
            at org.jetbrains.kotlin.ir.util.IrUtilsKt.getParentAsClass(IrUtils.kt:286)
            at org.jetbrains.kotlin.backend.konan.ir.interop.cenum.CEnumCompanionGenerator.generateAliasGetterBody(CEnumCompanionGenerator.kt:84)
    It looks like I've found a bug, but maybe I'm doing something wrong?
    d
    n
    +2
    • 5
    • 12
  • t

    tieskedh

    11/08/2020, 5:42 PM
    Hello everyone, I'm very new to Kotlin native and I know almost nothing about iOS-development. I'm trying refactor an existing IOS-app which uses pods. I use JWTDecode as POD dependency. The idea autocompletion etc. works. When I build the code for an emulator, it fails on JWTDecodeIos. The error I get is:
    (1,9) Module JWTDecode not found.
    The project has objc-attributes added: https://github.com/auth0/JWTDecode.swift/pull/55 The top-level pod uses:
    use_frameworks!
    (It also has the JWTDecode-dependency...) I do have:
    // Revert to just ios() when gradle plugin can properly resolve it
    val onPhone = System.getenv("SDK_NAME")?.startsWith("iphoneos") ?: false
    if (onPhone) {
        iosArm64("ios")
    } else {
        iosX64("ios")
    }
    which maybe explains the difference? But removing the if and trying first one and then the other also didn't seem to work. Can anyone help me?
    g
    • 2
    • 4
  • n

    Nikky

    11/10/2020, 12:31 AM
    if i recall correctly one could have a shared sourcset for all native targets, how can i configure that ?
    a
    • 2
    • 1
  • k

    KamilH

    11/10/2020, 1:14 PM
    In my multiplatform project I created a simple structure to implement DI manually, main part of it are
    Provider<T>
    interface and
    Singleton<T>
    abstract class (code in thread). It works very well, however when I’m testing it on iOS I’m keep getting
    Uncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen
    when trying to
    get()
    on
    Singleton
    . How can I fix it without using
    object
    and
    ThreadLocal
    ?
    t
    • 2
    • 5
  • m

    max.cruz

    11/11/2020, 1:18 AM
    Hi. I’m updating an Android/iOS multiplatform project to 1.4, but I’m having a hard time understanding the changes in coroutines and concurrency. Running a code like this:
    val scope = CoroutineScope(Dispatchers.Main + SupervisorJob())
    ...
    scope.launch {
    	val something = withContext(Dispatchers.Default) { suspendCall() }
    	println(something)
    }
    Works fine in Andorid but in iOS I get:
    Uncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared <object>@3faca88 from other thread
    k
    • 2
    • 4
  • d

    Daniel Gruber

    11/13/2020, 9:38 AM
    Hi there :) we‘re currently developing a Kotlin native app for Windows and want to use Coroutines. As it seems we need to add some kind of Runloop with yield in order to keep them running, does someone know a better idea? Thanks a lot!
    g
    t
    • 3
    • 10
  • v

    v79

    11/13/2020, 3:19 PM
    Linking in Kotlin native is the big, slow part, isn't it? I tried a gradle build on my Raspberry Pi, and Gradle wanted 3Gb of RAM to do the linking! Back on my Win PC, I've got a single large Kotlin enum with a bytestream (about 83kb) and linking my otherwise small project now takes about 2 or 3 minutes 😞.
    🤞 2
    b
    n
    • 3
    • 10
  • v

    Vaclav Hodek

    11/14/2020, 12:54 PM
    Does anyone have a problem running a native app built with Kotlin for macOS on Big Sur? It works great on all other macOS versions except for Big Sur. Right after the launch, the app is closed with seg fault.
    👀 1
    s
    • 2
    • 2
  • s

    SBNTT

    11/16/2020, 12:03 AM
    I tried to publish a mpp library using the 1.4.20-RC kotlin version No metadata module was published, so consumer project doesn't have autocomplete in common module How do i bring back the metadata module ?
    l
    • 2
    • 17
  • a

    Alexander Black

    11/17/2020, 6:57 PM
    Hello all, I’m trying to write a file download method using Ktor on a native/mpp app. I hope this is the place to ask this… if not please direct me to the right channel. here’s my method so far:
    suspend fun HttpClient.downloadFile(
        output: File,
        downloadUrl: Url,
        md5Hash: String
    ): Flow<DownloadResult> {
        return flow {
            try {
                val response = get<HttpResponse> { url(downloadUrl) }
                val data = ByteArray(response.contentLength()?.toInt() ?: 0)
                var offset = 0
                do {
                    val progress = (offset.toDouble() / data.size) * 100
                    emit(DownloadResult.Progress(progress))
                    val currentRead = response.content.readAvailable(data, offset, data.size)
                    offset += currentRead
                } while (currentRead > 0)
    
                if (response.status.isSuccess()) {
                    if (data.md5().hex == md5Hash) {
                        output.write(data)
                        emit(DownloadResult.Success)
                    } else {
                        emit(DownloadResult.ErrorCorruptFile)
                    }
                } else {
                    emit(DownloadResult.ErrorBadResponseCode(response.status.value))
                }
            } catch (e: TimeoutCancellationException) {
                emit(DownloadResult.ErrorRequestTimeout("Connection timed out", e))
            } catch (t: Throwable) {
                emit(DownloadResult.Error("Failed to connect", t))
            }
        }
    }
    The problem is that the
    response.content.readAvailable()
    method always seems to read the whole file at once without chunking it up, which means my progress emission only gets outputted once. I’m wondering if there’s something I’m doing wrong here? or if that’s normal behaviour? Also as a side note the file I’m testing on is 25MB so it should emit a few times I’d think.
    j
    • 2
    • 2
  • a

    Alexander Black

    11/18/2020, 5:26 PM
    I’m trying to build a simple objective c library from it’s original source and generate bindings for it... I got the bindings to build, but when I try to build my app on the iOS simulator I get this message:
    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_Reachability", referenced from:
          objc-class-ref in result.o
    ld: symbol(s) not found for architecture x86_64
    I’m thinking it has something to do with building from a .m and .h file and it not being a dynamic library, so the binaries are not included, but I’m not sure how to include them here’s my def in my build.gradle.kts:
    iosX64("ios") {
                compilations.getByName("main") {
                    val reachabilityInterop by cinterops.creating {
                        defFile(project.file("src/nativeInterop/Reachability.def"))
                        val headerPath = project.file("src/nativeInterop/Reachability/").absoluteFile
                        compilerOpts("-I${headerPath}", "-L${headerPath}")
                    }
                }
            }
    k
    • 2
    • 3
  • v

    v79

    11/19/2020, 7:25 AM
    Well, adding one 40-line kotlin file, and one 4kb C-library, increased compilation times of this project https://github.com/v79/WaveShareTests/tree/libbmp from about 3.5minutes to 1 hour 40 minutes.
    👀 2
    a
    m
    +4
    • 7
    • 21
  • a

    aleksey.tomin

    11/20/2020, 10:28 AM
    I make macOS application. For some reason (maybe coroutines bug) I’ve replace _`app.run()` (_app = NSApplication.sharedApplication) to
    app.finishLaunching()
    while (active.value) {
        app.nextEventMatchingMask(NSEventMaskAny, null, NSDefaultRunLoopMode, true)?.let {
            app.sendEvent(it)
        }
        runBlocking {
            delay(100.milliseconds)
        }
    }
    But now hotkeys (cmd+Q) and window’s button
    close
    don’t work. How can I process this events manually in macOS code? In main cycle? In Controller? In some
    NSWindow
    field?
    j
    • 2
    • 12
  • a

    Animesh Sahu

    11/20/2020, 5:07 PM
    Will K/N support C++ interop in future (not soon but some day)?
    👀 3
    d
    g
    +5
    • 8
    • 8
  • b

    benny.huo

    11/23/2020, 8:05 AM
    How to compile a shared library on Linux? I tried but got a ld error.
    a
    • 2
    • 9
  • d

    dambakk

    11/23/2020, 8:47 AM
    Hi! We use our common module for communicating with an API and, as everyone else, use a sealed class for the response:
    sealed class Response<out T : Any> {
        data class Success<out T : Any>(val data: T) : Response<T>()
        data class Error(val reason: ErrorReason) : Response<Nothing>()
    }
    Receiving success in ios is ok. However, we are not able to cast the result to an
    Response.Error
    . When printing the object to console (
    (lldb) e dump(response)
    ) we can see that it is an
    Optional(Error)
    object with all the params we are looking for, but we cannot cast it to en Error in any way. Anyone knows what we have to do?
    l
    • 2
    • 10
  • a

    Alex Gladkov

    11/23/2020, 11:50 AM
    Hello, everyone. Has anyone worked with Keychain in Kotlin Native? We need to read from keychain from iosMain. I've seen Kissme library, but we can't use it
    d
    • 2
    • 5
  • m

    Michal Klimczak

    11/23/2020, 12:25 PM
    I'm completely new to kotlin-native. Trying to use it for multiplatform mobile and when I set up
    ktor
    I get an error (i have narrowed it down to an issue with initializing ktor
    serializer)
    . Not specifically asking about the serializer issue right now, but tell me - is this how the error reports are supposed to look (local build, local simulator), or do I need to somehow symbolicate the debug builds as well? It seems that everyone talks about symbolication of kotlin-native reports in crashlytics in release builds, no one mentions how it works during development.
    a
    • 2
    • 7
  • o

    Oleg Yukhnevich

    11/23/2020, 1:18 PM
    Hey, does anyone tried to profile K/N using some interactive tool like IDEA async profiler for JVM? So I need, not to benchmark, but find places, which are consuming CPU. I know, CLion has profiler, may be it's possible to somehow attach it to executable produce by K/N compiler?
    e
    • 2
    • 1
  • s

    steelahhh

    11/24/2020, 2:48 PM
    Hi, I'm getting
    Symbol with IrSimpleFunctionSymbolImpl is unbound
    when running
    linkDebugFrameworkIos(Arm64, X64)
    After some investigation, it turned out that the piece of code causing this exception is this:
    lateinit var property: String
        private set
    Without
    private set
    it builds just fine. Is it a known issue?
    a
    • 2
    • 3
Powered by Linen
Title
s

steelahhh

11/24/2020, 2:48 PM
Hi, I'm getting
Symbol with IrSimpleFunctionSymbolImpl is unbound
when running
linkDebugFrameworkIos(Arm64, X64)
After some investigation, it turned out that the piece of code causing this exception is this:
lateinit var property: String
    private set
Without
private set
it builds just fine. Is it a known issue?
That was on 1.4.10, and just checked on 1.4.20, and it gives this exception instead:
Compilation failed: Unbound symbols not allowed
        Unbound private symbol org.jetbrains.kotlin.ir.symbols.impl.IrSimpleFunctionSymbolImpl@7b19a323
a

Artyom Degtyarev [JB]

11/25/2020, 8:28 AM
Hello, @steelahhh! This seems to be a bug, please report it at kotl.in/issue with a minimal project to reproduce, if possible.
s

steelahhh

11/26/2020, 6:33 AM
@Artyom Degtyarev [JB] Got it, here is the issue https://youtrack.jetbrains.com/issue/KT-43599
View count: 2