Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carthage doesn't download Firebase binaries on Apple M1 #7039

Closed
d-date opened this issue Nov 26, 2020 · 19 comments · Fixed by #8087
Closed

Carthage doesn't download Firebase binaries on Apple M1 #7039

d-date opened this issue Nov 26, 2020 · 19 comments · Fixed by #8087

Comments

@d-date
Copy link

d-date commented Nov 26, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.2
  • Firebase SDK version: 7.1.0
  • Installation method: Carthage
  • Firebase Component: All
  • macOS version: 11.0
  • Chip: Apple M1

[REQUIRED] Step 2: Describe the problem

Carthage doesn't download any firebase binaries on Apple M1 with Big Sur.
When running carthage update --no-use-binaries --cache-builds --platform iOS, the empty json has downloaded.

*** Downloading binary-only framework FirebaseDynamicLinksBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json"
*** Downloading binary-only framework FirebaseRemoteConfigBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
*** Downloading binary-only framework FirebaseAuthBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
*** Downloading binary-only framework FirebaseCrashlyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json"
*** Downloading binary-only framework FirebasePerformanceBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
*** Downloading binary-only framework FirebaseProtobufBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json"
*** Downloading binary-only framework FirebaseInAppMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseInAppMessagingBinary.json"
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** xcodebuild output can be found in /var/folders/74/lws4xlls7fg_m4pkl499hp6h0000gn/T/carthage-xcodebuild.SOqsl2.log
*** Downloading binary-only framework FirebaseAnalyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
*** Downloading binary-only framework FirebaseAuthBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"
*** Downloading binary-only framework FirebaseCrashlyticsBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json"
*** Downloading binary-only framework FirebaseDynamicLinksBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json"
*** Downloading binary-only framework FirebaseInAppMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseInAppMessagingBinary.json"
*** Downloading binary-only framework FirebaseMessagingBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"
*** Downloading binary-only framework FirebasePerformanceBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
*** Downloading binary-only framework FirebaseProtobufBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json"
*** Downloading binary-only framework FirebaseRemoteConfigBinary at "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json"
{
  "Mac" : [

  ],
  "watchOS" : [

  ],
  "tvOS" : [

  ],
  "commitish" : "7.1.0",
  "iOS" : [

  ]
}

Steps to reproduce:

Relevant Code:

@ryanwilson
Copy link
Member

Hi @d-date - hope you're doing well.

I'm not sure about the --no-use-binaries bit since Firebase only offers a binary distribution of Carthage, but right now Carthage won't work well with Apple silicon Macs using the M1 chip due to Carthage's lack of support for XCFrameworks: Carthage/Carthage#2799

We can't include the simulator slice for arm64 as well as the arm64 device slice, they simply can't be put into a .framework together. It's unfortunate, but until Carthage can support XCFrameworks it's going to be a poor experience for Carthage since you can't work on the simulator. You may be able to still pull the frameworks down if you run on device only, and potentially get rid of the --no-use-binaries flag, I'll try it out on my Mac mini later today.

Sorry about that!

@firebase firebase deleted a comment from google-oss-bot Nov 26, 2020
@d-date
Copy link
Author

d-date commented Nov 26, 2020

Hi @ryanwilson
I'm doing well, thank you🙂

You can ignore no-use-binaries option since binary hasn't effected.

I see your points and it's hard to continue to use Carthage until XCFramework be supported.

I think the workaround to make us to use them in Carthage is Firebase team prepares binary for Apple M1, and prepare other jsons for versioning.
(Looks so hard to do maintenance)

Since SwiftPM is also not work for us now(#6472), it seems the only way to use Firebase in M1 now is use CocoaPods.

Thank you for your help!

@paulb777
Copy link
Member

paulb777 commented Dec 5, 2020

@d-date FYI, the Firebase does also support a binary zip packaging that as of 7.2.0 is comprised of xcframeworks for everything except FirebaseML. See the download at https://github.com/firebase/firebase-ios-sdk/releases/tag/CocoaPods-7.2.0

@d-date
Copy link
Author

d-date commented Dec 7, 2020

@paulb777 Thank you for your suggestion. It's also good way to introduce as pre-build binary (except versioning).

@paulb777
Copy link
Member

Carthage update on plans for binary xcframework support at Carthage/Carthage#3071 (comment)

@mmdumi
Copy link

mmdumi commented Jan 19, 2021

Latest "master" branch of carthage compile xcframework correctly.
Can we have a release version with the right firebase .xcframework that work on M1 macs please ?

@ryanwilson
Copy link
Member

@mmdumi thanks for pointing out that Carthage has merged support. However, it's still not in a release so we can't break all existing Carthage users until at the very least there's a release.

@paulb777
Copy link
Member

Actually, I haven't seen evidence that binary support for xcframeworks has yet merged. The PR that added support for source xcframeworks explicitly says it will be addressed in a subsequent PR.

@codeslubber
Copy link

As I understand it, no-use-binaries is useless on M1 Macs because there are no arm64 binaries. Which seems kind of silly but I think I read you must build each dependency.

@codeslubber
Copy link

It's there now. After getting 0.37.0, it suggested I rerun with a switch to build an XCFramework, which worked, but then a dependency I am getting from SPM is failing on running in the sim because it can't find the x86 binary. Which makes no sense as I am on M1 and Xcode is not running in Rosetta?

@paulb777
Copy link
Member

paulb777 commented Mar 6, 2021

Carthage PR in progress at Carthage/Carthage#3123

@GZaccaroni
Copy link

Any update on this? The PR was merged

@paulb777 paulb777 self-assigned this Mar 30, 2021
@paulb777
Copy link
Member

I'm planning to investigate this week.

@GZaccaroni
Copy link

GZaccaroni commented Mar 30, 2021

@d-date FYI, the Firebase does also support a binary zip packaging that as of 7.2.0 is comprised of xcframeworks for everything except FirebaseML. See the download at https://github.com/firebase/firebase-ios-sdk/releases/tag/CocoaPods-7.2.0

I think the download link you provided doesn't include FirebaseFirestoreSwift. Am I correct?

@paulb777
Copy link
Member

Correct the Swift packages are so far only available via CocoaPods and SPM.

@paulb777
Copy link
Member

On further investigation, the Carthage release PR with the fix is open and not yet released. I'll follow up when 0.38.0 is available.

In the meantime, if anyone wants to validate that the Firebase xcframeworks work with the pre-release, it would be appreciated.

@dmhts
Copy link

dmhts commented Apr 5, 2021

if anyone wants to validate that the Firebase xcframeworks work with the pre-release, it would be appreciated.

@paulb777 Just validated, works for me 👍

@paulb777
Copy link
Member

paulb777 commented Apr 5, 2021

Thanks @dmhts! In that case we should be able to publish a Carthage xcframeworks update soon after 0.38.0 is available.

This was referenced Apr 23, 2021
@paulb777
Copy link
Member

Carthage 0.38.0 is now released.

We'll work on restoring Carthage publishing sometime after the Firebase 8.0.0 release.

@firebase firebase locked and limited conversation to collaborators Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants