27 questions
2
votes
1
answer
73
views
How to avoid duplicated Compose Multiplatform resources (strings & drawables) across core and feature modules?
I'm working on a Compose Multiplatform project (CMP) with multiple feature modules.
Each feature module contains a composeResources folder with drawable and values (strings,...) inside.
The issue is ...
0
votes
0
answers
47
views
UIKitViewController in Compose Multiplatform loses state on device rotation
I am building a Kotlin Multiplatform app where I want to use shared UI with Compose for both Android and iOS. However, I need some native views with their own state for certain parts of the app, so I’...
0
votes
0
answers
42
views
how to take full screenshot in KMP Compose. actual iOS
package goodeva.smartsafety.opa.kmp.presentation.feature.upload
import platform.UIKit.*
import platform.Foundation.*
import platform.CoreGraphics.*
import kotlinx.cinterop.*
actual class ...
1
vote
0
answers
120
views
Incorrect Colors in Compose MultiPlatform (CMP) iOS Screenshot
I'm building a Compose Multiplatform (CMP) app using Jetpack Compose for iOS and trying to capture a screenshot of a composable UI.
The screenshot works, but the colors are wrong, In the Ui the Error ...
2
votes
0
answers
84
views
LaunchedEffect/DisposableEffect behaves differently in IOS, and its weird
I tested the following code in IOS, and it seems weird for me in Simulator.
@Composable
fun FakeScreen() {
LaunchedEffect(Unit) {
launch {
var count = 0
while(true)...
0
votes
1
answer
106
views
Compose Multiplatform Library [closed]
I'm trying to create a Compose multi-platform library for shared UI components between iOS, Android, and Desktop.
Unfortunately I'm not able to find any source or tutorial to help me to create one. ...
3
votes
0
answers
182
views
Failed to generate cinterop for Google MLKit Barcode Scanner on iOS in Compose Multiplatform (using CocoaPods)
I'm working on a Compose Multiplatform app and I'm trying to integrate Google MLKit Barcode Scanner on the iOS side using CocoaPods.
However, when building the project, I get this error:
Failed to ...
0
votes
1
answer
183
views
Compose Multiplatform composable not rendering inside SwiftUI Form
I'm unable to render a Compose Multiplatform view inside a SwiftUI Form. However, it works outside of the Form.
SwiftUI view:
struct ContentView: View {
var body: some View {
Form {
...
1
vote
2
answers
693
views
CMP/KMP iOS build failed with "No matching variant of androidx.compose.foundation:foundation:1.7.0.."
I have composed a multiplatform project with Android and iOS. The Android app runs and installs successfully, but when I run the iOS app from XCode build, it fails with the below error.
🛑 No ...
0
votes
1
answer
206
views
Compose Multiplatform UI in iOS Share Extension shows blank screen
I'm trying to use Compose Multiplatform UI in an iOS Share Extension, but the Compose content only shows a blank white screen. Here's what I've observed:
The UIViewController is sized correctly (the ...
0
votes
0
answers
125
views
Access string resources from iOS
I've added strings to composeResources folder and I can easily access them in Android using Res.string.my_string_name
What I can't seem to find in documentation is if it's possible to directly access ...
1
vote
0
answers
232
views
How do I fix java.lang.NoSuchMethodError: No static method rememberSnapFlingBehavior in Compose Multiplatform
I'm trying to use CupertinoTimeDatePicker on a compose multiplatform project. Whenever I do that, I always get this error:
java.lang.NoSuchMethodError: No static method rememberSnapFlingBehavior(...
0
votes
1
answer
138
views
Kotlin compose multiplatform, cannot compile with pod SwiftGRPCClient
I'm trying to add the pod SwiftGRPCClient to my KMP project, but I keep hitting this error:
unsupported option '-G' for target 'arm64-apple-ios11.0' (in target
'BoringSSL-GRPC' from project 'Pods')
...
8
votes
1
answer
799
views
How to integrate native iOS navigation (including swipe back) in a Compose Multiplatform project?
I’m working on a Compose Multiplatform project, and I’m looking to implement smooth native iOS navigation specifically for the iOS part of the app, with support for swipe-back gestures (like the ...
3
votes
0
answers
157
views
How to open an external activity or app (Google Maps) from Compose Multiplatform (Android, iOS)?
I'm building a Jetpack Compose Multiplatform app, and I need to open Google Maps from the app when a user clicks a button. This functionality should work on both Android and iOS.
For Android, I'm ...
3
votes
0
answers
253
views
Add new module in Compose Multi Platform (CMP)
Currently, I working in the Compose Multiplatform and want to add "Kotlin Multiplatform Shared Module". The name of module is ":feature:learning", I already add dependency to ...
0
votes
1
answer
217
views
Custom Font Not Displaying in iOS App Using Kotlin Multiplatform
I'm working on a Kotlin Multiplatform project where I'm trying to implement custom fonts for both Android and iOS. The custom fonts work correctly in the Android app but do not appear in the iOS app. ...
2
votes
1
answer
914
views
Not able to read json files from Kotlin Multiplatform library working for android but not working for iOS
I'm using KMM library in my project. I want to access local json files in both iOS and Android from shared resources. I don't want to use files from iOS App.
I have written following code in shared/...
2
votes
1
answer
1k
views
Kmp Kotlin 2.0 with Ksp Koin Annotations doesn't find generated modules on iOS
After migration Kmp project from Kotlin 1.9.24 to 2.0.0 and updating ksp from 1.9.24-1.0.20 to 2.0.0-1.0.24, Android build works but iOS doesn't compile because it can't find generated Koin modules... ...
0
votes
1
answer
491
views
Can we publish compose multiplatform iOS on app Store?
As we all know that now we can develop iOS applications in Kotlin Multiplatform (KMP) with shared UI or using Compose Multiplatform (CMP).
Now CMP is currently in Beta so can we publish compose ...
1
vote
1
answer
869
views
How to detect if a device is an iPad, Tablet or phone in Compose Multiplatform for Android and iOS
I'm working on a Compose Multiplatform project, and I need to adjust the UI based on whether the user is using a tablet, iPad, or phone. I'm looking for a detailed solution that includes platform-...
0
votes
1
answer
142
views
Troubleshooting AVFoundation QR Scanner Stops in Compose Multiplatform
I have integrated the Camera Scanner from AVFoundation into a Compose Multiplatform project. The scanner scans a few times (randomly 5-6 times) before ceasing to scan further, although the live ...
2
votes
0
answers
156
views
Getting linker error, Undefined symbols for architecture arm64: "_OBJC_CLASS_$_Reachability", referenced from"
Getting following error:
warning: Could not find or use auto-linked framework 'Reachability': framework 'Reachability' not found
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$...
2
votes
1
answer
648
views
How to detect Lifecycle of iOS app in Compose Multiplatform
I implemented the lifecycle detector for iOS in the Compose Multiplatform Project using the below code.
val lifecycleDelegate: ComposeUIViewControllerDelegate = object : ...
1
vote
1
answer
1k
views
Using Koin in Compose Multiplatform targeting iOS
I'm working on a KMP project targeting android, ios and desktop and I'm using koin as DI, all works fine in Android and desktop(windows and macOS) but the build for iOS fails.
some of my dependencies ...
8
votes
5
answers
7k
views
Status Bar Color Change in Compose Multiplatform
I want to change the status bar color. I have tried some code in App.kt file MaterialTheme{
}
But it's not affect on statusbar color.
I want to change the status bar color like the background of then ...
4
votes
0
answers
2k
views
Implementing Cross-Platform Camera Functionality in KMM: Saving Images on iOS
I'm working on a Kotlin Multiplatform Mobile (KMM) application and am trying to implement unified camera functionality that allows users to take photos and save them to the device's filesystem, both ...