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
  • t

    tadej

    01/08/2019, 11:07 AM
    Hi all 👋 hope you're having a great Tuesday. I've recently given a few talks around Kotlin/Native. Many found them quite useful, so I've summarized the content into a set of tutorials, which you can find here: www.learnkotlinnative.com It'd be great to get some feedback/constructive criticism around the content or some pointers on how to improve it further. Many thanks!
    👍 2
    🎉 2
    a
    • 2
    • 2
  • a

    altavir

    01/08/2019, 11:45 AM
    I've got an unusual request. Kotlin native has a very good perspective. The problem for myself and large part of scientific community is that we have to work with C++ libraries. Kotlin-Native does not have automatic interop with C++ libraries and there are few good reasons for it. Still, does anyone have experience with wrapping C++ libraries? If it is possible, could someone write a tutorial?
    n
    r
    +2
    • 5
    • 12
  • t

    toomanyeduardos

    01/08/2019, 6:53 PM
    is there a way to consume Kotlin Native on iOS, without having to disable bitcode?
    o
    • 2
    • 3
  • b

    basher

    01/09/2019, 5:51 PM
    What type do people use to pass raw data back and forth between the K/N and iOS/Android?
    ByteArray
    ?
    o
    • 2
    • 2
  • m

    Matej Kormuth

    01/09/2019, 9:59 PM
    Why does
    Float
    and
    Double
    not have
    .SIZE_BYTES
    property when Int, Long and other primitives do?
    ☝️🏻 1
    e
    • 2
    • 1
  • b

    basher

    01/10/2019, 2:34 AM
    Made a podspec today that can run gradle to generate the ios framework and properly integrates it into our project
    PGFoundation_podspec.rb
    👍 7
    j
    a
    • 3
    • 25
  • a

    alexfacciorusso

    01/10/2019, 10:16 AM
    sorry to repeat the message I wrote to #multiplatform , but I hope someone here could help me: https://kotlinlang.slack.com/archives/C3PQML5NU/p1547114865149400
    t
    s
    o
    • 4
    • 11
  • y

    yuya_horita

    01/11/2019, 11:28 AM
    Thank you 🙏
    s
    • 2
    • 5
  • b

    basher

    01/11/2019, 11:20 PM
    Where's the best place to file K/N bugs? youtrack or GH?
    d
    • 2
    • 2
  • c

    Cyrille QUÉMIN

    01/12/2019, 6:17 PM
    Hi guys, I am using Kotlin multiplatform 1.3.11 and I am working on a android/iOS library. I have trouble with some of the crypto related functions on iOS. So far I manage to successfully use CCCrypt, CCCryptorCreate, CCCryptorUpdate and CCCryptorFinal. However when I try to use asymmetric encryption method such as SecKeyCreateRandomKey I got a signal 11: Segmentation fault. Worth mentioning that I am testing those methods via unit test witch launch an iOS simulator without UI. I read that some other people had issue with encryption method and Kotlin native so maybe these are related?? If any of you has an idea ? And also how is it best to debug ? Can I debug Kotlin native code? How can I have a stacktrace or something that will help me identifying the root cause. I know for sure that the call that fails is SecKeyCreateRandomKey regardless of all the parameters variations i tried I always get a segmentation fault.
    o
    • 2
    • 2
  • k

    kyonifer

    01/13/2019, 2:33 AM
    is there a way to add custom linker flags to a test binary in mpp projects? seems like
    linkerOpts
    inside the test
    KotlinNativeCompilation
    are ignored when it comes to linking the test debug executable.
    d
    i
    • 3
    • 8
  • a

    alec

    01/14/2019, 4:41 AM
    Anyone else see the IDE redownload a ton of pom/module files whenever you sync a project with K/N?
    :yes: 12
    d
    • 2
    • 5
  • a

    alec

    01/14/2019, 4:42 AM
    I think its a gradle metadata bug but its also kinda weird that K/N downloads so many binaries that I dont have any dependencies on
    👍 1
    p
    o
    • 3
    • 3
  • c

    coolcat

    01/14/2019, 4:01 PM
    Is it possible to implement SSL cert pinning using ktor on an iOS project?
    j
    j
    • 3
    • 2
  • n

    napperley

    01/14/2019, 8:21 PM
    Is there a sample Kotlin Native KLib project (not a Android/iOS one, preferably Linux) which uses the Kotlin Multiplatform plugin? Can generate a KLib for the library but cannot access the KLib dependency in the library itself.
    m
    o
    • 3
    • 6
  • w

    wollnyst

    01/15/2019, 8:02 AM
    Not 100% sure what you mean with "data stream", but there's
    ByteReadChannel
    and
    ByteWriteChannel
    in
    <http://kotlinx.coroutines.io|kotlinx.coroutines.io>
    , which might be what your're looking for.
    b
    • 2
    • 6
  • v

    Vinicius Carvalho

    01/15/2019, 2:51 PM
    Hi all, I'm starting a new knative project (I have previous kotlin-jvm) experience, and I need to manipulate files quite a bit, and noticed that those are dependent on platform using fopen, is there a plan to create a multiplatform abstraction around the File concept to be multiplatform as well?
    g
    o
    • 3
    • 11
  • v

    Vinicius Carvalho

    01/15/2019, 3:25 PM
    but I'm unable to import
    kotlinx.cli.*
    on my main Kt file
    s
    j
    • 3
    • 6
  • m

    Matej Kormuth

    01/15/2019, 10:10 PM
    Are there any supported profilers for Kotlin/Native on Windows? I tried http://www.codersnotes.com/sleepy/ but I cannot see the function names - only addresses.
    m
    o
    • 3
    • 3
  • a

    aaltergot

    01/16/2019, 5:24 PM
    Hi guys! Is there a way to produce iOS framework with both arm32 and arm64 architectures? I'm having hard time with app archive..
    b
    s
    • 3
    • 4
  • s

    spierce7

    01/16/2019, 8:55 PM
    Has anyone tried AppCode recently with Kotlin/native? I'm wondering what the state of integrating UI with Kotlin is now? When I checked it out a while back, it wasn't great and I was having to manually edit xcode files to get things to work. Is that still the case?
    a
    l
    • 3
    • 2
  • r

    raniejade

    01/17/2019, 10:29 AM
    Hi! I'm playing around with KN and hit this error:
    src/nativeMain/kotlin/godot/core/Vector2.kt:10:13: error: invocation of C function pointer with return type 'CValue<*>' is not supported yet
    Is it tracked somewhere? Tried searching in github and youtrack but with no luck.
    s
    • 2
    • 3
  • a

    alec

    01/17/2019, 10:31 PM
    https://twitter.com/Strongolopolis/status/1086022911016796161
    👍 6
    ❤️ 12
    a
    • 2
    • 3
  • s

    sdeleuze

    01/18/2019, 6:51 AM
    Has anybody tried to use Kotlin/Native with Rust librairie? Is it possible to use C interrop for that use case? I would be interested to combine both with Kotlin/Native for applications/business logic and Rust for high performance libraries like parsing etc. on server side.
    g
    • 2
    • 2
  • d

    Diego

    01/18/2019, 11:56 AM
    Hello! Quick question: protocols are imported in Kotlin as interfaces with Protocol name suffix, i.e.
    @protocol Foo -> interface FooProtocol
    . Why? I guess this is a question for the designers of Kotlin/Native but I’m just wondering what is the reason behind that. My opinion is that this is unnecessary and I would prefer this to be transparent and just use the interface with the original protocol name. I do not see why we should be aware about the fact that it comes from a framework.
    s
    • 2
    • 3
  • s

    sngrekov

    01/18/2019, 9:02 PM
    Hi! Let's say I have kotlin data class
    data class DataClassTest(val foo: String = "foo", val bar : Int = 1)
    So in kotlin code I can initialize it with default properties like
    DataClassTest(foo = "bar")
    But when I try to use it the same way in swift
    DataClassTest(foo : "bar")
    I get an error "Cannot invoke initializer for type 'DataClassTest' with an argument list of type '(foo: String)'" Am I missing something?
    r
    o
    +2
    • 5
    • 12
  • n

    napperley

    01/22/2019, 3:07 AM
    When a Kotlin Native library is published (via the publishToMavenLocal Gradle task) locally where are the artifacts stored❓ There is a publications directory with the following structure (has multiple module.json and pom-default.xml files): publications/ ├── kotlinMultiplatform │ ├── module.json │ └── pom-default.xml ├── linux │ ├── module.json │ └── pom-default.xml └── metadata ├── module.json └── pom-default.xml
    s
    m
    • 3
    • 7
  • n

    napperley

    01/22/2019, 4:49 AM
    Is there a "global" equivalent of memScoped?
    s
    o
    • 3
    • 7
  • n

    napperley

    01/22/2019, 5:56 AM
    I have encountered a puzzling issue where a InvalidMutabilityException is thrown when a function is invoked on a Object (not to be confused with a class object): ----------------------------------------------------- Uncaught exception from Kotlin's main: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen org.digieng.gobject_meta.NamespaceInfo@167e938 at ThrowInvalidMutabilityException (0x2406f9) at (0x24f4e6) at kfun:org.digieng.gobject_meta.NamespaceInfo.clearState#internal (0x258a00) at kfun:org.digieng.gobject_meta.NamespaceInfo.load(kotlin.String;kotlin.String) (0x256777) at Konan_start (0x21bac2) at Konan_run_start (0x21b870) at Konan_main (0x21b7a7) at __libc_start_main (0x7f15dd833f45) at (0x21b029) at ((nil)) -----------------------------------------------------
    o
    y
    k
    • 4
    • 7
  • j

    JoakimForslund

    01/22/2019, 9:17 AM
    Is it currently impossible to run a androidNative32/androidNative64 under the android emulator? I mean sure it seems logical because the arch targeted is ARM, but what to do if I need to test a native library in the emulator?
    s
    • 2
    • 9
Powered by Linen
Title
j

JoakimForslund

01/22/2019, 9:17 AM
Is it currently impossible to run a androidNative32/androidNative64 under the android emulator? I mean sure it seems logical because the arch targeted is ARM, but what to do if I need to test a native library in the emulator?
s

svyatoslav.scherbina

01/22/2019, 9:23 AM
It is possible (at least) using
adb
. See Android Native Activity sample README for an example: https://github.com/JetBrains/kotlin-native/blob/master/samples/androidNativeActivity/README.md
j

JoakimForslund

01/22/2019, 9:25 AM
Yeah.. I dont think that is what I'm after. However that link does state:
deploy the apk on the Android device or emulator (note that only ARM-based devices are currently supported).
Which does bring up the problem, later emulator devices runs intel arch
and not arm
s

svyatoslav.scherbina

01/22/2019, 9:27 AM
It must be possible to configure the emulator to emulate arm arch using AVD.
j

JoakimForslund

01/22/2019, 9:28 AM
You might be correct. I guess that should be enough for what i'm after
You can not do that for API 26-28 as of yet, but I think I'll do fine with API 25
Thanks for the help
s

svyatoslav.scherbina

01/22/2019, 9:47 AM
I see, thank you for clarification.
View count: 6