From ae4242d8750cbbb0efcd9d65baf86abb8d081af8 Mon Sep 17 00:00:00 2001 From: John O'Reilly Date: Fri, 20 Sep 2024 18:03:09 +0100 Subject: [PATCH] iOS related updates --- .../PeopleInSpaceSwiftUI/Info.plist | 3 ++- .../kotlin/com/surrus/common/ui/ISSMapView.ios.kt | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/Info.plist b/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/Info.plist index 8044709c..4da8bb34 100644 --- a/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/Info.plist +++ b/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/Info.plist @@ -2,6 +2,7 @@ + CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -45,4 +46,4 @@ UILaunchScreen - \ No newline at end of file + diff --git a/common/src/iOSMain/kotlin/com/surrus/common/ui/ISSMapView.ios.kt b/common/src/iOSMain/kotlin/com/surrus/common/ui/ISSMapView.ios.kt index baece8d0..64ba3533 100644 --- a/common/src/iOSMain/kotlin/com/surrus/common/ui/ISSMapView.ios.kt +++ b/common/src/iOSMain/kotlin/com/surrus/common/ui/ISSMapView.ios.kt @@ -1,8 +1,12 @@ package com.surrus.common.ui import androidx.compose.runtime.Composable +import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.interop.UIKitViewController +import androidx.compose.ui.viewinterop.UIKitInteropInteractionMode +import androidx.compose.ui.viewinterop.UIKitInteropProperties +import androidx.compose.ui.viewinterop.UIKitViewController import com.surrus.common.viewmodel.ISSPositionViewModel import kotlinx.cinterop.ExperimentalForeignApi @@ -14,7 +18,7 @@ actual fun ISSMapView(modifier: Modifier, viewModel: ISSPositionViewModel) { ) } -@OptIn(ExperimentalForeignApi::class) +@OptIn(ExperimentalComposeUiApi::class) @Composable internal fun MapKitView( modifier: Modifier, @@ -23,9 +27,13 @@ internal fun MapKitView( val factory = LocalNativeViewFactory.current UIKitViewController( - modifier = modifier, factory = { factory.createISSMapView(viewModel) - } + }, + modifier = modifier, + properties = UIKitInteropProperties( + interactionMode = UIKitInteropInteractionMode.NonCooperative, + isNativeAccessibilityEnabled = true + ) ) } \ No newline at end of file