Unity Firebase iOS构建未定义的符号:_OBJC_CLASS _ $ _ fIRAPP

发布于 2025-02-10 06:57:53 字数 1078 浏览 1 评论 0原文

正式文档之后,我正在尝试将Firebase与我的Unity Project集成到iOS平台的Unity项目。但是,当我尝试根据Xcode IM构建统一构建时,面临以下问题:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRDatabaseReference", referenced from:
      objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
  "_OBJC_CLASS_$_FIRDatabase", referenced from:
      objc-class-ref in libFirebaseCppDatabase.a(database_ios.mm.o)
  "_OBJC_CLASS_$_FIRConfiguration", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
  "_OBJC_CLASS_$_FIRTransactionResult", referenced from:
      objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我乞求我的膝盖

I'm trying to integrate Firebase to my Unity project for iOS platform following the official documentation. However, when i try to compile Unity build from XCode im facing issues like:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRDatabaseReference", referenced from:
      objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
  "_OBJC_CLASS_$_FIRDatabase", referenced from:
      objc-class-ref in libFirebaseCppDatabase.a(database_ios.mm.o)
  "_OBJC_CLASS_$_FIRConfiguration", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
  "_OBJC_CLASS_$_FIRTransactionResult", referenced from:
      objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

pls im begging on my knees

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

逆蝶 2025-02-17 06:57:53

Open Unity-iphone.xcworkSpace not unity-iphone.xcodeproj

如果没有unity-iphone.xcworkspace /code>

如果您对Cocoapods有问题,请重新安装Cocoapods。

https://stackoverflow.com/a/65334677

Open Unity-iPhone.xcworkspace not Unity-iPhone.xcodeproj

if there is no Unity-iPhone.xcworkspace, run pod install

if you have a problem with cocoapods, reinstall cocoapods.

https://stackoverflow.com/a/65334677

贪了杯 2025-02-17 06:57:53

您必须打开.xcworkSpace文件和不是 .xcodeproj文件!

为此,您需要:

  1. 将您的项目cd成终端。通过输入CD,然后拖放整个项目文件夹来执行此操作。按Enter。
  2. 运行pod install命令,然后按Enter。

如果您使用的是最新的M系列MacBook之一,而不是需要运行此命令:

arch -x86_64 pod install

如果一切顺利,则将创建.xcworkspace文件,并将显示在您的项目文件夹中。关闭先前打开的XCode项目,然后打开此。

You must open the .xcworkspace file and not the .xcodeproj file!

To do this you need to:

  1. CD your project into Terminal. Do this by typing in cd and then drag-and-drop your entire project folder. Press enter.
  2. Run the pod install command and press enter.

If you're using one of the latest M-series MacBook's than you need to run this command instead:

arch -x86_64 pod install

If all goes well then a .xcworkspace file will be created and appear in your project folder. Close the previously open Xcode project and open this instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文