coolcat
11/05/2024, 12:18 PMlib
) that consumes a native iOS dependency via Cocoapods
• consume this library in my iOS app, whose KMP component is called composeApp
• do this without having to manually include the native iOS dependency in my iOS app (i.e. the dependency should be transparently included in the native app)
My composeApp
build.gradle.kts
looks like:
cocoapods {
ios.deploymentTarget = "13.5"
version = "1.0"
summary = "..."
homepage = "..."
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "ComposeAppFramework"
export(project(":lib"))
@OptIn(ExperimentalKotlinGradlePluginApi::class)
transitiveExport = true
}
}
My lib
build.gradle.kts
looks like:
cocoapods {
ios.deploymentTarget = "13.5"
version = "1.0"
summary = "..."
homepage = "..."
pod("FirebaseAuth") {
version = "11.4.0"
}
}
My current problem is when I build my app I get the error:
ld: framework 'FirebaseAuth' not found
Clearly my iOS app cannot find the FirebaseAuth
pod. The generated composeApp.podspec
does not contain a reference to FirebaseAuth
, but the lib
app’s lib.podspec
does:
spec.dependency 'FirebaseAuth', '11.4.0'
How can I make this dependency visible to my iOS app?yousefa2
11/05/2024, 6:28 PMlib
a static framework which will mean it will bundle Firebase as part of its files AFAIK. Otherwise you want to stick with dynamic frameworks then define firebase in iosApp/Podfile
as a dependency