Vincent
06/15/2023, 3:29 PMFirebaseAuth
dependency using the kotlin cocoapods plugin when targeting macOS, but I'm unable to do it.
I'm creating a KMM project targeting iOS and macOS with the cocoapods plugin. I have successfully added the FirebaseAuth
dep when targeting iOS only, but after adding macOS target, I am not able to make it work.
After gradle sync, the error stack trace is very long, but here is the end:
> Task :shared:podBuildFirebaseAuthMacosx FAILED
[...]
2023-06-15 15:42:08.926 xcodebuild[29125:2268708] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-0012708E0A23801E }
{ platform:macOS, arch:x86_64, id:00006000-0012708E0A23801E }
{ platform:macOS, name:Any Mac }
** BUILD FAILED **
The following build commands failed:
Ld /Users/vincent/AndroidStudioProjects/Testuning5/shared/build/cocoapods/synthetic/OSX/build/Pods.build/Release/PromisesObjC.build/Objects-normal/x86_64/Binary/FBLPromises normal x86_64 (in target 'PromisesObjC' from project 'Pods')
(1 failure)
Do you have any idea?Vincent
06/15/2023, 3:29 PMkotlin {
targetHierarchy.default()
android {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
iosX64()
iosArm64()
iosSimulatorArm64()
macosX64() // Add this line
macosArm64() // Add this line
cocoapods {
summary = "Some description for the Shared Module"
homepage = "Link to the Shared Module homepage"
version = "1.0"
ios.deploymentTarget = "14.1"
osx.deploymentTarget = "13.0" // Add this line
podfile = project.file("../iosApp/Podfile")
framework {
baseName = "shared"
}
pod("FirebaseAuth") // Add this line
}
[...]
Jeff Lockhart
06/15/2023, 3:49 PMVincent
06/15/2023, 3:50 PMJeff Lockhart
06/15/2023, 3:53 PMJeff Lockhart
06/15/2023, 3:54 PMmacosX64
and macosArm64
in your project?Jeff Lockhart
06/15/2023, 3:55 PMJeff Lockhart
06/15/2023, 3:58 PMmacosX64
target?Vincent
06/15/2023, 4:06 PMmacosX64
, I'm faced with the MPP / Gradle: Consumable configurations must have unique attributes
bug. I fixed it thanks to this workaround.
But at the end, I'm still having the exact same problem with the same stack traceJeff Lockhart
06/15/2023, 4:08 PMJeff Lockhart
06/15/2023, 4:09 PMJeff Lockhart
06/15/2023, 4:20 PMVincent
06/15/2023, 4:21 PMmacosX64
and macosArm64
like SwiftDate
and it works well.
So, I'm not sure if it's a problem related to Firebase dependencies or anything elseJeff Lockhart
06/15/2023, 4:25 PMJeff Lockhart
06/15/2023, 4:25 PMJeff Lockhart
06/15/2023, 4:50 PM../build/cocoapods/synthetic/OSX/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.12, but the range of supported deployment target versions is 10.13 to 13.3.99. (in target 'GoogleUtilities' from project 'Pods')
../build/cocoapods/synthetic/OSX/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.12, but the range of supported deployment target versions is 10.13 to 13.3.99. (in target 'GTMSessionFetcher' from project 'Pods')
../build/cocoapods/synthetic/OSX/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.10, but the range of supported deployment target versions is 10.13 to 13.3.99. (in target 'PromisesObjC' from project 'Pods')
It might be that the project needs to be updated to support the latest version of Xcode. I'm assuming you're running Xcode 14.3.1 or similar?Jeff Lockhart
06/15/2023, 4:53 PMJeff Lockhart
06/15/2023, 4:53 PMVincent
06/15/2023, 6:26 PMVincent
06/15/2023, 6:31 PMosx.deploymentTarget = "13.0
) but instead it's related to the version of Xcode I'm running because Xcode doesn't support any more targets like 10.10 and 10.12 that are needed to build the Firebase dependencyVincent
06/15/2023, 6:32 PMJeff Lockhart
06/15/2023, 6:42 PMJeff Lockhart
06/15/2023, 6:43 PMJeff Lockhart
06/15/2023, 6:46 PMJeff Lockhart
06/15/2023, 6:50 PMVincent
06/15/2023, 10:44 PMJeff Lockhart
06/15/2023, 11:16 PM