firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Swift 5.9.2( Xcode 15.2) compilation issue with v10.24.0 using Carthage XCFramework
Description
Hi @paulb777
This is a follow up on https://github.com/firebase/firebase-ios-sdk/issues/12388
I am currently using Xcode 15.2 and we cannot upgrade to Xcode 15.3 due to other reasons. After upgrading the XCFrameworks of Firebase SDKs to v 10.24.0 from v10.15.0, I am observing the following error during the compilation of the app in Xcode 15.2 and unable to proceed. Please help to resolve this issue as we are running into a deadline (May 1st) to upgrade Firebase SDK as mandated by Apple [https://developer.apple.com/support/third-party-SDK-requirements/]
Expected: Compile the app successfully with v10.24.0 on Xcode 15.2.
Actually happened: Failed to build module 'FirebaseCrashlytics'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)'). Please select a toolchain which matches the SDK.
Similar reports: https://github.com/firebase/firebase-ios-sdk/issues/11947 https://github.com/firebase/firebase-ios-sdk/issues/12388
Reproducing the issue
Define the following in the Cartfile and run the "carthage update --use-xcframeworks --no-use-binaries --platform iOS" command.
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 10.24.0 binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json" == 10.24.0 binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json" == 10.24.0 binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json" == 10.24.0 binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" == 10.24.0
I tried the same with SPM and the same issue was observed.
Firebase SDK Version
10.24.0
Xcode Version
15.2
Installation Method
Carthage
Firebase Product(s)
Analytics, Crashlytics, Messaging, Performance, Remote Config
Targeted Platforms
iOS
Relevant Log Output
Failed to build module 'FirebaseCrashlytics'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)'). Please select a toolchain which matches the SDK.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Thanks for reporting, @RajaveluC. It seems that your issue is related to #12794.
As discussed in #11947, we have not been able to reproduce this, so a full repro case would be helpful.
In any case, we're planning to update the binary build to Xcode 15.2 in the 10.25.0 release due out the week of April 29th. See #12737
Hi @RajaveluC, are you importing Firebase into an app target or something else (e.g. framework, extension, etc.)?
Hi @ncooke3 , I am importing Firebase directly into the app target.
@RajaveluC, thanks for confirming. I'm unfortunately not able to reproduce by using 15.2 and the Cartfile snippet to shared in the original post. Are you able to reproduce this in a new, blank project and share it with me?
Hi @ncooke3 I tried to replicate our project setup into a demo project to test it. It works fine on the demo project. I am not sure what kind of settings are preventing the SDK from compiling in our actual project. Please note that the demo project uses xcodegen to generate the project file.
Thanks, @RajaveluC. Have you tried doing a fresh install of 10.24.0? So, delete all Firebase XCFrameworks and the Carthage build folder so there are no Firebase related artifacts left in your workspace. Then, re-add Firebase using Carthage.
In any case, as Paul said above, the issue should hopefully be fixed in the next Firebase release as the binaries will be built with Xcode 15.2.
Yes @ncooke3 . I tried that already. Still the same results. I guess I will have to wait for 10.25.0.
Hi @RajaveluC, https://github.com/firebase/firebase-ios-sdk/releases/tag/10.25.0 is now published for Carthage. Please let us know if this resolves the issue you were seeing on 10.24.0.
Hey @RajaveluC. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
See also conversation in https://github.com/firebase/firebase-ios-sdk/issues/12877