Daniel
12/14/2022, 8:35 PMDaniel
12/14/2022, 8:37 PMfunc checkIfUser()
{
Task{
do{
try await self.repo.getUserProfile().watch() {items in//first method
self.myUser = items as! UserInfo
repo.insertFCMWhenLogin(token: myFCMToken!){error in//second method
}
saket
12/14/2022, 10:09 PMZeeshan Syed
12/15/2022, 9:36 AMcybr0ugh
12/15/2022, 2:37 PMStanislav Radchenko
12/15/2022, 3:18 PMErwin Pandawa5
12/15/2022, 3:24 PMTrey
12/15/2022, 4:48 PMmbonnin
12/15/2022, 10:54 PMynsok
12/16/2022, 9:05 AMProject already has a CocoaPods dependency with the name FirebaseCrashlytics
. Any idea how to solve this?
kotlin {
android()
ios()
cocoapods {
summary = "This module contains implementation of analytics and crashlytics"
ios.deploymentTarget = "15.0"
version = "1.10.2"
framework {
baseName = "monitoring"
pod("FirebaseCrashlytics")
// pod("FirebaseAnalytics")
}
}
}
Arkadii Ivanov
12/16/2022, 12:02 PMparcelize-darwin
compiler plugin, that I created a couple of years ago. And published the first version.
https://twitter.com/arkann1985/status/1603702344658685953
Basically it adds Parcelable and Parcelize support for all Darwin targets. Experimental. Together with expect/actual it makes it possible to use Parcelize in commonMain.Edgars Malahovskis
12/16/2022, 12:07 PMMarkRS
12/16/2022, 12:52 PMFernando
12/16/2022, 2:55 PMException in thread "main" java.lang.NoClassDefFoundError: io/ktor/client/engine/cio/CIO
, can you help me please?jean
12/16/2022, 9:31 PMgradle iosX64Test
and it works correctly thoughjessel
12/16/2022, 9:41 PMMPP
used as the shorthand for multiplatform?ian.shaun.thomas
12/16/2022, 9:42 PMDavide Giuseppe Farella
12/17/2022, 12:54 AMandroid()
variant, I cannot build because of
com.android.tools.r8.internal.Jc: Space characters in SimpleName ‘handles ConnectException’ are not allowed prior to DEX version 040This seems a bit awkward as Jvm Android modules can contain tests with backticks ( except instrumented tests ) Is there a solution/workaround? I could disable test
androidTest
if that would solve it ( how? ) as 99% of the code in the main source setQyhyzard
12/17/2022, 4:59 AMKshitij Patil
12/17/2022, 1:13 PMRussell Stewart
12/17/2022, 9:30 PMWaqas Tahir
12/18/2022, 9:51 AMmartmists
12/18/2022, 1:39 PMCannot locate tasks that match ':ac-frontend:compileJava' as task 'compileJava' is ambiguous in project ':ac-frontend'. Candidates are: 'compileDebugAndroidTestJavaWithJavac', 'compileDebugJavaWithJavac', 'compileDebugUnitTestJavaWithJavac', 'compileReleaseJavaWithJavac', 'compileReleaseUnitTestJavaWithJavac'.
If I add withJava
to my kotlin { jvm { ... }}
configuration, it complains it conflicts with the Android plugin. What do I do in this situation?spierce7
12/18/2022, 6:31 PMDaniel
12/18/2022, 7:30 PMsuspend fun doLogout(token: String) {
val userId = appService.currentUser?.id
realm.write {
var user = query<UserInfo>("_id = $0", userId).first().find()
if (user != null) {
val productIndex =
user.FCMToken.withIndex().findLast { it.value == token }!!.index
user = findLatest(user)!!.also {
it.FCMToken.removeAt(productIndex)
}
copyToRealm(user)
appService.currentUser?.logOut() // Suspension functions can be called only within coroutine body
}
}
}
Is there anyway to fix this without changing much code?
I need to do first the db operation then logOut()Ksenia Shneyveys
12/19/2022, 10:44 AMHasan Nagizade
12/19/2022, 5:02 PMJustin Brooks
12/21/2022, 1:19 AMKnapsack# cat build/js/package.json
{
"name": "Knapsack",
"version": "unspecified",
"private": true,
"workspaces": [
"packages/Knapsack-common",
I've tried to configure it a few different ways, but the current code https://github.com/jzbrooks/Knapsack/blob/1a720273a148cade22d068108528ccbe5906ce2a/common/build.gradle.kts#L13.
I searched the issue tracker since but didn't find anything relevant. Does anyone know what I'm missing?Sunny
12/21/2022, 9:51 AMerror: use of '@import' when modules are disabled
Trying to integrate an analytics library Snowplow. added the relevant pod
cocoapods {
pod("SnowplowTracker")
}
Log
Task :cinteropSnowplowTrackerIosArm64
Exception in thread "main" java.lang.Error: ../build/cocoapods/synthetic/IOS/build/Release-iphoneos/SnowplowTracker/SnowplowTracker.framework/Headers/SPSnowplow.h:31:1: error: use of '@import' when modules are disabled
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:274)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:1196)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1185)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1181)
at org.jetbrains.kotlin.native.interop.gen.jvm.DefaultPlugin.buildNativeIndex(Plugins.kt:33)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:289)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLibSafe(main.kt:214)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:80)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:40)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:62)
Any workarounds for this?Luong Vo
12/21/2022, 11:23 AM@Serializable
data class ExampleModel(val title: String)
val body = """
{
"data": {
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON:API paints my bikeshed!"
}
}
}
"""
val json = Json {
prettyPrint = true
isLenient = true
ignoreUnknownKeys = true
}
val data = JsonApi(json).decodeFromJsonApiString<ExampleModel>(body)