构建 Unity/Firebase 项目时 XCode 中架构 arm64 的未定义符号

Undefined symbols for architecture arm64 in XCode while building a Unity/Firebase project

每次我尝试在 Xcode 上构建我的 Unity 项目时,我都会收到此构建时错误。

使用完全相同的 firebase 包的其他游戏不会发生这种情况。我已经尝试使用 pod update 进行更新,但仍然没有成功。

Undefined symbols for architecture arm64:
  "firebase::FutureHandle::FutureHandle(firebase::FutureHandle const&)", referenced from:
      firebase::remote_config::Fetch(unsigned long long) in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
      ____ZN8firebase13remote_config5FetchEy_block_invoke in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
      ___copy_helper_block_ea8_40c37_ZTSKN8firebase16SafeFutureHandleIvEE in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::FutureHandle::Detach()", referenced from:
      firebase::remote_config::Fetch(unsigned long long) in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::FutureHandle::FutureHandle(unsigned long, firebase::detail::FutureApiInterface*)", referenced from:
      _Firebase_RemoteConfig_Fetch__SWIG_1 in libFirebaseCppRemoteConfig.a(remote_config_08c4a1f5237ed5b16a396c81df6a9ee4.o)
      firebase::remote_config::FetchLastResult() in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::FutureHandle::FutureHandle()", referenced from:
      _Firebase_RemoteConfig_Fetch__SWIG_1 in libFirebaseCppRemoteConfig.a(remote_config_08c4a1f5237ed5b16a396c81df6a9ee4.o)
      firebase::remote_config::FetchLastResult() in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::ReferenceCountedFutureImpl::CompleteHandle(firebase::FutureHandle const&)", referenced from:
      void firebase::ReferenceCountedFutureImpl::CompleteInternal<void, void firebase::ReferenceCountedFutureImpl::CompleteInternal<void>(firebase::FutureHandle const&, int, char const*)::'lambda'(void*)>(firebase::FutureHandle const&, int, char const*, void firebase::ReferenceCountedFutureImpl::CompleteInternal<void>(firebase::FutureHandle const&, int, char const*)::'lambda'(void*) const&) in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::ReferenceCountedFutureImpl::ReleaseMutexAndRunCallbacks(firebase::FutureHandle const&)", referenced from:
      void firebase::ReferenceCountedFutureImpl::CompleteInternal<void, void firebase::ReferenceCountedFutureImpl::CompleteInternal<void>(firebase::FutureHandle const&, int, char const*)::'lambda'(void*)>(firebase::FutureHandle const&, int, char const*, void firebase::ReferenceCountedFutureImpl::CompleteInternal<void>(firebase::FutureHandle const&, int, char const*)::'lambda'(void*) const&) in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::FutureHandle::operator=(firebase::FutureHandle const&)", referenced from:
      _Firebase_RemoteConfig_Fetch__SWIG_1 in libFirebaseCppRemoteConfig.a(remote_config_08c4a1f5237ed5b16a396c81df6a9ee4.o)
      firebase::remote_config::FetchLastResult() in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "firebase::FutureHandle::~FutureHandle()", referenced from:
      _Firebase_RemoteConfig_Fetch__SWIG_1 in libFirebaseCppRemoteConfig.a(remote_config_08c4a1f5237ed5b16a396c81df6a9ee4.o)
      firebase::remote_config::Fetch(unsigned long long) in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
      firebase::remote_config::FetchLastResult() in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
      ____ZN8firebase13remote_config5FetchEy_block_invoke in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
      ___destroy_helper_block_ea8_40c37_ZTSKN8firebase16SafeFutureHandleIvEE in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我们在 Unity 和 Firebase 中遇到了类似的问题,这是由 Plugins/iOS 目录中的 Firebase 库的旧副本引起的。 Nuking 那些为我们修复了构建