Undefined symbol “_OBJC_CLASS_$_GIDSignIn”

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.4 (12D4e)
  • Firebase SDK version: 7.5.1
  • Installation method: Swift Package Manager
  • Firebase Component: all but issue related to auth I believe

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

I included Firebase using Swift Package Manager and upon compilation of my project I get the error:

Undefined symbols for architecture arm64:
OBJC_CLASS$_GIDSignIn”, referenced from:
objc-class-ref in VCReauthenticate.o
objc-class-ref in AppDelegate.o
objc-class-ref in VCLogin.o
objc-class-ref in VCAccount.o
ld: symbol(s) not found for architecture arm64

1 possible answer(s) on “Undefined symbol “_OBJC_CLASS_$_GIDSignIn”

  1. I managed to fix with following:

    • download the Firebase zip distribution
    • unzip it and notice the folder GoogleSignIn
    • moved this complete folder under my project, I already had a folder “external” (for other not-own-written-stuff), put it under there (this makes sure its made a part of your project’s files e.g. stored in git)
    • Out of this folder drag over ONLY the following items to your Xcode project navigator (this makes Xcode to include them in your build process):
      • GoogleSignIn.bundle
      • GTMAppAuth.xcframework
      • AppAuth.xcframework
      • GoogleSignIn.framework
    • do not drag everything otherwise you will get compiler error “duplicate symbols” while building!

    (@paulb777 thanks for the help)