akaffenberger / firebase-ios-sdk-xcframeworks

A small mirror for https://github.com/firebase/firebase-ios-sdk, to add support for binary (xcframework) distribution with swift package manager.
MIT License
134 stars 32 forks source link

Undefined symbol: _OBJC_CLASS_$_FIRCrashlytics ... #43

Closed cohen72 closed 1 year ago

cohen72 commented 1 year ago

I've added this package as a dependency to another swift package I have created MyPackage, and from Xcode's Project/ProjectDependency settings, I've added https://github.com/me/mypackage as a dependency.

Now, when attempting to compile my project, I receive the following errors:

Build target MyPackage
Package MyPackage | Configuration Staging | Destination My iPhone | SDK iOS 15.5
Link MyPackage_PackageProduct (arm64)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in NanitCore.o
  "_OBJC_CLASS_$_FIRRemoteConfigSettings", referenced from:
      objc-class-ref in NanitCore.o
  "_OBJC_CLASS_$_FIRRemoteConfig", referenced from:
      objc-class-ref in NanitCore.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

image

I'm not sure what I'm missing, but it seems that when attempting to compile MyPackage which has firebase-ios-sdk-xcframeworks as a dependency, it fails ... Any ideas?

akaffenberger commented 1 year ago

@cohen72 Would you be able to share what the Package.swift file looks like for MyPackage?

I just tried a small example and wasn't able to reproduce. I created a package called MyLibrary that imports and uses FirebaseCrashlytics, FirebaseRemoteConfig, and GoogleSignIn. I then added MyLibrary to an xcode project, used the test class I created, and was able to compile and run.

akaffenberger commented 1 year ago

Closing until further information is received from OP