Trey
09/13/2022, 3:39 PMAndre
09/14/2022, 1:17 PMmattinger
09/14/2022, 3:32 PMSylvain Patenaude
09/14/2022, 3:56 PMJeff Lockhart
09/14/2022, 5:54 PMMJegorovas
09/15/2022, 7:42 AMmattinger
09/15/2022, 1:18 PMerror build: Undefined symbol: _OBJC_CLASS_$_AnalyticsMultiplatformActionEventV5
I’m kind of presuming that this is because the generated xcframework only contains ios-arm64 and ios-x86_44 versions (i’m on an m1). I tried to add the iosSimulatorArm64:
iosSimulatorArm64 {
binaries {
framework {
baseName = "AnalyticsMultiplatform"
xcFramework.add(this)
}
}
}
val iosSimulatorArm64Main by getting {
dependsOn(iosMain)
}
But assembling the framework always fails:
the path does not point to a valid framework: .../analytics-multiplatform/build/analytics_multiplatformXCFrameworkTemp/fatframework/debug/iosSimulator/analytics_multiplatform.framework
Loboda Deni
09/15/2022, 4:24 PMModule "dev.gitlive:firebase-auth" has a reference to symbol dev.gitlive.firebase.auth/FirebaseUser.displayName.<get-displayName>|-7122534302014937473[1]. Neither the module itself nor its dependencies contain such declaration.
as far as I know there is some problem with the ir compiler, I updated the version of kotlin but the problem is still present.
https://youtrack.jetbrains.com/issue/KT-48836
who faced this? Is there a solution to the problem without using custom library assemblies?mattinger
09/15/2022, 5:47 PMembedBitcode(org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode.BITCODE)
but that always fails with
DSJSONSchemaValidation/DSJSONSchemaValidation.framework/DSJSONSchemaValidation' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
I suppose i can live with having to import both my framework and this pod into the project, since it’s only a single pod, but i think this would present a scaling problem if i had multiple pods, or multiple frameworks that have to do this.
I’m wondering if this is just a function of the underlying DSJSONSchemaValidation pod and not incuding certain things.Loboda Deni
09/15/2022, 6:23 PM@JsName("getKClass1")
internal fun <T : Any> getKClass1(jClass: JsClass<T>): KClass<T> {
if (jClass === js("String")) return PrimitiveClasses.stringClass.unsafeCast<KClass<T>>()
val metadata = jClass.asDynamic().`$metadata$` <--- error here
adjpd
09/15/2022, 8:03 PMAhmed Dridi
09/16/2022, 12:29 PMGuilherme Delgado
09/16/2022, 11:57 PMException in thread “main” java.lang.NoClassDefFoundError: java/net/http/HttpClient$VersionIt crashes when I try to provide
ktor.HttpClient
have no idea why 🤷♂️ (my DI setup is similar to other online samples, ex PeopleInSpace).
I even tried something simpler like:
actual fun platformModule() = module {
single<HttpClient> { HttpClient(Java.create()) }
}
object HelperTest : KoinComponent {
val httpClient = get<HttpClient>()
}
LaunchedEffect(Unit) {
DependencyInjection.initKoin()
println("${HelperTest.httpClient}") // BOOOM!
}
Thanks.Sergio C.
09/17/2022, 3:07 PMArjan van Wieringen
09/18/2022, 11:51 AMcommonMain
module is able to resolve java
dependencies? That seems really weird to me.Evan Foster
09/18/2022, 4:41 PMcocoapods-generate
plugin is not found. I have installed it from Ruby, but it still shows this error. The docs say that if your Kotlin version is less that 1.7 you need to have cocoapods-generate
, and I have Kotlin 1.7.10 installed, so am I safe to ignore this error? Or should I keep trying to install it, and if so, what am I doing wrong? Thanks!!spierce7
09/19/2022, 5:43 AMdavid.bilik
09/19/2022, 9:14 AMsealed class State<out T> {
object Loading : State<Nothing>()
data class Error(val error: Throwable) : State<Nothing>()
data class Loaded<out T>(val data: T) : State<T>()
}
in my shared kotlin code, then I have a viewmodel emitting these different states during async call. Now I want to check in my iOS swift code for a type of a State so I can either show loading/loaded/error views but I have a hard time figuring out how to do this type check. The only way where my type check succeeds is for the State.Loaded
, but for Error or Loading it shows a warning
Cast from 'State<Character>' to unrelated type 'StateLoading' always fails
I suppose it’s because the Loading and Error does not have the type parameter, but how to do this properly?Guilherme Delgado
09/19/2022, 2:53 PMTask 😒hared:compileIosMainKotlinMetadata
w: Could not find “io.ktor:ktor-utils-cinterop-threadUtils” in [/Users/user/MyApp, /Users/user/.konan/klib, /Users/user/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/common, /Users/user/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/platform/ios_arm64]
w: Could not find “org.jetbrains.kotlin.native.platform.linux” in [/Users/user/MyApp, /Users/user/.konan/klib, /Users/user/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/common, /Users/user/.konan/kotlin-native-prebuilt-macos-aarch64-1.7.10/klib/platform/ios_arm64]I’m seeing this logs when building the project, it doesn’t fail, but what this concretely mean?
Nadeem Aslam
09/20/2022, 5:53 AMCocoapods
ruby (ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21])
* System ruby is currently used
Consider installing ruby 2.7 via Homebrew, rvm or other package manager in case of issues with CocoaPods installation
ruby gems (3.0.3.1)
cocoapods (1.11.3)
* cocoapods-generate plugin not found
Get cocoapods-generate from https://github.com/square/cocoapods-generate#installation
Here is the stack overflow link for question.
KMM KDoctor cocoapods error.Ahmet Özcan
09/20/2022, 3:36 PMconfigurations.maybeCreate("default")
artifacts.add("default", file('3rd_party_sdk.aar'))
then i add that as a dependency to my mainAndroid dependency and it worked
but now there are bunch of errors when syncing gradle which also ends with success but i cant use any code complation etc.diego-gomez-olvera
09/20/2022, 3:47 PMprivate var currentJob: Job? = null
fun flushData() {
if (currentJob?.isActive == true) return
currentJob = scope.launch {
// Flush data while there is data to flush
}
}
The idea would be to avoid creating new unnecessary currentJob
having flushData
accessed potentially from any threadStylianos Gakis
09/21/2022, 8:54 AMnpm
like this one: implementation(npm("@emotion/styled", "x.x.x))
. We can’t just define a dependency like emotion.styled = "@emotion/styled"
since version catalogs is complaining. Is there any workaround we can do to get something like this working?Trey
09/21/2022, 6:14 PMAhmet Özcan
09/22/2022, 10:30 AMUndefined symbol: _OBJC_CLASS_$_PubNub
Can you help me about that pls
ty.Javal
09/22/2022, 12:40 PMUncaught Kotlin exception: kotlin.native.IncorrectDereferenceException: illegal attempt to access non-shared
Shared kotlin code:
open val content: suspend () -> Content =
{ getContent() }
getContent() calls other suspend function to retrieve data from local cache.
iOS code:
func getContent() async -> Content {
await sharedGetApi.content.execute() //accessing shared `content` here.
}
extension KotlinSuspendFunction0 {
func execute<T>() async -> T {
do {
let result: T? = try await self.invoke() as? T
if let result = result {
return result
} else {
fatalError("\(T.self) can not be nil")
}
} catch {
fatalError(error.localizedDescription)
}
}
library versions:
coroutines = "1.6.3"
kotlin = "1.6.10"
Any help would be appreciated 🙏
TIAVojtěch Pešek
09/22/2022, 12:58 PMcomponentX()
methods on data class
?
Hi,
we have a kmm project for android and iOS targets. Currently, i’ve been working on reducing the library size and especially the library objc header for iOS. I noticed that `data class`es generate component methods for each value in the constructor. This is what I would expect. Those componentX()
methods also appear in the header, but usually there is no need for the iOS developers to call the method. This is because they can call the parameter by name, which is far more descriptive.Arun Joseph
09/22/2022, 4:05 PMJared Vu
09/22/2022, 4:51 PMval
names are replaced. For the given class,
@JsExport
data class Foo (
val configs: Configs?,
)
I would expect the exported JS to have a key configs
but instead it is replaced with
this.b1q_1 = configs;
Is there any way to preserve the human readable val names within our exported class?Phạm Nhật
09/23/2022, 6:56 AMPhạm Nhật
09/23/2022, 6:56 AMMatthias Geisler
09/23/2022, 7:51 AMPhạm Nhật
09/23/2022, 11:06 AM