Skip to content

ARM64 Simulator support #6520

@imWildCat

Description

@imWildCat

Step 0: Are you in the right place?

  • For issues or feature requests related to the code in this repository
    file a Github issue.
    • If this is a feature request please use the Feature Request template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general (non-iOS) Firebase discussion, use the firebase-talk
    google group.
  • For backend issues, console issues, and other non-SDK help that does not fall under one
    of the above categories, reach out to
    Firebase Support.
  • Once you've read this section and determined that your issue is appropriate for
    this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Xcode version: Version 12.0 (12A7209)
  • Firebase SDK version: added below
  • Firebase Component: added below
  • Component version: added below
  • Installation method: CocoaPods (select one)
  - Firebase (6.32.2):
    - Firebase/Core (= 6.32.2)
  - Firebase/ABTesting (6.32.2):
    - Firebase/CoreOnly
    - FirebaseABTesting (~> 4.2.0)
  - Firebase/Analytics (6.32.2):
    - Firebase/Core
  - Firebase/Core (6.32.2):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.8.2)
  - Firebase/CoreOnly (6.32.2):
    - FirebaseCore (= 6.10.2)
  - Firebase/Crashlytics (6.32.2):
    - Firebase/CoreOnly
    - FirebaseCrashlytics (~> 4.6.0)
  - Firebase/RemoteConfig (6.32.2):
    - Firebase/CoreOnly
    - FirebaseRemoteConfig (~> 4.9.0)
  - FirebaseABTesting (4.2.0):
    - FirebaseCore (~> 6.10)
  - FirebaseAnalytics (6.8.2):
    - FirebaseCore (~> 6.10)
    - FirebaseInstallations (~> 1.6)
    - GoogleAppMeasurement (= 6.8.2)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
    - GoogleUtilities/MethodSwizzler (~> 6.7)
    - GoogleUtilities/Network (~> 6.7)
    - "GoogleUtilities/NSData+zlib (~> 6.7)"
    - nanopb (~> 1.30906.0)
  - FirebaseCore (6.10.2):
    - FirebaseCoreDiagnostics (~> 1.6)
    - GoogleUtilities/Environment (~> 6.7)
    - GoogleUtilities/Logger (~> 6.7)
  - FirebaseCoreDiagnostics (1.6.0):
    - GoogleDataTransport (~> 7.2)
    - GoogleUtilities/Environment (~> 6.7)
    - GoogleUtilities/Logger (~> 6.7)
    - nanopb (~> 1.30906.0)
  - FirebaseCrashlytics (4.6.0):
    - FirebaseCore (~> 6.10)
    - FirebaseInstallations (~> 1.6)
    - GoogleDataTransport (~> 7.2)
    - nanopb (~> 1.30906.0)
    - PromisesObjC (~> 1.2)
  - FirebaseInstallations (1.7.0):
    - FirebaseCore (~> 6.10)
    - GoogleUtilities/Environment (~> 6.7)
    - GoogleUtilities/UserDefaults (~> 6.7)
    - PromisesObjC (~> 1.2)
  - FirebaseRemoteConfig (4.9.0):
    - FirebaseABTesting (~> 4.2)
    - FirebaseCore (~> 6.10)
    - FirebaseInstallations (~> 1.6)
    - GoogleUtilities/Environment (~> 6.7)
    - "GoogleUtilities/NSData+zlib (~> 6.7)"

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Create a minimal demo project on arm Mac, cannot build this project.

ld: in /Users/myusername/Downloads/202009/temp/My_Project/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_e321ed8e3db06efc9803f6c008e67a34.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/myusername/Downloads/202009/temp/My_Project/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture arm64

Relevant Code:

None.

// TODO(you): code here to reproduce the problem

Activity

imWildCat

imWildCat commented on Nov 6, 2020

@imWildCat
Author

@ryanwilson could you help to prioritize this issue? It can be consistently reproduced, even if the version is 7.0:

ld: in /Users/username/Downloads/202011/temp/My_Project/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_a8eeba373b74508311b8b22b8d3202a6.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/username/Downloads/202011/temp/My_Project/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture arm64
ryanwilson

ryanwilson commented on Nov 6, 2020

@ryanwilson
Member

Hi @imWildCat - thanks for the report. This is definitely top of mind as we're expecting the first Apple silicon Macs to be announced next week, the plan is to have something ASAP and included in the next release or two (likely not next release though at this point).

imWildCat

imWildCat commented on Nov 6, 2020

@imWildCat
Author

@ryanwilson thanks for your prompt reply! Really appreciate your efforts!

bencIsTheGoat

bencIsTheGoat commented on Nov 6, 2020

@bencIsTheGoat
imWildCat

imWildCat commented on Nov 8, 2020

@imWildCat
Author

@bcutler94 Great, thank you!

Update: this looks like a workaround?

douglashill

douglashill commented on Nov 10, 2020

@douglashill

@ryanwilson sorry if this is slightly off topic for this issue, but do your current plans include support for arm64 for Mac Catalyst apps too? Happy to open a new issue if that would help to track this.

Bjornftw

Bjornftw commented on Nov 17, 2020

@Bjornftw

Same issue here with the new M1 Silicon MacBook. Hope there will be a fix soon

34 remaining items

DominikButz

DominikButz commented on Dec 4, 2020

@DominikButz

Maybe a stupid question, but: now that v7.2.0 adds arm64 simulator support, does that mean that we can now remove arm64 from EXCLUDED_ARCHS again?

yes, that is exactly my experience. You have to remove exclude arm64 for iOS Simulator: not only for each pod but also for your project and the pods project. See my post above. And it makes sense because now iOS simulator can basically run like on the iPhone with the arm64 instructions.

randyhill

randyhill commented on Dec 7, 2020

@randyhill

My project which has Firebase dependencies runs fine on a physical device. To make it run in the simulator, I have to run Xcode with Rosetta 2.
What I don't quite grasp (maybe someone can enlighten me): the Simulator should run on the arm64 architecture on an M1 mac, right? So why do I have to exclude arm64 in my project for the iOS Simulator if I run it on an M1 mac? It makes sense if Xcode (and probably the simulator) run in Rosetta 2 and also if Xcode is running on an Intel Mac - because then the instructions for x86 are executed.

Sorry for the troubles - are you using CocoaPods? If so, did you try the new instructions? If you're still having issues after trying that out, please let us know and we can help further.

Where are these new instructions? That link is broken.

ryanwilson

ryanwilson commented on Dec 7, 2020

@ryanwilson
Member
darrenp2022a

darrenp2022a commented on Dec 9, 2020

@darrenp2022a

With SPM same issue, I also tried removing package and re-adding. I'm not able to use ARM64 due to another package breaking.

FYI, If I try using 7.2.0-M1 then I get an error installing the package when I get to analytics (because this wasn't in that branch.

FYI, if you open Xcode under rosetta things work, obviously slower

ericpapamarcos

ericpapamarcos commented on Dec 9, 2020

@ericpapamarcos

Thanks for the report, Google Sign In still hasn't migrated to XCFrameworks. I'll reach out to the team again to discuss migrating.

@ryanwilson What's the best way to track status of Apple Silicon Simulator support for the Google Sign-In SDK?

jeremyfrancis

jeremyfrancis commented on Dec 15, 2020

@jeremyfrancis

Find Xcode in Finder and press CMD+I and select the application to open with Rosetta 2. I did the same for my Terminal. This fixed all my issues with my new Mac mini M1 chip!

darrenp2022a

darrenp2022a commented on Dec 15, 2020

@darrenp2022a

Find Xcode in Finder and press CMD+I and select the application to open with Rosetta 2. I did the same for my Terminal. This fixed all my issues with my new Mac mini M1 chip!

This doesn't fix the issue :), its a work around I mentioned above, but this makes Xcode run much slower. For me, I have the beta Xcode running as native M1, and prod Xcode running with Rosetta (I have disabled analytics in most of my projects except one that requires it)

paulb777

paulb777 commented on Dec 16, 2020

@paulb777
Member

@jeremyfrancis @darrenpedley No work arounds should be necessary if you follow the instructions at https://github.com/firebase/firebase-ios-sdk/blob/master/AppleSilicon.md

darrenp2022a

darrenp2022a commented on Dec 16, 2020

@darrenp2022a

@jeremyfrancis @darrenpedley No work arounds should be necessary if you follow the instructions at https://github.com/firebase/firebase-ios-sdk/blob/master/AppleSilicon.md

@paulb777 I have followed the instructions referenced, and get the same issue as described, the work around listed is the only way to compile.

FYI I'm using:
Latest Xcode and Xcode beta
SPM with Firebase 7.3.1 (updated today)
ZIP 2.1.1

Analytics causes the error, using excluded arm64 allows compilation, however, ZIP breaks. The workaround above (i.e. using Rosetta) allows compilation without using excluded arm64.

paulb777

paulb777 commented on Dec 16, 2020

@paulb777
Member

@darrenpedley What does ZIP 2.1.1 mean? The Analytics included in 7.3.1 includes a slice for the arm64 simulator? Are you trying Catalyst? If so, that's a separate issue - #7043

darrenp2022a

darrenp2022a commented on Dec 16, 2020

@darrenp2022a

#7043

@paulb777 Zip 2.1.1 is a different SPM package, that doesn't support the excluded Arm64, not related to Firebase, but .
No I'm not using catalyst, this is purely a iOS iPhone / iPad app.

This is the error I get

Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIRAnalytics", referenced from:

If I remove Analytics, issue goes away,
If I open Xcode using rosetta issue goes away

darrenp2022a

darrenp2022a commented on Dec 16, 2020

@darrenp2022a

Hi,

I'm pretty sure I deleted my DerivedData folder before but looks like cleaning that up, rebooting and clean build has resolved my issue, no longer have to start in Rosetta, etc.

Thanks for feedback and assistance.

locked and limited conversation to collaborators on Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @paulb777@ericpapamarcos@gohnjanotis@alexiscreuzot@randyhill

      Issue actions

        ARM64 Simulator support · Issue #6520 · firebase/firebase-ios-sdk