0

我有一个使用 Firestore 的快速项目。编译 Firestore 包含的 abseil pod 时存在构建问题。当我尝试构建项目时,我间歇性地收到此错误: absl/base/internal/inline_variable.h file not found.

我正在使用 Xcode 11.4、Cocoapods 1.9.1 和 Swift 5。

我尝试过清除派生数据、更新 pod 和分解 pod。似乎可行的一种解决方法如下,但是当我切换设备进行构建时,错误再次发生。1. 在 Podfile 中注释掉 Firestore。2. 运行bundle exec pod install 3. 打开 Xcode 并构建。4. 在 Podfile 中取消注释 Firestore。5. 运行bundle exec pod install 6. 打开 Xcode 并构建。

这些步骤将暂时起作用。有谁知道解决这个问题的方法?

这是我正在使用的 Podfile:

source 'git@git.myresearchapp.com:MyCompany/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '11.0'

target 'MyApp' do
  use_frameworks!

  pod 'RNCryptor'
  pod 'KeychainSwift'
  pod 'Sentry', git: 'https://github.com/getsentry/sentry-cocoa.git', tag: '3.11.0'
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'UICircularProgressRing', '~>4.1.0'
  pod 'IHKeyboardAvoiding', git: 'git@git.myresearchapp.com:MyCompany/IHKeyboardAvoiding.git', branch: 'master'
  pod 'GTProgressBar'
  pod 'AWSSNS'
  pod 'AWSCognito'
  pod 'AWSS3'
  pod 'Validator', git: 'https://github.com/jlowe234/validator'
  pod 'SwiftyOnboard', git: 'git@git.myresearchapp.com:MyCompany/SwiftyOnboard.git', branch: 'master'

  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Storage'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MyAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end
4

2 回答 2

1

我通过更新到最新版本的 Sentry 解决了这个问题。显然 Firestore 和 Sentry 3.11.0 版本之间存在构建冲突。修复方法是将 Sentry 的 Podfile 条目更改为以下内容:

pod 'Sentry'
于 2020-04-14T14:42:55.393 回答
0

在花费数小时搜索并尝试解决此问题后,唯一的解决方案是添加预编译的 Firestore SDK。

将此行添加到 PodFile

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '7.3.0'

有关更多信息,请参阅firestore-ios-sdk-frameworks

于 2021-02-09T06:14:16.873 回答