rocketraman
02/11/2021, 3:28 AMcocoapods {
summary = "x"
homepage = "x"
frameworkName = "shared"
ios.deploymentTarget = "13.0"
pod("FirebaseAuth", "~> 7.6.0")
}
but the build fails at linkDebugFrameworkIosX64
with:
error: Linking globals named 'cocoapods_FirebaseAuth_FIRAuthErrorDomain_getter_wrapper0': symbol multiply defined!
This was working fine with an older version of FirebaseAuth.rocketraman
02/11/2021, 2:38 PMcocoapods
section (as I have some platform-specific code in iosMain in my shared lib), and there was a symbol conflict of some type. May also be related to how Firebase is linked: https://github.com/firebase/firebase-ios-sdk/blob/master/docs/firebase_in_libraries.md.
Removing FirebaseAuth
from my cocoapods definition has solved the problem.rocketraman
06/30/2022, 2:35 PMcocoapods
section in our shared `build.gradle.kts`:
// We don't reference FirebaseAuth here, because firebase-kotlin-sdk references and there appears to be some
// strangeness happening at link time when adding the dependency here also:
// error: Linking globals named 'cocoapods_FirebaseAuth_FIRAuthErrorDomain_getter_wrapper0': symbol multiply defined!
// -- the build appears to work fine without this here, though I'm not exactly sure why as we have code that
// references it.
// see also: <https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/111>
//pod("FirebaseAuth", "~> 8.11.0")
rocketraman
06/30/2022, 2:36 PMpod 'Firebase/Auth', '~> 8.11.0'
clark
06/30/2022, 2:45 PMPodfile
This is my current cocoapods configuration in build.gradle.kts
. I have tried every combination of having both of the commented out lines being enabled or not and nothing working quite yet.
cocoapods {
summary = "*"
homepage = "*"
framework {
isStatic = false // for SwiftUI preview
}
// pod("FirebaseAuth", "~> 8.14.0")
ios.deploymentTarget = "13.5"
// podfile = project.file("../ios/Podfile")
}
Using kotlin version 1.7.0
clark
06/30/2022, 2:46 PM8.11.0
instead of 8.14.0
?rocketraman
06/30/2022, 2:46 PMrocketraman
06/30/2022, 2:48 PMisStatic = false
. In your podfile do you have use_frameworks!
?clark
06/30/2022, 2:50 PMuse_frameworks!
in my Podfile.rocketraman
06/30/2022, 2:50 PMdev.gitlive:firebase-auth
in your commonMain
source set?clark
06/30/2022, 2:54 PMval commonMain by getting {
.
.
.
// Firebase KMP (3rd party OSS)
implementation("dev.gitlive:firebase-auth:1.6.1")
}
rocketraman
06/30/2022, 2:57 PM1.4.3
.clark
06/30/2022, 2:58 PMrocketraman
06/30/2022, 2:59 PMrocketraman
06/30/2022, 2:59 PMrm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/Caches/CocoaPods/
cd iosApp
pod deintegrate
rm -rf iosApp.xcworkspace/
pod update
clark
06/30/2022, 3:01 PMpod deintegrate
step and cleaning gradle buildsclark
06/30/2022, 3:01 PMclark
06/30/2022, 3:01 PMclark
06/30/2022, 3:02 PMpackForXcode
gradle task?rocketraman
06/30/2022, 3:02 PMpackForXcode
if you use cocoapodsclark
06/30/2022, 3:03 PMrocketraman
06/30/2022, 3:06 PMcocoapods
in build.gradle.kts:
cocoapods {
framework {
baseName = "shared"
}
}
and then in `Podfile`:
target 'iosApp' do
pod 'shared', :path => '../shared'
...
end
clark
06/30/2022, 3:12 PMclark
06/30/2022, 4:17 PMclark
06/30/2022, 4:20 PMbuild.gradle.kts
then I get the
ld: framework not found FirebaseAuth
But if I do include it, then I start getting some other weird error:
Exception in thread "main" java.lang.Error: /var/folders/sy/kt1x1x3s7tnc93dj8b1bzbdc0000gn/T/6822736881599445461.m:1:9: fatal error: module 'Firebase' not found