Fré Dumazy
11/06/2018, 7:47 PMSam
11/06/2018, 11:02 PMerror: type mismatch: inferred type is ULong but int64_t /* = Long */ was expected
val time = dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_MSEC)
It doesn't like NSEC_PER_MSEC
which is a constant defined in the darwin header. If I just put a literal number in its place it will work fine.kpgalligan
11/07/2018, 12:01 AMjkbbwr
11/07/2018, 3:55 AMGlobalScope.launch
kotlin {
targets {
// For ARM, preset should be changed to presets.iosArm32 or presets.iosArm64
// For Linux, preset should be changed to e.g. presets.linuxX64
// For MacOS, preset should be changed to e.g. presets.macosX64
fromPreset(presets.linuxX64, 'linux')
configure([linux]) {
compilations.main.outputKinds('DYNAMIC')
}
}
sourceSets {
// Note: To enable common source sets please comment out 'kotlin.import.noCommonSourceSets' property
// in gradle.properties file and re-import your project in IDE.
commonMain {
dependencies {
api('org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.0.0')
}
}
linuxMain {
}
linuxTest {
}
}
}
Sangeet
11/07/2018, 11:39 AMJaroslav
11/07/2018, 12:59 PMyuya_horita
11/07/2018, 5:12 PMNikita Kulikov
11/08/2018, 8:04 AMIvan
11/08/2018, 3:30 PMHunter Breathat
11/08/2018, 5:33 PMyuya_horita
11/09/2018, 4:31 AMAlexander Suslov
11/09/2018, 1:46 PMpackage = crypto
headers = CommonCrypto/CommonDigest.h
compilerOpts.ios = -I/opt/local/include
In my .kt file I have import crypto.*
line and I can use CC_SHA256 function.
But when I tried to migrate to K/N 1.3.0 I had a Unresolved reference: CC_SHA256
compile error.
I know that 1.3.0 already have a CommonCrypto.def
file, so I deleted my crypto.def
file and replaced import crypto.*
by import platform.CoreCrypto.*
.
Now I have no compile errors. But I have a linker error instead:
ld: warning: directory not found for option '-L/opt/local/lib'
ld: framework not found CommonCrypto
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Could anybody help me?restorn
11/10/2018, 9:06 PMCould not resolve org.jetbrains.kotlinxkotlinx coroutines core native1.0.1.Required by: project :common-all > Unable to find a matching configuration of org.jetbrains.kotlinxkotlinx coroutines core native1.0.1: - Configuration 'debugIos_arm32Link': - Found org.gradle.native.debuggable 'true' but wasn't required. - Found org.gradle.native.optimized 'false' but wasn't required. - Found org.gradle.status 'release' but wasn't required. - Required org.gradle.usage 'java-api' and found incompatible value 'kotlin-api'. - Required org.jetbrains.kotlin.native.target 'ios_arm64' and found incompatible value 'ios_arm32'. - Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'. - Configuration 'debugIos_arm64Link': - Found org.gradle.native.debuggable 'true' but wasn't required. - Found org.gradle.native.optimized 'false' but wasn't required. - Found org.gradle.status 'release' but wasn't required. - Required org.gradle.usage 'java-api' and found incompatible value 'kotlin-api'. - Required org.jetbrains.kotlin.native.target 'ios_arm64' and found compatible value 'ios_arm64'. - Required org.jetbrains.kotlin.platform.type 'native' and found compatible value 'native'. - Configuration 'debugIos_x64Link': - Found org.gradle.native.debuggable 'true' but wasn't required. - Found org.gradle.native.optimized 'false' but wasn't required. - Found org.gradle.status 'release' but wasn't required. - Required org.gradle.usage 'java-api' and found incompatible value 'kotlin-api'. - Required org.jetbrains.kotlin.native.target 'ios_arm64' and found incompatible value .... The build file can be found here: https://github.com/RubyLichtenstein/Kotlin-Multiplatform-Firebase/blob/ios/common-all/build.gradle Any ideas? I suppose since I was targeting 'iosArm64' that the correct configuration should have been 'debugIos_arm64Link' but there is a mismatch due to 'Required org.gradle.usage 'java-api' and found incompatible value 'kotlin-api''.
Hunter Breathat
11/11/2018, 2:13 AMnapperley
11/11/2018, 10:52 PMpublic fun gtk_container_add(container: CValuesRef<GtkContainer>?, widget: CValuesRef<GtkWidget>?): Unit
Would like to add multiple GTK widgets to a GTK container using a single function call. If three or more widgets need to be added to a container then it would be tedious to call the same function multiple times.Hunter Breathat
11/12/2018, 3:29 PMkpgalligan
11/12/2018, 8:02 PMHunter Breathat
11/13/2018, 1:11 AMJonas Bark
11/13/2018, 10:12 AMApiExample().exampleRequest(machine: machine) { response, exception in
return KotlinUnit()
}
When one wants to distribute a library to 3rd party devs requiring the dev to return a KotlinUnit on every callback has a bad smell attached to it.
Is there any plans to change this behaviour?matej
11/13/2018, 10:25 AMmatej
11/13/2018, 10:25 AMnestserau
11/13/2018, 2:15 PMkotlin-stdlib/kotlin.text/toByteArray
in my multiplatform project with no luck. What’s the idea behind converting strings to bytes and vice versa? Should I write platform-specific code at this point?Ivan
11/13/2018, 2:18 PMkotlin-multiplatform
and kotlin-android
plugins inside build.gradle
file? I really need to have kapt
for room to work on android module, but I cant get kapt
to work without kotlin-android
plugin, which cannot be added because of error Cannot add extension with name 'kotlin', as there is an extension already registered with that name
Project was created by intellij idea, it creates 1 build.gradle
for all platforms so I dont have android own 'build.gradle'drofwarcs
11/13/2018, 9:19 PMfun niceMockForClass(aClass: kotlinx.cinterop.ObjCClass?): kotlin.Any?
. How do we get an instance of ObjCClass
from an existing object or from a class type?pajatopmr
11/14/2018, 1:22 AMpajatopmr
11/14/2018, 2:02 AMDico
11/14/2018, 2:38 AMSangeet
11/14/2018, 8:08 AMmulti-platform project
https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html
Can anyone help me to add kotlinx.serialization
dependency to commonMain
yuya_horita
11/14/2018, 9:14 AM<https://github.com/Kotlin/kotlinx.coroutines/issues/462>
, but I can’t get it in detail.
(Only single thread will be supported and improved ?)yuya_horita
11/14/2018, 9:16 AM