Skip to content

Commit

Permalink
Merge pull request #376 from joreilly/ios_updates
Browse files Browse the repository at this point in the history
iOS related updates
  • Loading branch information
joreilly authored Sep 20, 2024
2 parents c69f28c + ae4242d commit 3439aa3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key><true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down Expand Up @@ -45,4 +46,4 @@
<key>UILaunchScreen</key>
<dict/>
</dict>
</plist>
</plist>
14 changes: 11 additions & 3 deletions common/src/iOSMain/kotlin/com/surrus/common/ui/ISSMapView.ios.kt
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -14,7 +18,7 @@ actual fun ISSMapView(modifier: Modifier, viewModel: ISSPositionViewModel) {
)
}

@OptIn(ExperimentalForeignApi::class)
@OptIn(ExperimentalComposeUiApi::class)
@Composable
internal fun MapKitView(
modifier: Modifier,
Expand All @@ -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
)
)
}

0 comments on commit 3439aa3

Please sign in to comment.