firebase-ios-sdk: FirebaseAnalytics symbols not found when installed via SPM

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.0 beta 6 (12A8189n)
  • Firebase SDK version: 6.32-spm-beta
  • Firebase Component: Analytics
  • Component version: 6.32.0
  • Installation method: Swift Package Manager

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

  • I’ve installed Firebase via SPM using the instructions found at this page.
  • I’ve also added the -ObjC flag as mentioned because I am using FirebaseAnalytics.

When compiling my project I get a bunch of errors like the ones bellow:

Undefined symbols for architecture arm64:
  "_kFIRParameterShipping", referenced from:
      {edited}
  "_kFIREventAddPaymentInfo", referenced from:
      {edited}
  "_kFIRParameterCheckoutOption", referenced from:
      {edited}
  "_kFIREventCheckoutProgress", referenced from:
      {edited}
  ...
ld: symbol(s) not found for architecture arm64

I get the same errors when trying to run on the simulator but the architecture is x86_64 instead (obviously).

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

Hi @zeusent - sorry for the troubles you’re seeing.

Based on your reproduction steps, I’m unable to reproduce this. I created a new project and followed the instructions linked, added the -ObjC flag, using import Firebase or import FirebaseAnalytics and then calling Analytics.logEvent("Test", [:]) succeeds in a simulator build as well as building for device (I tested via Archiving).

A few other questions to try to make progress:

  • Was it a blank project that you started with or an existing project?
  • If it was an existing project, did you have Firebase integrated already? How did you remove it?