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

    goto1134

    02/22/2018, 9:57 PM
    Can I compile kotlin native for GBA ARMv4 ISA?
    m
    o
    • 3
    • 2
  • k

    koufa

    02/23/2018, 9:24 AM
    Is there support for Kotlin/Native on Intellij Idea CE?
    t
    g
    b
    • 4
    • 3
  • d

    david.bilik

    02/23/2018, 12:37 PM
    does Kotlin Native supports generics? I am playing a little with multiplatform project and I have this in common module
    interface ApiCallback<in T> {
        fun onSuccess(data: T)
        fun onError(error: Throwable)
    }
    and then I have some class
    expect class Api {
        fun login(email: String, password: String, callback: ApiCallback<LoginResponse>)
    }
    and when I try to build with
    compileKonan
    command, it fails on
    src/main/kotlin/model/Api.kt:10:21: error: actual function 'login' has no corresponding expected declaration
    The following declaration is incompatible because parameter types are different:
        public final expect fun login(email: String, password: String, callback: ApiCallback<LoginResponse>): Unit
    
        actual fun login(email: String, password: String, callback: ApiCallback<LoginResponse>) {
                        ^
    src/main/kotlin/model/Api.kt:10:77: error: unresolved reference: LoginResponse
        actual fun login(email: String, password: String, callback: ApiCallback<LoginResponse>) {
                                                                                ^
    other methods work.. so my only guess is this this generic class
    o
    • 2
    • 2
  • d

    david.bilik

    02/23/2018, 12:49 PM
    wow, thanks, you are right, that was the case .. developing without IDE is really hard 😄
    o
    • 2
    • 3
  • d

    dominik.vesely

    02/23/2018, 10:18 PM
    I am creating app in Swift which uses my Kotlin compiled Framework. It works great, but I have Objective-C framework which I would like to use in my Swift and Kotlin code. In my
    build.gradle
    I have interop task which creates bindings. But from this point i am lost. I tried to copy .kt file from binding into my
    common-ios
    project which looks good and compiles. until I try to use code from this file. I got an arror about wrong architecture (even though I am pretty sure i got target iphone_sim everywhere) so I am probably doing it in a wrong way. I am new to gradle and kotlin which does not help either 🙂 So can someone point me how to use "objc-framework" in kotlin code which is afterwards compiled into objc framework ?
    o
    • 2
    • 4
  • d

    dominik.vesely

    02/24/2018, 9:17 AM
    I got it, so generally if I understand it correctly now... if I want to share 3rd party framework I need to link it with my Kotlin framework and also link it with my swift app right?
    o
    • 2
    • 1
  • f

    ftomassetti

    02/24/2018, 9:28 AM
    Hi, I would like to run the html5canvas using Wasm but using the gradle plugin for kotlin native. I am not sure how to run jsinterop from it. Any pointers?
    o
    • 2
    • 2
  • s

    spierce7

    02/24/2018, 9:29 PM
    what objects can you transfer back and fourth between kotlin and swift via the bridge? Is it only a subset of objects, or does anything work?
    o
    a
    s
    • 4
    • 5
  • p

    Pere Casafont

    02/25/2018, 6:55 PM
    has anyone considered to write a game engine in kt native?
    o
    e
    o
    • 4
    • 16
  • d

    david.bilik

    02/26/2018, 8:43 AM
    hello, should task
    generateCmake
    generate CMakeList with all interop setup and used libraries? Because for me it does not
    i
    o
    v
    • 4
    • 7
  • y

    yusuf3000

    02/27/2018, 8:37 AM
    Hi everyone, I’m working for a company that is quite keen on using cross platform code for our Android and iOS app so natually Kotlin/Native came up. The higher ups want to know what the road map is until the 1.0 release. I tried looking online but couldn’t find anything. Does anybody know where I can find this?
    o
    • 2
    • 2
  • t

    Tobi

    02/27/2018, 9:59 AM
    I have a multiplatform project including an
    ios
    module. My
    common
    modules has some tests that use
    mockk
    as mocking library. When I run
    test
    , the task
    :ios:compileKonanIos-testsIphone
    fails since it cannot resolve the references to
    mockk
    . The code can be found here: https://github.com/novoda/spikes/blob/enable_tests_kotlin_native/game-of-life-multiplatform/ios/build.gradle Anything I am missing?
    i
    • 2
    • 1
  • y

    yusuf3000

    02/27/2018, 10:30 AM
    Has anyone tried to use RxSwift or RxJava with a Kotlin Native project? It’s a requirement for the multiplatform project I’m working on. Am I right in thinking that the common code (written in K/N) will invoke the relevant RxSwift/RxJava code through an interface/protocol? The RxJava code could be written in K/N too, but it’s the RxSwift code that will be the problem as that will have to be written in Swift.
    t
    • 2
    • 2
  • t

    tapchicoma

    02/28/2018, 8:57 PM
    What is the way to include gradle native plugin via
    plugins {}
    block? Tried following without success:
    plugins {
       id("kotlin-native-gradle-plugin") version "0.6" apply false
       // kotlin("kotlin-native-gradle-plugin") version "0.6" apply false
    }
    i
    • 2
    • 1
  • t

    tapchicoma

    02/28/2018, 9:30 PM
    am I understanding right - for program artifact
    main.kt
    should be always in
    src/main/kotlin
    and not in
    src/main/kotlin/some/package
    ?
    i
    • 2
    • 1
  • d

    david.bilik

    03/01/2018, 6:50 AM
    @Simone Civetta https://youtrack.jetbrains.com/issue/KT-23037 😞
    👍 1
    s
    s
    • 3
    • 5
  • r

    Ruckus

    03/01/2018, 8:43 PM
    Out of idle curiosity, is the plan for building Kotlin/Native to stick with Gradle, or to eventually move to a "pure Kotlin" tool like Kobalt (or even a custom built JB tool)?
    🤔 1
    a
    o
    • 3
    • 2
  • t

    tapchicoma

    03/01/2018, 9:22 PM
    is there similar tool for native like proguard for java/android or dce for kotlin-js?
    g
    o
    • 3
    • 2
  • o

    olonho

    03/02/2018, 2:01 PM
    Kotlin/Native team is pleased to announce release v0.6.1 of our toolchain. This is bugfix release, including the following features: * Support total ordering in FP comparisons * Interop generate string constants from string macrodefinitions * STM32 blinky demo in pure Kotlin/Native * Top level variables initialization redesign (proper dependency order) * Support kotlin.math on WebAssembly targets * Support embedded targets on Windows hosts Binaries can be downloaded from the following links: https://download.jetbrains.com/kotlin/native/builds/releases/0.6.1/macos/kotlin-native-macos-0.6.1.tar.gz https://download.jetbrains.com/kotlin/native/builds/releases/0.6.1/linux/kotlin-native-linux-0.6.1.tar.gz https://download.jetbrains.com/kotlin/native/builds/releases/0.6.1/windows/kotlin-native-windows-0.6.1.zip GitHub release page is https://github.com/JetBrains/kotlin-native/releases/tag/v0.6.1.
    🙌🏼 1
    🎉 16
    ❤️ 3
    🕺 3
    💯 3
    b
    • 2
    • 2
  • t

    Tobi

    03/02/2018, 2:50 PM
    Is debugging of xcode frameworks now supported? I just updated to
    0.6.1
    and added
    enableDebug true
    to my framework closure and built the framework. But when I set a breakpoint in the xcode UI and try to step into the kotlin code, it steps over 🤔
    s
    • 2
    • 2
  • s

    spierce7

    03/02/2018, 3:03 PM
    Are there any threading restrictions I need to work around from calling Kotlin code from swift?
    o
    • 2
    • 7
  • y

    yatsinar

    03/03/2018, 6:08 PM
    Has anyone tried to implement Coroutines in native modules for iOS yet?
    s
    • 2
    • 1
  • b

    benny.huo

    03/04/2018, 2:03 AM
    Hi, I just wonder if you have any plans to support Android X86 target?
    o
    l
    +2
    • 5
    • 10
  • h

    hellotimmutton

    03/05/2018, 4:23 AM
    is there a way to make data classes extend codable without explicitly stating it in the code?
    o
    • 2
    • 2
  • t

    tarek

    03/06/2018, 10:24 AM
    Is
    @BeforeTest
    not implemented in Kotlin Native ? I get this error :
    > Task :native:compileKonanNative-testMacbook
    /myproject/common/src/test/kotlin/GameTest.kt:10:6: error: unresolved reference: BeforeTest
        @BeforeTest
    g
    p
    • 3
    • 11
  • y

    yusuf3000

    03/06/2018, 11:40 AM
    In our Kotlin Native project, we have a
    kotlin-platform-common
    module A dependent on another
    kotlin-platform-common
    module B. Android studio can correctly find the references, but gradle cannot compile module A as it cannot find the reference to B. Does anyone know how to correctly make one kotlin-platform-common module dependent on another?
    d
    i
    • 3
    • 4
  • t

    tudor.prodan

    03/06/2018, 3:42 PM
    I am trying to use the
    OMGHTTPURLRQ
    library in a iOS app written in Kotlin/Native, but my app crashes because "OMGHTTPURLRQ class was not found" (log from Xcode). Also, CLion does not see the
    OMGHTTPURLRQ
    class or
    import libs.*
    statement.
    ./gradlew compileKonan
    works with no errors. This is how I try to use it: https://github.com/radiKal07/KotlinGithubTop10/blob/master/ios/src/main/kotlin/GithubService.kt Does anybody know what I am doing wrong ? It is basically the same code from kotlinconf-app.
    o
    • 2
    • 3
  • k

    Konstantin Petrukhnov

    03/06/2018, 5:14 PM
    hi, is it possible to include text file in framework that generated by konan from src/main/resources?
    o
    i
    • 3
    • 4
  • t

    Tobi

    03/07/2018, 8:31 AM
    Using
    lldb
    I can set a breakpoint in my kotlin code from xcode, which is great. But can I also show the value of a variable in scope when the breakpoint is reached? Currently I just see the
    ObjHeader
    .
    o
    • 2
    • 2
  • a

    Alexandre Delattre

    03/07/2018, 12:39 PM
    Hello, I am currently developing an iOS app using kotlin native 0.6.1, based on the uikit sample and the gradle plugin. At this point is there a way to make auto-completion available in the IDE (IJ Ultimate or CLion) for obj-c classes ? Thanks
    g
    c
    +2
    • 5
    • 14
Powered by Linen
Title
a

Alexandre Delattre

03/07/2018, 12:39 PM
Hello, I am currently developing an iOS app using kotlin native 0.6.1, based on the uikit sample and the gradle plugin. At this point is there a way to make auto-completion available in the IDE (IJ Ultimate or CLion) for obj-c classes ? Thanks
g

gildor

03/07/2018, 1:33 PM
New CLion 2018.1 supports ObjC as I remember Also Appcode
a

Alexandre Delattre

03/07/2018, 1:44 PM
thank you, I will check the latest EAP and report back
I have tried to open the project with the Clion EAP and kotlin plugin, no auto-completion so far 😞
Maybe I am missing something ?
g

gildor

03/07/2018, 2:12 PM
I've never tried, just saw some news about support of ObjC
a

Alexandre Delattre

03/07/2018, 2:43 PM
my guess is that konanc is using some kind of pre-generated kotlin sources stubs for platform libraries such as foundation and uikit, but I have no clue how to find these sources on recent kotlin native version
from this point we could manually add these files as sources to the intellij module (a dirty hack) and have some kind of auto completion
right now it is tedious to use kotlin on ios because you constantly have to read the objective c docs and try to translate to kotlin interop version by trial and error.
Hopefully Jetbrains will get it right at some point
c

cbruegg

03/07/2018, 5:29 PM
JetBrains is known for great tooling, so I guess once Kotlin/Native reaches 1.0, this will work fine?
t

tudor.prodan

03/07/2018, 6:34 PM
install CLion EAP and the Kotlin/Native plugin. Autocomplete works for me.
Also do not install the plugin through the IDE as it is an older version. Search for it on the JetBrains site and install manually
h

hultgren

03/07/2018, 7:21 PM
I had to run the
generateCMake
gradle task to get autocomplete to work
g

gildor

03/08/2018, 1:18 AM
Oh, do you mean auto-completion in Kotlin code for ObjC code? For platform code it should work out of the box on CLion and K/N plugin. And yeah, you need CLion 2018.1.
View count: 4