khairil.ushan
04/30/2018, 3:19 PMNSString *newStr = [NSString stringWithUTF8String:[data bytes]];
So i tried that in K/N like this
val newStr = NSString.stringWithUTF8String(data!!.bytes!!)
But I got this error message
Error:(21, 55) type mismatch: inferred type is COpaquePointer? /* = CPointer<out CPointed>? */ but CPointer<ByteVar /* = ByteVarOf<Byte> */>? was expected
So what've I missed here?
Thanks. 🙂albertgao
05/01/2018, 12:46 AMval name = this::class.qualifiedName
Just a little reflectionel_tigro
05/01/2018, 5:47 AM[Kotlin/Native] comprises a LLVM-based backend for the Kotlin compiler and a native implementation of the Kotlin runtime library
"backend" in this context does not mean an actual LLVM backend (which consumes IR to produce machine code). Instead it is backend for the Kotlin compiler itself. So (Kotlin compiler + "backend") = LLVM frontend
. is this correct?yusuf3000
05/01/2018, 8:52 AMA problem occurred evaluating project ':platform-ios'.
> org/gradle/api/internal/FeaturePreviews
Is this something I’m doing wrong?se1by
05/01/2018, 10:41 AMdrofwarcs
05/03/2018, 1:21 AMspierce7
05/05/2018, 4:06 AMolonho
05/05/2018, 9:34 AMadev_one
05/05/2018, 11:28 AM.gradle
file should be
apply plugin: 'kotlin'
apply plugin: 'konan'
konan.targets = [
'ios_arm64', 'ios_x64'
]
konanArtifacts {
framework('KotlinNativeFramework')
}
when build multimodule project?drofwarcs
05/08/2018, 12:04 AMmolikto
05/08/2018, 8:11 AMmolikto
05/10/2018, 1:34 PMLucas
05/12/2018, 12:49 AMgtk_window_set_title
and gtk_button_new_with_label
which is not similar to how JVM code is written.albertgao
05/14/2018, 2:54 AMapply plugin: 'konan'
version = 0.7
Caused by: java.lang.NoClassDefFoundError: org/gradle/api/internal/FeaturePreviews
at org.jetbrains.kotlin.gradle.plugin.KonanPlugin.apply(KonanPlugin.kt:351)
at org.jetbrains.kotlin.gradle.plugin.KonanPlugin.apply(KonanPlugin.kt:269)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:41)
at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:49)
What am i missing?albertgao
05/14/2018, 4:42 AMcommon
, and android
for android lib, and ios
for ios framework), but when I open this project in AppCode, nothing shows in the Project
panel… I assume it might be something to do with the .idea
folder between IDEA and AppCode is different. So, in order to make the multiplatform works for iOS, I need to create the projects in AppCode from scratch?rrader
05/14/2018, 2:46 PMdamian
05/15/2018, 1:47 AMalbertgao
05/15/2018, 4:06 AMfun checkInt(value:Int): String = "number: $value"
It works. when you print(checkInt(6))
at the swift side, it will print number: 6
But this won’t work
fun <T> checkGeneric(value: T):String = when (value) {
is String -> "string"
is Int -> "number"
is Boolean -> "boolean"
else -> "Unknown"
}
String
and Boolean
type works fine, but print(checkGeneric(6))
will output Unknown
. So, the generic is partially supported?ptmt
05/15/2018, 1:07 PMclass KotlinView1 {
}
class KotlinView2 : UIView {
@OverrideInit constructor(coder: NSCoder) : super(coder)
}
@ExportObjCClass
class KotlinView3 : UIView {
@OverrideInit constructor(coder: NSCoder) : super(coder)
}
After compiling this as a framework artifact, I see only @class KotlinView1
in a header file. Is this use case not supported or am I doing something wrong?nish
05/15/2018, 4:49 PMalbertgao
05/15/2018, 10:54 PM> Failed to apply plugin [id 'com.android.library']
> Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.
Anyone has this issue? Even I set that to false
, Android gradle plugin still gives the same errorKonstantin Petrukhnov
05/17/2018, 4:05 AMsksk
05/17/2018, 5:00 PMadev_one
05/19/2018, 12:24 AMUnrecognized selector -[ios.IosApiRequestsMaker toKotlin:]
2018-05-19 05:15:48.277185+0500 ios[47861:1486398] Unrecognized selector -[ios.IosApiRequestsMaker toKotlin:]
Is there way to fix it?russhwolf
05/20/2018, 5:36 AMsdeleuze
05/20/2018, 5:59 PMsdeleuze
05/20/2018, 6:30 PMyusuf3000
05/21/2018, 6:42 AMmsink
05/21/2018, 8:46 AMdrofwarcs
05/23/2018, 3:42 PM