简体   繁体   English

将Firebase Framework添加到iOS未定义符号

[英]Adding Firebase Framework to iOS Undefined symbols

I am trying to add Firebase Messaging to my iOS Project. 我正在尝试将Firebase Messaging添加到我的iOS项目中。 I can't use Pods because something with them is broken on my Developermachine. 我无法使用Pod,因为与它们有关的某些东西在我的Developermachine上坏了。 So I am adding the Framework manually. 所以我要手动添加框架。 As mentioned by the Readme I added all Frameworks of the Analytics and Messaging Folders along with the Firebase.h to my Xcode Project. 如自述文件所述,我将所有Analytics(分析)和Messaging文件夹框架以及Firebase.h都添加到了Xcode项目中。 I added Storekit.framework, libz, libc++ and libsqlite3.0 as mentioned on other Stackoverflow Questions to get rid of the most linker errors. 如其他Stackoverflow问题中所述,我添加了Storekit.framework,libz,libc ++和libsqlite3.0,以摆脱大多数链接器错误。 But still I can't compile/link my project because of the following errors: 但是由于以下错误,我仍然无法编译/链接我的项目:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SKPaymentQueue", referenced from:
      objc-class-ref in FirebaseAnalytics(FIRAInAppPurchaseTransactionReporter_ca1fe3eb82b823d5f96d3f8b4baedc9c.o)
  "_OBJC_CLASS_$_SKProductsRequest", referenced from:
      objc-class-ref in FirebaseAnalytics(FIRAProductsRequest_8f770071350872416d311668917f3a41.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I don't get why they are missing or which library I need to add to make this run. 我不知道为什么它们会丢失,或者我需要添加哪个库才能运行。 Does someone know what to do ? 有人知道该怎么办吗?

And I should also mention that I am using Qt on this project. 我还应该提到我在这个项目上使用了Qt。

Thanks in advance, 提前致谢,

I had the same issue. 我遇到过同样的问题。

I don't know why this framework is required, but i added StoreKit.framework to Linked Frameworks and Libraries which made it compile. 我不知道为什么需要这个框架,但是我将StoreKit.framework添加到了Linked Frameworks and Libraries中,从而使其得以编译。

Hope it helps! 希望能帮助到你! 👍 👍

You can try go to the entry header file of your project then add 您可以尝试转到项目的条目头文件,然后添加

#import "Firebase.h"

to see if problem is solved. 看看问题是否解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM