andrea.degaetano
01/25/2023, 11:15 AMDaniel
03/09/2023, 8:56 PMDaniel
03/09/2023, 8:57 PMJacob Rhoda
06/22/2023, 5:13 PMSayali N
06/27/2023, 9:12 PMCompilation failed: IrClassPublicSymbolImpl for com.example.iosbuildfixapp/ComposableSingletons$AppKt|null[0] is already bound: CLASS OBJECT name:ComposableSingletons$AppKt modality:FINAL visibility:internal superTypes:[]
java.lang.IllegalStateException: IrClassPublicSymbolImpl for com.example.iosbuildfixapp/ComposableSingletons$AppKt|null[0] is already bound: CLASS OBJECT name:ComposableSingletons$AppKt modality:FINAL visibility:internal superTypes:[]
/Users/sn/AndroidStudioProjects/iosBuildFixApp/iosApp/iosApp/ComposeView.swift:17:9 Cannot find 'AppKt' in scope
Has anyone seen this issue before and know how to fix it? Thank you!
Code is attached for reference .Otis Goodman
06/28/2023, 10:18 PMOtis Goodman
06/28/2023, 10:23 PMCLOVIS
07/15/2023, 10:23 AMamd64
runners, but they stopped. Now, they only provide M1-based runners.
We were previously running our tests with ./gradlew iosSimulatorArm64Test
, but this fails with the new runners. I assume M1 chips cannot run them?
Xcode does not support simulator tests for ios_simulator_arm64. Check that requested SDK is installed.
What is the correct target to run the project's unit tests on an M1 chip? I don't see any other target starting with iosSimulator
.Jacob Ras
07/15/2023, 6:39 PMsuspend
fun using async/await (and so it's not the main thread anyway)
I tested this by doing a network call 20 times in a row in a suspend fun, on the IO dispatcher in my commonMain
code:
suspend fun run() {
log("Starting network calls")
repeat(20) { doNetworkCall(); log("Call $it done") }
log("Did network calls")
}
The screen recording attached to this video shows that the UI thread doesn't get blocked.
Now, please help me and correct me if I'm wrong with my two concerns about my test:
1. I see that the SwiftUI spinner keeps spinning, so I assume the main thread is not blocked;
2. This post states that the one thread is "_used for both main and background thread in iOS_", which sounds like the main thread, so it should be an issue even if my test doesn't show it? https://emmanuelkehinde.io/supporting-multithreaded-coroutines-in-a-kotlin-multiplatform-project/
(see thread for video)Alexei Artsimovich
07/21/2023, 7:19 PMgradle assembleUmbrellaXCFramework
, it doesn't assemble an XCFramework and the task has NO-SOURCE
status.
However, if I add just one empty Kotlin file to the src of the Umbrella module and run the same task again, it successfully assembles XCFrameworks.
I wonder if there is a way to assemble XCFrameworks with no source files?Jiri Bruchanov
07/24/2023, 4:55 PMHuanzhi Zhang
07/25/2023, 6:06 PMMarco Righini
07/25/2023, 7:24 PMGonçalo Frade
07/25/2023, 9:18 PMcocoapods
, and my KMM project then needs to publish a Swift Package (I use io.github.luca992.multiplatform-swiftpackage
).
Everything works fine until I try to use the Swift Package in an Swift project and get a:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$__TtC13TestPodTestClass", referenced from:
objc-class-ref in TestModule(result.o)
ld: symbol(s) not found for architecture x86_64
Here is an example with a similar `build.gradle.kts`:
kotlin {
ios()
macosX64()
if (System.getProperty("os.arch") != "x86_64") { // M1Chip
iosSimulatorArm64()
macosArm64()
}
cocoapods {
this.summary = "Summary"
this.version = rootProject.version.toString()
this.authors = "Test"
this.ios.deploymentTarget = "13.0"
this.osx.deploymentTarget = "12.0"
this.tvos.deploymentTarget = "13.0"
this.watchos.deploymentTarget = "8.0"
framework {
baseName = "TestModule"
isStatic = false
}
pod("TestPod") {
version = "1.0.0"
source = path(project.file("../iOSLibs/TestPod"))
}
}
multiplatformSwiftPackage {
packageName("Test")
swiftToolsVersion("5.3")
targetPlatforms {
iOS { v("13") }
macOS { v("11") }
}
outputDirectory(File(rootDir, "output/test"))
}
}
Huanzhi Zhang
07/26/2023, 11:16 PMsource = path(project.file("../my-pod"))
in my gradle. It works fine in the beginning. But when I make code changes in that pod, I found it seems doesn’t take effects in kotlin project. Sometimes it will lead to build error, sometimes it builds but my new added part doesn’t work. Am I missing some steps after editing my pod?Ahmed Elzeiny
07/27/2023, 9:13 AMpod("GoogleSignIn")
It didn’t work when I tried to sync my project and I got the following
The following build commands failed:
CopyPNGFile /Users/.../shared/build/cocoapods/synthetic/IOS/build/Release-iphonesimulator/GoogleSignIn/GoogleSignIn.bundle/google@2x.png /Users/.../shared/build/cocoapods/synthetic/IOS/Pods/GoogleSignIn/GoogleSignIn/Sources/Resources/google@2x.png (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
CopyPNGFile /Users/.../shared/build/cocoapods/synthetic/IOS/build/Release-iphonesimulator/GoogleSignIn/GoogleSignIn.bundle/google@3x.png /Users/.../shared/build/cocoapods/synthetic/IOS/Pods/GoogleSignIn/GoogleSignIn/Sources/Resources/google@3x.png (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
CopyPNGFile /Users/.../shared/build/cocoapods/synthetic/IOS/build/Release-iphonesimulator/GoogleSignIn/GoogleSignIn.bundle/google.png /Users/.../shared/build/cocoapods/synthetic/IOS/Pods/GoogleSignIn/GoogleSignIn/Sources/Resources/google.png (in target 'GoogleSignIn-GoogleSignIn' from project 'Pods')
(3 failures)
but when I tried to run the iOS app directly it works without giving me any issues and I can’t sync on Android studio due to the above error, and when I tried to change pod(“GoogleSignIn”, linkOnly = true) then I can get the project synced but iOS stopped working.
I’m using Kotlin 1.8.22 and Android Studio Flamingo | 2022.2.1 Patch 2
Any thoughts?Huanzhi Zhang
07/27/2023, 6:19 PMMarc
07/28/2023, 11:27 AM<http://platform.xxx|platform.xxx>
which resolve just fine in Android Studio on a MacBook, but on Windows the reference cannot be resolved.Marc
07/28/2023, 1:04 PMAVAudioRecorder
from Kotlin code? If I try to write code that accesses it, I get this linking error: Undefined symbols for architecture x86_64: "_OBJC___CLASS_$_AVAudioRecorder", referenced from: objc-class-ref in shared(result.o)
. I checked for other people having this problem, but it seems to mostly occur with external dependencies, while to the best of my knowledge AVAudioRecorder
should be included in the standard iOS SDK. Is it related to me running the project in a simulator on an x86_64 Mac?Yu-Hsuan Lin
07/29/2023, 3:09 PMHuanzhi Zhang
07/31/2023, 11:06 PMJacob Rhoda
08/01/2023, 3:26 PMjazzyfresh
08/01/2023, 8:47 PMjazzyfresh
08/01/2023, 8:51 PMAndrew Reed
08/03/2023, 10:23 AMJacob Rhoda
08/03/2023, 7:32 PMMarc
08/09/2023, 3:11 PMerror: java.lang.IllegalStateException: no implementation for FUN MISSING_DECLARATION name:<get-icon> visibility:public modality:FINAL <> () returnType:kotlin.Nothing
in <package>.ChatTab
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.findImplementation(ObjCExportCodeGenerator.kt:1795)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createDirectAdapters$getAllRequiredDirectAdapters(ObjCExportCodeGenerator.kt:1781)
at org.jetbrains.kotlin.backend.konan.llvm.objcexport.ObjCExportCodeGeneratorKt.createDirectAdapters(ObjCExportCodeGenerator.kt:1787)
(+ a lot of further lines)
This is the code that triggers it I think:
class ChatTab : Tab {
override val options: TabOptions
@Composable
get() {
val icon = rememberVectorPainter(Icons.Default.Chat)
return remember {
TabOptions(
index = 0u,
title = "Chat",
icon = icon
)
}
}
@Composable
override fun Content() {
}
}
The error message seems to imply that the error comes from the getter of the icon
property, which is defined in the parent interface (part of the Voyager library):
@Deprecated(
message = "Use 'options' instead. Will be removed in 1.0.0.",
replaceWith = ReplaceWith("options")
)
public val icon: Painter?
@Composable get() = options.icon
The issue does not occur when compiling for Android. What is confusing to me is that the error message seems to make some wrong assumptions about the getter? Since it comes from an interface it can't be final
and the return type is also not Nothing
.Jacob Rhoda
08/09/2023, 9:33 PMCherrio LLC
08/10/2023, 3:25 PMcommand+b
then i get this error.
I have to head back to android studio to run the project before i could build on Xcodemdr
08/11/2023, 3:02 AM