Rainer Schlonvoigt
11/09/2020, 2:08 PMRainer Schlonvoigt
11/09/2020, 2:09 PMRainer Schlonvoigt
11/16/2020, 10:39 AMRainer Schlonvoigt
11/16/2020, 10:40 AM<LibName.someType>
disambiguationRainer Schlonvoigt
11/16/2020, 10:40 AMsomeType
” instead of the module having that typeSantiago Avila
11/16/2020, 5:54 PMimport cocoapods.AFNetworking
the compiler marks AFNetworking as an unresolved reference, what am I missing?aleksey.tomin
12/05/2020, 7:23 AMio.ktor.client.engine.ios.Ios
) I have a lot of “timeout error”.
ktor-client works in
Worker.start(name = "actions").execute(TransferMode.SAFE, { ... }) {
val ctx = newSingleThreadContext("actions")
while (true) {
runBlocking(ctx) {
performKtorRequests()
delay(Checker.WAIT_INTERVAL)
}
}
}
I try to use
kotlin 1.4.10 + ktor 1.4.2 + coroutinues 1.3.9-native-mt-2
and
kotlin 1.4.20 + ktor 1.4.3 + coroutinues 1.4.2-native-mt
What I do wrong? How can I found a problem?Amritansh
12/08/2020, 4:07 PMfun getConnectionType(): ConnectivityState {
val network = CTTelephonyNetworkInfo().currentRadioAccessTechnology
return if (network == CTRadioAccessTechnologyLTE || network == CTRadioAccessTechnologyWCDMA ||
network == CTRadioAccessTechnologyEdge || network == CTRadioAccessTechnologyGPRS ||
network == CTRadioAccessTechnologyCDMA1x
) {
ConnectivityState.Cellular(
carrier = CTTelephonyNetworkInfo()?.subscriberCellularProvider?.carrierName ?: ""
)
} else if (network == null) {
ConnectivityState.NoConnection
} else {
ConnectivityState.Wifi
}
}
I am not able to figure or device model since when I call UIDevice.currentDevice.model
it returns iPhone. I found this on stackoverflow but not sure how to write this code in KMM https://stackoverflow.com/a/11197770/4040394Philip Dukhov
12/31/2020, 8:41 AM.sorted { f1, f2 -> Bool in
with
.sorted { f1,
f2 -> Bool in
I can’t seems to find the rule responsible for this. Is there any way to see which rules were applied to particular lines?Roman Vasilyev
01/03/2021, 9:28 PMmagnumrocha
01/05/2021, 6:08 PM@kotlinx.cinterop.internal.CCall public external fun SCNetworkReachabilityGetFlags(target: platform.SystemConfiguration.SCNetworkReachabilityRef? /* = kotlinx.cinterop.CPointer<cnames.structs.__SCNetworkReachability>? */, flags: kotlinx.cinterop.CValuesRef<platform.SystemConfiguration.SCNetworkReachabilityFlagsVar /* = kotlinx.cinterop.UIntVarOf<kotlin.UInt> */>?): kotlin.Boolean { /* compiled code */ }
to receive the kSCNetworkReachabilityFlags…
correctly?
in Swift, we can make the call:
var flags: SCNetworkReachabilityFlags = []
if !SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags) {
return false
}
And receive the flags in an array style….
In Kotlin Native, I am doing:
// val flags = allocArray<SCNetworkReachabilityFlagsVar>(10) // -> this was my first attempt, they are 10 possible flags!
val flags = alloc<SCNetworkReachabilityFlagsVar>()
if (!SCNetworkReachabilityGetFlags(reachabilityRef, flags.ptr)) return false
the problem is I am receiving all the flag “summed” (they are kotlin.UInt
), and not split in an array, like in Swift.Samuel Bichsel
01/15/2021, 11:47 AM@ExperimentalUnsignedTypes
actual fun checkSystemPermissionsThunk(): Thunk<AppState> = { dispatch, _, _ ->
val center = UNUserNotificationCenter.currentNotificationCenter()
center.requestAuthorizationWithOptions(
(UNNotificationPresentationOptionAlert + UNNotificationPresentationOptionSound)
) { isSuccess, error -> }
}
Stacktrace:
at 0 Multiplatform Redux Sample 0x00000001084d67cf kfun:kotlin.Throwable#<init>(kotlin.String?){} + 95
at 1 Multiplatform Redux Sample 0x00000001084cee5d kfun:kotlin.Exception#<init>(kotlin.String?){} + 93
at 2 Multiplatform Redux Sample 0x00000001084cf0cd kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93
at 3 Multiplatform Redux Sample 0x000000010850427d kfun:kotlin.native.IncorrectDereferenceException#<init>(kotlin.String){} + 93
at 4 Multiplatform Redux Sample 0x000000010850851f ThrowIllegalObjectSharingException + 623
at 5 Multiplatform Redux Sample 0x00000001085f8852 _ZN12_GLOBAL__N_128throwIllegalSharingExceptionEP9ObjHeader + 34
at 6 Multiplatform Redux Sample 0x00000001085fcd8d _ZN12_GLOBAL__N_136terminateWithIllegalSharingExceptionEP9ObjHeader + 13
at 7 Multiplatform Redux Sample 0x000000010862b133 _ZNK16KRefSharedHolder3refIL11ErrorPolicy3EEEP9ObjHeaderv + 67
at 8 Multiplatform Redux Sample 0x000000010847084a _ZL39Kotlin_Interop_unwrapKotlinObjectHolderP11objc_object + 42
at 9 Multiplatform Redux Sample 0x0000000108348a6e _63682e64726569706f6c2e6d756c7469706c6174666f726d2e726564757873616d706c652e7368617265643a736861726564_knbridge3 + 222
at 10 libdispatch.dylib 0x000000010a0c57ec _dispatch_call_block_and_release + 12
at 11 libdispatch.dylib 0x000000010a0c69c8 _dispatch_client_callout + 8
at 12 libdispatch.dylib 0x000000010a0cd296 _dispatch_lane_serial_drain + 796
at 13 libdispatch.dylib 0x000000010a0cdf9d _dispatch_lane_invoke + 493
at 14 libdispatch.dylib 0x000000010a0d9de2 _dispatch_workloop_worker_thread + 882
at 15 libsystem_pthread.dylib 0x00007fff60c8aa3d _pthread_wqthread + 290
at 16 libsystem_pthread.dylib 0x00007fff60c89b77 start_wqthread + 15
kpgalligan
01/15/2021, 3:23 PM{ isSuccess, error -> }
.kpgalligan
01/15/2021, 3:24 PMkpgalligan
01/15/2021, 3:24 PMSamuel Bichsel
01/15/2021, 4:34 PMkpgalligan
01/15/2021, 4:52 PMbut then I wasn’t able to call anything in the completion handler
kpgalligan
01/15/2021, 4:52 PMTresa
01/21/2021, 1:54 PMTresa
01/21/2021, 1:54 PMpre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
we end up with other errors during build like
Undefined symbols for architecture x86_64:
"_sqlite3_bind_text16", referenced from:
_SQLiter_SQLiteStatement_nativeBindString in ConnectPlusSharedDB(result.o)kpgalligan
01/21/2021, 6:46 PM_sqlite3_bind_text16
Tresa
02/01/2021, 10:16 AMTresa
02/01/2021, 10:16 AMShawn Tucker
02/04/2021, 3:45 PMTresa
02/04/2021, 4:15 PMTresa
02/04/2021, 4:15 PMConfigure project :Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'xxx'.
Failed to notify project evaluation listener.> Unknown target name:
crumpf
02/09/2021, 6:15 PMNikolay Kasyanov
02/12/2021, 7:14 AMAnthony Pages
02/15/2021, 11:34 AMkpgalligan
02/15/2021, 5:20 PMxcode-kotlin
is currently maintained. It should work. The docs could use an update, and we have some efforts in progress, but you can certainly use it.