firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Swift 5.9.2( Xcode 15.2) compilation issue with v10.24.0 using Carthage XCFramework

Open RajaveluC opened this issue 4 months ago • 10 comments

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.

RajaveluC avatar Apr 16 '24 13:04 RajaveluC

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Apr 16 '24 13:04 google-oss-bot

Thanks for reporting, @RajaveluC. It seems that your issue is related to #12794.

rizafran avatar Apr 16 '24 14:04 rizafran

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

paulb777 avatar Apr 16 '24 16:04 paulb777

Hi @RajaveluC, are you importing Firebase into an app target or something else (e.g. framework, extension, etc.)?

ncooke3 avatar Apr 16 '24 17:04 ncooke3

Hi @ncooke3 , I am importing Firebase directly into the app target.

RajaveluC avatar Apr 17 '24 05:04 RajaveluC

@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?

ncooke3 avatar Apr 17 '24 16:04 ncooke3

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.

RajaveluC avatar Apr 18 '24 07:04 RajaveluC

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.

ncooke3 avatar Apr 18 '24 14:04 ncooke3

Yes @ncooke3 . I tried that already. Still the same results. I guess I will have to wait for 10.25.0.

RajaveluC avatar Apr 22 '24 05:04 RajaveluC

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.

andrewheard avatar Apr 30 '24 19:04 andrewheard

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!

google-oss-bot avatar May 07 '24 01:05 google-oss-bot

See also conversation in https://github.com/firebase/firebase-ios-sdk/issues/12877

ncooke3 avatar May 10 '24 17:05 ncooke3