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

FR: Add missing support for Apple Silicon Mac Catalyst apps when integrating Firebase manually with xcframeworks. #7007

Closed
stephanejais opened this issue Nov 21, 2020 · 13 comments · Fixed by #7546
Assignees
Labels
AppleSilicon type: feature request zip Issues related to binary distribution (zip file) zip-builder Tools related to building the zip file.
Milestone

Comments

@stephanejais
Copy link

stephanejais commented Nov 21, 2020

Feature proposal

  • Add the missing Apple Silicon slices to the maccatalyst variant of the xcframeworks in Firebase.zip.

The Release 7.1.0 of Firebase.zip containing all the .xcframeworks for manual integration does not contain an arm64 slice for the maccatalyst variant.
As a result, when creating an archive for "Any Mac (Apple Silicon, Intel)", linking fails with the following errors:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in XXX
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in XXXX
  "_OBJC_CLASS_$_FIRDatabase", referenced from:
      objc-class-ref in XXX
  "_OBJC_CLASS_$_FIRRemoteConfig", referenced from:
      objc-class-ref in XXX
  "_OBJC_CLASS_$_FIRTransactionResult", referenced from:
      objc-class-ref in XXX
...
@paulb777
Copy link
Member

paulb777 commented Nov 21, 2020

@stephanejais We currently have no plans to enable Apple Silicon simulator support via Carthage primarily because Carthage does not support .xcframeworks. See Carthage/Carthage#2799

@stephanejais
Copy link
Author

stephanejais commented Nov 21, 2020

@stephanejais We currently have no plans to enable Apple Silicon simulator support via Carthage primarily because Carthage does not support .xcframeworks. See Carthage/Carthage#2799

@paulb777 Thanks for your reply. That's not what I'm asking: I just want to ship Firebase in my Mac Catalyst universal app. I'm integrating manually with what's in Firebase.zip, not using Carthage.

@stephanejais stephanejais changed the title FR: Add missing support for Apple Silicon Mac Catalyst apps FR: Add missing support for Apple Silicon Mac Catalyst apps when integrating Firebase manually with xcframeworks. Nov 21, 2020
@paulb777 paulb777 added zip-builder Tools related to building the zip file. and removed Carthage labels Nov 21, 2020
@paulb777
Copy link
Member

@stephanejais Oops, sorry for the misunderstanding. I juxtaposed your issue with the previous one.

It should be feasible to add the catalyst arm64 simulator slice. We'll investigate.

@paulb777 paulb777 added the zip Issues related to binary distribution (zip file) label Nov 21, 2020
@ryanwilson
Copy link
Member

Hmm this isn't as straightforward as I would have hoped, but still working on it.

Using this build command:

/Applications/Xcode_12.0.1.app/Contents/Developer/usr/bin/xcodebuild build -configuration release -workspace /var/folders/qc/rcfpdrfj7694bf2fjgx90yq800_dx3/T/ZipRelease/2020-11-25T11-45-55/project/FrameworkMaker.xcworkspace -scheme nanopb GCC_GENERATE_DEBUGGING_SYMBOLS=NO ARCHS=arm64 VALID_ARCHS=arm64 ONLY_ACTIVE_ARCH=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES SUPPORTS_MACCATALYST=YES BUILD_DIR=/var/folders/qc/rcfpdrfj7694bf2fjgx90yq800_dx3/T/ZipRelease/2020-11-25T11-45-55/project/macosx -sdk macosx "OTHER_CFLAGS=$(value) -DFIREBASE_BUILD_ZIP_FILE" CODE_SIGN_IDENTITY=-

Results in a warning:

warning: There are no architectures to compile for because all architectures in VALID_ARCHS (arm64) are also in EXCLUDED_ARCHS (arm64, arm64e). (in target 'nanopb' from project 'Pods')

I'm wondering if the SUPPORTS_MACCATALYST is internally overriding the arm64 flag. I'll keep digging and see what I can find out. Thanks for the report!

@carlo-
Copy link

carlo- commented Nov 26, 2020

@ryanwilson I believe you have to use Xcode 12.2 to build for Apple Silicon, and it looks like you're using 12.0.1

@ryanwilson
Copy link
Member

@carlo- thanks I'll give that a go - I do believe I tried with 12.2 before and saw the same results, but I'll try it again.

@ryanwilson
Copy link
Member

Would you look at that - looks like it was another case of having too many Xcode versions installed, I must have forgotten to run xcode-select in my testing. Thanks for pointing it out! It brings up a bit of a challenge since the majority of developers are still using an older Xcode version and it's not backwards compatible, but we'll chat within the team and figure something out.

@ryanwilson
Copy link
Member

#7044 to fix the technical issue, still need to sort out the distribution and Xcode version challenge.

@paulb777
Copy link
Member

While we still need to support Xcode 12.0 binaries in the default distribution, one approach would be providing instructions for self-building with newer Xcode versions.

@steipete
Copy link
Contributor

steipete commented Feb 17, 2021

I've given enabling Crashlytics for Catalyst another chance with the 7.6 release, but above is a blocker. I'm unable to run our app on Apple Silicon anymore, so have to remove Crashlytics again, for now. (Integration is via xcframework, manually)

@paulb777
Copy link
Member

Thanks for letting us know. We'll consider bumping the minimum supported version with the zip distribution to Xcode 12.2 in the Firebase 7.7.0 release. @ryanwilson What do you think?

@ryanwilson
Copy link
Member

SGTM - let's build with Xcode 12.2 for the zip to ensure this use case is supported. Thanks for revisiting @steipete!

@steipete
Copy link
Contributor

Thanks folks, much appreciated!!

@firebase firebase locked and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AppleSilicon type: feature request zip Issues related to binary distribution (zip file) zip-builder Tools related to building the zip file.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants