Michael Bryant
03/15/2019, 8:03 PMList
type (and other types from the collections
package) in dynamic libraries? the generated headers indicate that a <pkg>_kref_kotlin_collections_List
type is being used, but I can’t find any docs on itivan.savytskyi
03/15/2019, 9:33 PMval worker = Worker.start()
worker.execute(
mode = TransferMode.SAFE,
producer = { { operation() }.freeze() },
job = {
it()
}
)
worker.requestTermination()
To read from file NSString.stringWithContentsOfURL(url = file, encoding = NSUTF8StringEncoding, error = null)
gmaciel
03/16/2019, 12:37 PMUncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen
on ios, for trying to change the value of this var:
object MyObject {
var myVar: Boolean = false
}
gmaciel
03/16/2019, 12:37 PMStrum355
03/16/2019, 3:02 PMlouiscad
03/17/2019, 1:52 PMAlexander Suslov
03/17/2019, 2:17 PMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':adsmodule:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.
> java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: ru/subprogram/guitarsongs/ads/BannerAdFactory.class
Duplicate entry could be different after clean/rebuild.
I use IDEA Ultimate 2018.3.5, tested kotlin version 1.3.21
and 1.3.30-eap-45
.basher
03/18/2019, 5:34 PMbasher
03/18/2019, 7:52 PMbasher
03/18/2019, 10:17 PM@SharedImmutable
?yusuf3000
03/19/2019, 1:57 PMimport kotlinx.coroutines.newSingleThreadContext
available in kotlinx-coroutines-core-common
? I can’t see any information here: https://github.com/Kotlin/kotlinx.coroutines/tree/master/common/kotlinx-coroutines-core-common
But I can see it’s available for `kotlinx-coroutines-core`: https://github.com/Kotlin/kotlinx.coroutines/blob/master/core/kotlinx-coroutines-core/README.mdribesg
03/20/2019, 10:49 AMEllen Shapiro
03/20/2019, 5:09 PMPhilip_Touchlab
03/20/2019, 6:41 PMtoomanyeduardos
03/20/2019, 7:46 PMtoomanyeduardos
03/20/2019, 8:26 PMCould not resolve io.ktor:ktor-client-ios:1.2.0-alpha-2
there's a thread on ktor about it, but it hints to just dropping support for iOS.
Also, my versions of kotlin and gradle seem to be out of date.
What are the latest ones you're using?
kotlin.code.style=official
# gradle version
gradle_version = 3.2.1
# kotlin versions
kotlin_version = 1.3.21
kotlin_native_version = 1.3.11
ktor_version = 1.2.0-alpha-2
kotlinx_coroutines_version = 1.1.0
thanksalexcouch
03/21/2019, 7:05 AMalexcouch
03/21/2019, 7:05 AMyusuf3000
03/21/2019, 7:51 AMCoroutineContext
from iOS and inject that into a kotlin/native class?Benedict Pregler
03/21/2019, 8:15 AMVyacheslav Karpukhin [JB]
03/21/2019, 2:52 PMEthan R.
03/21/2019, 4:06 PMheaders = memoryapi.h processthreadsapi.h winnt.h tlhelp32.h handleapi.h
compilerOpts.win32 = "-IC:/Program Files (x86)/Windows Kits/8.1/Include/um/" "-IC:/Program Files (x86)/Windows Kits/8.1/Include/shared/"
linkerOpts.win32 = "-LC:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/kernel32.lib"
Only tlhelp32.h makes it through. Am I doing something wrong or should i just wait it out for a newer version?basher
03/22/2019, 1:21 AMThomas
03/22/2019, 5:04 PMcompilations.getByName("main") {
val firebase by cinterops.creating {
defFile("$projectDir/src/iOSMain/cinterop/firebase.def")
val pods = "$projectDir/../ios/Pods"
includeDirs(
"$pods/FirebaseCore/Firebase/Core/Public"
)
compilerOpts("-F$pods/Firebase -F$pods/FirebaseCore")
linkerOpts("-F$pods/Firebase -F$pods/FirebaseCore")
}
}
And this is the firebase.def
file:
language = Objective-C
headers = FirebaseCore.h
When trying to edit the Kotlin code I have no issues importing the Firebase framework. But when compiling for iOS (packForXCode) I get this error:
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in combined.o
ld: symbol(s) not found for architecture x86_64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Does anyone know why this is happening? Is there something wrong in my configuration?azeDevs
03/22/2019, 8:55 PMbuild.gradle
looks like this: plugins {
id "kotlin-multiplatform" version "1.3.21"
}
repositories {
mavenCentral()
}
kotlin {
mingwX64("mingw") {
compilations.main {
outputKinds("executable")
entryPoint "classes.main"
}
}
sourceSets {
mingwMain {
dependencies {
implementation fileTree(include: ['*.klib'], dir: 'libs')
}
}
mingwTest {}
}
}
task runProgram {
println("getLibsDirName = "+getLibsDirName())
def buildType = "RELEASE" // Change to 'DEBUG' to run application with debug symbols.
dependsOn kotlin.targets.mingw.compilations.main.linkTaskName("EXECUTABLE", buildType)
doLast {
def programFile = kotlin.targets.mingw.compilations.main.getBinary("EXECUTABLE", buildType)
exec {
executable programFile
args ""
}
}
}
and my settings.gradle
looks like this: pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "kotlin-multiplatform") {
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
}
}
}
}
rootProject.name = 'gearNet'
includeBuild './src/libs'
Any advice on how to get my project to recognize and implement ./src/libs/kwinhelp.klib
within my project? Any advice or even a direction on where to look for an answer is very much appreciated.alexcouch
03/23/2019, 2:43 AMheaders = include/hidapi.h
.Thomas
03/24/2019, 2:59 PMplatform.*
, but has no issues compiling. If I open the same project in IntelliJ IDEA or Android Studio I don't get these errors and there is autocomplete. This basically makes editing the Kotlin/Native code impossible in AppCode and I would need to use IntelliJ IDEA or Android Studio just for the Kotlin files.gmaciel
03/25/2019, 4:48 PM.json
file and parsing into a model for an android/ios library? I just saw for the parsing i could use kotlinx.serialization
and for opening the file within the project? Any other kotlinx
project?mben
03/25/2019, 6:37 PMtoomanyeduardos
03/26/2019, 2:36 AMmain.framework
to something customizable?
there's this bug reported: https://youtrack.jetbrains.com/issue/KT-28313 which is listed as fixed, but it doesn't seem to compile. i keep getting
Could not find method binaries() for arguments KotlinNativeTargetPreset
toomanyeduardos
03/26/2019, 2:36 AMmain.framework
to something customizable?
there's this bug reported: https://youtrack.jetbrains.com/issue/KT-28313 which is listed as fixed, but it doesn't seem to compile. i keep getting
Could not find method binaries() for arguments KotlinNativeTargetPreset
yuya_horita
03/26/2019, 2:37 AMtoomanyeduardos
03/26/2019, 2:37 AMyuya_horita
03/26/2019, 2:38 AMios_framework_name
in gradle file.toomanyeduardos
03/26/2019, 2:39 AMyuya_horita
03/26/2019, 2:49 AMpackForXcode
needs to be updated, too.
But I describe that in same article.toomanyeduardos
03/26/2019, 2:51 AMJonas Bark
03/26/2019, 6:36 AM