Cosmin Mihu
05/02/2024, 12:17 PMkoltin {
cocoapods {
summary = "Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0.0"
ios.deploymentTarget = "17.4"
framework {
baseName = "composeApp"
isStatic = true
}
pod("GoogleMaps") {
version = "8.4.0"
extraOpts += listOf("-compiler-option", "-fmodules")
}
}
....
MapView.ios.kt
@OptIn(ExperimentalForeignApi::class)
@Composable
actual fun MapView(modifier: Modifier) {
UIKitView(
modifier = modifier,
factory = {
GMSMapView()
},
update = {
}
)
}
Should do smth extra?Cosmin Mihu
05/02/2024, 12:17 PMld: warning: Could not find or use auto-linked framework 'GoogleMaps': framework 'GoogleMaps' not found
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GMSMapView", referenced from:
in ComposeApp[arm64][2](ComposeApp.framework.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Chris Athanas
05/03/2024, 10:04 PMColton Idle
05/23/2024, 1:56 PMChris Athanas
05/24/2024, 2:33 AMGoogleMapsUtils
to work, some cinterop issue. I reported it and I am sure the Google Maps team is aware of the problem working on an update. I was expecting some announcement at Google I/O 2024, but nothing that I saw.
Did you hear any announcements?Colton Idle
05/24/2024, 8:32 PMVytenis
08/21/2024, 6:25 AMMathew Dostal
10/20/2024, 5:05 PMMathew Dostal
10/20/2024, 9:44 PMColton Idle
10/21/2024, 12:05 AMVytenis
10/21/2024, 6:16 AMMathew Dostal
10/21/2024, 7:25 PMMathew Dostal
10/21/2024, 7:25 PMMathew Dostal
10/22/2024, 3:29 AMMathew Dostal
10/22/2024, 3:29 AMMathew Dostal
10/22/2024, 3:31 AMVytenis
10/22/2024, 6:17 AMColton Idle
10/22/2024, 8:17 AMMathew Dostal
10/22/2024, 1:29 PMMathew Dostal
10/22/2024, 2:14 PMPod::Spec.new do |spec|
spec.name = 'composeApp'
spec.version = '1.0'
spec.homepage = 'Link to the Shared Module homepage'
spec.source = { :http=> ''}
spec.authors = ''
spec.license = ''
spec.summary = 'Some description for the Shared Module'
spec.vendored_frameworks = 'build/cocoapods/framework/ComposeApp.framework'
spec.libraries = 'c++'
spec.ios.deployment_target = '15.4'
spec.dependency 'Google-Maps-iOS-Utils', '6.0.0'
spec.dependency 'GoogleMaps', '9.0.0'
if !Dir.exist?('build/cocoapods/framework/ComposeApp.framework') || Dir.empty?('build/cocoapods/framework/ComposeApp.framework')
raise "
Kotlin framework 'ComposeApp' doesn't exist yet, so a proper Xcode project can't be generated.
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
./gradlew :composeApp:generateDummyFramework
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
end
spec.xcconfig = {
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
}
spec.pod_target_xcconfig = {
'KOTLIN_PROJECT_PATH' => ':composeApp',
'PRODUCT_MODULE_NAME' => 'ComposeApp',
}
spec.script_phases = [
{
:name => 'Build composeApp',
:execution_position => :before_compile,
:shell_path => '/bin/sh',
:script => <<-SCRIPT
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
exit 0
fi
set -ev
REPO_ROOT="$PODS_TARGET_SRCROOT"
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
-Pkotlin.native.cocoapods.archs="$ARCHS" \
-Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
SCRIPT
}
]
spec.resources = ['build/compose/cocoapods/compose-resources']
end
However, it normally is generated and I can dig in tonight to ensure the full gradle process is working in this template one -- if that helpsVytenis
10/23/2024, 7:23 PMMathew Dostal
10/23/2024, 7:37 PMMathew Dostal
10/23/2024, 7:37 PMMathew Dostal
10/23/2024, 7:39 PMVytenis
10/23/2024, 8:24 PMMathew Dostal
10/23/2024, 8:56 PMMathew Dostal
10/23/2024, 8:56 PM