Vitaliy Zarubin
10/25/2022, 3:26 PMMohit Sharma
10/25/2022, 7:33 PMCaused by: kotlinx.serialization.json.internal.JsonDecodingException: Polymorphic serializer was not found for missing class discriminator ('null')
2022-10-25 20:31:56.910 4548-4548/com.socialpillars.ngo E/AndroidRuntime: JSON input: .....te_time":"2022-03-30T06:43:29.433318+05:30","type":"post"}]}
data class Posts(
@SerialName("uuid") val postId: String,
@SerialName("description") val description: String,
@SerialName("likes_count") var likesCount: Int,
@SerialName("images") private val _images: List<Image>,
@SerialName("user") val user: User,
@SerialName("is_liked") var isLiked: Boolean,
@SerialName("create_time") private val _eventStartTime: String,
var isMyPost: Boolean = false
)
data class FeedItem(
@SerialName("post") var posts: Posts?,
@SerialName("event") var events: Events?,
@SerialName("type") var type: FeedType
)
Shabinder Singh
10/25/2022, 8:39 PMimport androidx.compose.animation
and
import androidx.compose.foundation
but building successfully.
Desktop and Common do recognise above packages but Android Doesnt.
using Jetpack Compose - v1.2.0 Stable.
Any Insights ?Shabinder Singh
10/25/2022, 8:43 PMLee Delarm
10/25/2022, 8:47 PMUpgrade your App
portion of the Kotlin multi Mobile. Rather than retype the WHOLE thing, I also created a ticket since at least one thing in the tutorial appeared to be a bug. To start with a summary though, the Android version does not error, but displays nothing when following the instructions to the letter.
https://youtrack.jetbrains.com/issue/KT-54675/Kotlin-Multiplatform-Mobile-tutorial-android-network-display-issueCas Van Luijtelaar
10/26/2022, 8:09 AMandroidx.datastore:datastore-preferences-core
?harry248
10/26/2022, 9:47 AMrohit1899
10/26/2022, 11:57 AMiOSMain
which is ideal.
But when we try to generate framework file of our Shared
module,
We think It does not include headers for the externally added dependencies.
So our clients on their iOS apps need to add those dependencies along with our Shared
framework.
We wish to avoid this and create a unified framework which includes nested dependancies.
So far we tried creating an umbrella framework project, where we added our Shared
framework and other dependancies and then tried to create framework, it did not work as expected.
We’ve tried to explain the problem using attached image.
Please drop us a message here if you need any more information regarding same.mkrussel
10/26/2022, 1:26 PMCValue<platform.CoreGraphics.CGRect>
as an argument. I'm trying to upgrade to Xcode 14.0.1, and the constructor has now changed to take CValue<mypackage.CGRect>
, so I can no longer pass in the value from CGRectMake
. I don't really want my own copies of the platform types.
I'm using Kotlin 1.7.0. Is this a known bug that will get fixed or am I likely doing something wrong in my interop setup.
language = Objective-C
modules = PangeaMapView
linkerOpts = -framework PangeaMapView
I tried added depends CoreGraphics
but that didn't change anything.Benoit Quenaudon
10/26/2022, 5:56 PMexpect
class’s contructor would have default parameter. The actual class would not set this parameter. It used to be fine unless I build the project using 1.7.20
It gives me the constructor doesn’t pass the defaulted param.
// commonMain
expect abstract class Foo(
sourceFile: String? = null,
) {}
// nativeMain
actual abstract class Foo actual constructor(
actual val sourceFile: String?,
) {}
// nativeMain
actual abstract class Bar protected actual constructor(
) : Foo() {} // This would complain `sourceFile` isn't passed in the constructor of `Foo`
Stylianos Gakis
10/26/2022, 8:44 PMsaket
10/27/2022, 12:08 AMzt
10/27/2022, 4:34 AMCas Van Luijtelaar
10/27/2022, 8:39 AMkotlin {
android()
iosX64()
iosArm64()
iosSimulatorArm64()
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
ios.deploymentTarget = "14.1"
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("dev.gitlive:firebase-config:1.6.2")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting
val androidTest by getting
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by creating {
dependsOn(commonTest)
iosX64Test.dependsOn(this)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
}
but when adding it to a project that does not have an “iosApp podfile” but I get an error:
ld: framework not found FirebaseABTesting
for this build.gradle:
kotlin {
cocoapods {
summary = "Some description for the $libBaseName."
homepage = libSiteUrl
ios.deploymentTarget = iosDeploymentTarget
authors = libDeveloperOrg
version = libBaseVersion
license = "Unlicensed"
name = libBaseName
source = "{ :git => '$libGitUrl', :tag => '$libBaseVersion' }"
extraSpecAttributes["vendored_frameworks"] = "'$libBaseName.xcframework'"
xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] =
org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType.RELEASE
framework {
isStatic = false
baseName = libBaseName
exportedProjects.forEach {
export(project(":$it"))
}
}
specRepos {
url("<https://github.com/Kotlin/kotlin-cocoapods-spec.git>")
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("dev.gitlive:firebase-config:1.6.2")
}
}
}
}
I hope I’m missing something obviouselect
10/27/2022, 11:47 AMcommonMain
but I'd like to move it to specific targets (jvm and the rest), but I'm unsure how to do it.
Now I have a single GenerateCode
task, shall I have a GeneratorJvmCode
and GeneratorNonJvmCode
having each of them their own generated dir?
@get:OutputDirectory
val targetDir: DirectoryProperty = project.objects.directoryProperty()
.convention(project.layout.buildDirectory.dir("generatedJvm")) // and the other one having "generatedNonJvm"
elect
10/27/2022, 1:15 PMcommonMain
but nothing for jvmMain
or nativeMain
?
kotlin.sourceSets {
commonMain { .. }
named("jvmMain") { .. }
}
shahroz
10/27/2022, 5:01 PMbuild.gradle
file doesn't have an artifact-id
the library that gets published works fine.
Without artifactId
group = "io.data.shared"
version = "1.0"
my content of my maven repo looks like this (which is fine):
5206 Oct 27 21:42 shared-android-1.0-sources.jar
10971 Oct 27 21:42 shared-android-1.0.aar
8813 Oct 27 21:42 shared-android-1.0.module
6831 Oct 27 21:42 shared-android-1.0.pom
With artifact Id
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "io.data.android"
artifactId = "shared"
version = "1.0.0"
}
}
}
my content of my maven repo looks like this (which isn't android specific):
shared-1.0.0-kotlin-tooling-metadata.json
shared-1.0.0-sources.jar
shared-1.0.0.jar
shared-1.0.0.module
shared-1.0.0.pom
FunkyMuse
10/27/2022, 9:07 PMtylerwilson
10/28/2022, 12:00 AMFat frameworks are not supported for platform `macos_arm64
I found some custom gradle code to build the XCFramework correctly, but it would be nice if it were built into the KMM plugin. Can we expect this might work in KMM Beta version?Jimmy
10/28/2022, 1:39 AMHttpClient().use { httpClient ->
withTimeout(timeout) {
httpClient.prepareGet(urlPath).execute { httpResponse ->
... do work ...
// hangs here
}
}
}
Jimmy
10/28/2022, 1:39 AMexecute
Jimmy
10/28/2022, 2:09 AMHttpClient().use { httpClient ->
withTimeout(timeout) {
val body = httpClient.get(urlPath).bodyAsText()
... do work ...
}
}
chansek
10/28/2022, 7:58 AMorg.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
Here is my build.gradle.kts of KMM module
android {
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.2.0"
}
}
kotlin {
...
sourceSets {
...
val androidMain by getting {
dependencies {
implementation("androidx.compose.runtime:runtime:1.3.0-alpha02")
...
}
}
...
}
}
ptmt
10/28/2022, 8:26 AMJulien F
10/28/2022, 11:43 AMExecuting of 'xcodebuild -project Pods.xcodeproj -scheme gRPC -sdk iphoneos -configuration Release' failed with code 65 and message:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project Pods.xcodeproj -scheme gRPC -sdk iphoneos -configuration Release
...
note: Building targets in dependency order
/Users/julien/cash/mobile/shared/build/cocoapods/synthetic/IOS/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'gRPC-gRPCCertificates' from project 'Pods')
/Users/julien/cash/mobile/shared/build/cocoapods/synthetic/IOS/Pods/Pods.xcodeproj: error: Signing for "gRPC-gRPCCertificates" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'gRPC-gRPCCertificates' from project 'Pods')
** BUILD FAILED **
The command
xcodebuild -project Pods.xcodeproj -scheme gRPC -sdk iphoneos -configuration Release
runs fine when ran from a terminal.
Has anyone had the same issue? We think it’s a problem with Ventura, but we’re not sure.shahroz
10/28/2022, 12:53 PMKtor
and sqldelight
On storyboard it works as expected, Swift UI preview remains broken.
I have gone through all the related reported issues, all of them require to make the framework dynamic
and i have done so by adding all of the possible things
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0"
ios.deploymentTarget = "14.1"
framework {
baseName = "shared"
isStatic = false
}
}
targets.filterIsInstance<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget>()
.forEach {
it.binaries.filterIsInstance<org.jetbrains.kotlin.gradle.plugin.mpp.Framework>()
.forEach { lib ->
lib.isStatic = false
lib.linkerOpts.add("-lsqlite3")
}
}
Yet my swift-UI preview fails
HumanReadableSwiftError
SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x00006000005a18c0):'shared'>)
Landry Norris
10/28/2022, 4:54 PMEric Williams
10/28/2022, 5:20 PMkotlinx.html
multiplatform compatible with iOS? I see this on Github "Available to all Kotlin Multiplatform targets" but was unable to pull it into a multiplatform projectbrabo-hi
10/28/2022, 7:40 PMSebastian Lehrbaum
10/28/2022, 9:08 PMSebastian Lehrbaum
10/28/2022, 9:08 PMmkrussel
10/28/2022, 9:12 PMMustafa Ozhan
10/28/2022, 9:23 PM