David Winer [G]
01/08/2021, 6:47 PMdarkmoon_uk
01/11/2021, 11:51 PMcinterop
fails for a Cocoapod?
No useful output; the Java process exited non-zero 🤷
Knowing what the cinterop
command line executed by podImport
task is, would be a help to start diagnosing/tweaking from the command line.
Anyone have an example of 'manually' driving cinterop against a Cocoapod?darkmoon_uk
01/16/2021, 3:33 AMphldavies
01/19/2021, 10:39 AMCLLocation.speedAccuracy
(iOS 10+) or CLLocation.courseAccuracy
(iOS 13.4+) from Kotlin. Ideally we would still support older iOS but utilise courseAccuracy
when on iOS 13.4+ (similar to #available
in swift)kpgalligan
01/21/2021, 6:46 PMPhilip Dukhov
01/24/2021, 3:14 PMsuspend fun pickSystemImage(): ImageContainer =
suspendCancellableCoroutine { continuation ->
MainScope().launch {
NSLog("pickSystemImage MainScope().launch")
val imagePicker = UIImagePickerController()
NSLog("pickSystemImage 1")
// present and handle
}
}
the problem is that initializing UIImagePickerController
takes huge amount of time - around 6 secs, every time.
2021-01-24 21:56:42.439651+0700 Well[3450:1028035] pickSystemImage MainScope().launch
2021-01-24 21:56:48.593539+0700 Well[3450:1028035] pickSystemImage 1
I’ve tried reproducing this in a test project, and there it works fine.
I’ve tried switching outer scope, as well as creating scope with main context instead of MainScope, or just without switch to an other scope..
I’m out of the ideas where to look for a solutionTresa
02/01/2021, 10:17 AMdazza5000
02/03/2021, 4:03 PMsushma nayak
02/04/2021, 4:22 AMPhilip Dukhov
02/06/2021, 10:20 AMobject CallFeature {
data class State {
enum class Status {
Calling,
Incoming,
}
enum class ViewPoint {
Both,
Self,
Partner,
}
}
}
[SharedMobileCallFeatureStateViewPoint partner]: unrecognized selector sent to instance 0x28325adc0.
It happens both when I try to compare viewPoint == .parent
or making a switch
I can’t seem to find any diffs with other enums at the same level - those are working well
Have anyone faced something similar?darkmoon_uk
02/15/2021, 5:29 AMserialization-core
and not serialization-json
as the documentation advises 🙃 .
😞 1.4.30
during either:
• linkDebugFrameworkIosArm64
or
• linkDebugFrameworkIosX64
(compile
alone, for either platform, succeeds):
Compilation failed: Unbound symbols not allowed
More in thread 👉Anthony Pages
02/16/2021, 8:55 AMSamuel Bichsel
02/18/2021, 10:59 AMExecution failed for task ':shared:linkDebugFrameworkIosX64'.
> Following dependencies exported in the debugFramework binary are not specified as API-dependencies of a corresponding source set:
Project :dreimultiplatform
Please add them in the API-dependencies and rerun the build.
build.gradle:
ios("ios") {
binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework).all {
transitiveExport = true
export(project(":dreimultiplatform"))
}
}
cocoapods {
// Configure fields required by CocoaPods.
summary = "Multiplatform Redux Sample"
homepage = "<https://github.com/dreipol/multiplatform-redux-sample>"
ios.deploymentTarget = "13.0"
frameworkName = "ReduxSampleShared"
}
sourceSets["commonMain"].dependencies {
api project(":dreimultiplatform")
}
Before it used to work. Does anyone had the same problem?ak
02/18/2021, 7:45 PMTask :common:linkDebugFrameworkIOS FAILED
e: Compilation failed: /default/linkdata/package_com.packagename
* Source files:
* Compiler version info: Konan: 1.4.30 / Kotlin: 1.4.30
* Output kind: FRAMEWORK
e: java.nio.file.NotDirectoryException: /default/linkdata/package_com.packagename
Is there a way for me to further debug this issue?darkmoon_uk
02/20/2021, 1:48 PM1.4.30
and Android Studio Canary 7 (+ Gradle plugin alpha07
), I can no longer resolve iOS symbols.
Have deleted .konan
, .gradle
, `.idea`s and reset IDE caches, but still IDE shows red for any iOS SDK symbol. Compile is OK however!
Any confirmation of this issue or ideas to resolve?Gurupad Mamadapur [FH]
02/20/2021, 7:04 PMGurupad Mamadapur [FH]
02/23/2021, 4:22 PMclass AppState: ObservableObject {
private var closeables = Array<Closeable>()
private let viewmodel = AppViewModel()
@Published private(set) var data:AppData? = nil
init() {
let close:Closeable = UtilsKt.watch(viewmodel.data) { any in. // watch is an extension function on flow that returns a closeable
self.data = any as? AppData
}
closeables.append(close)
viewmodel.load() // some api call
}
deinit {
closeables.forEach { it in
it.onClose()
}
}
}
Then use the object of AppState (ignore the naming) on SwiftUI view, marked with @ObservedObject.
This is a bit tedious as I'll have to copy and mark (@published) for each exposed property from my shared viewmodel.
Could directly use the viewmodel in a view but there is no lifecycle I know of where I can call close.aleksey.tomin
02/25/2021, 3:09 PMdarkmoon_uk
03/02/2021, 10:38 PMxcode-compat
Gradle plugin
• A distinct KotlinFramework target, which accomodates the familiar call-out to Gradle for building Kotlin/Native code
• A check for the environment variable KOTLIN_NATIVE_BUILD_CAPABLE
(who sets this?)
Is there any documentation or guidance out there; anyone making this work?Foso
03/07/2021, 6:43 PMPaul Woitaschek
03/08/2021, 10:25 AMMegan Teahan
03/15/2021, 9:05 PMdarkmoon_uk
03/17/2021, 7:15 AMCaused by: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlin.collections.HashMap@33944e8
...while adding an element to a MutableSet
. However:
• The Set is created while on the main thread
• The Set is only ever accessed from the main thread (I've asserted these points with checks on NSThread.isMainThread
at every relevant point)
• The top level object under which the Set (indirectly) resides, is marked @ThreadLocal
...which other restriction am I missing!?
Is there a way to determine at what point an object is being frozen?willyrs
03/19/2021, 9:08 AMTijl
03/29/2021, 6:29 PMclass Foo<T> { // no upper bound
fun bar(baz: (T) -> Unit) {
}
}
@interface KNFFoo<T> : KNFBase // leads to T _Nullable as expected
- (void)barBaz:(void (^)(T _Nullable))baz __attribute__((swift_name("bar(baz:)")));
@end;
class Foo<T:Any> { // Upper bound of Any
fun bar(baz: (T) -> Unit) {
}
}
@interface KNFFoo<T> : KNFBase
- (void)barBaz:(void (^)(T))baz // leads to T as expected __attribute__((swift_name("bar(baz:)")));
@end;
class Foo<T> {
fun bar(baz: (T:Any) -> Unit) { // upperbound of Any just for the method
}
}
@interface KNFFoo<T> : KNFBase
- (void)barBaz:(void (^)(id))baz // <----- id not T? __attribute__((swift_name("bar(baz:)")));
Anyone a little more familiar than me know if my assumption this could be T instead of id is correct?Ivan Đorđević
04/01/2021, 2:29 PMNikolay Kasyanov
04/22/2021, 9:50 AMdarkmoon_uk
04/28/2021, 4:18 AMGrzegorz Sagadyn
04/29/2021, 5:41 PMApplication extensions and any libraries they link to must be built with the APPLICATION_EXTENSION_API_ONLY build setting set to YES
Do you know any workaround for the above? Or do you have any schedule for a fix? I’m a little worried about it because I found that the mentioned flag is blacklisted (https://github.com/JetBrains/kotlin-native/blob/master/utilities/env_blacklist)Anthony Pages
05/04/2021, 2:01 PM//KMPlibAPI.h
@protocol KMPAPIFoo
@required
- (void)bar __attribute__((swift_name("bar()")));
@end;
//KMPlib.h
@protocol KAFoo // <----- here we have a redefinition of the protocol.
@required
- (void)bar __attribute__((swift_name("bar()")));
@end;
@interface Baz
- (void)injectFoo:(KAFoo)foo __attribute__((swift_name("injectFoo(foo:)"))); // <----- and here we are using it, instead of using KMPAPIFoo
@end;
I've tried to put the dependencies in compileOnly
into gradle, but nothing changed.
Anyone is confortable with gradle compilation option for Kotlin native and dependencies ?