首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在abseil中使用Swift和Cocoapods时发生Firestore构建错误

在abseil中使用Swift和Cocoapods时发生Firestore构建错误
EN

Stack Overflow用户
提问于 2020-04-09 01:44:30
回答 2查看 551关注 0票数 0

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

我使用的是Xcode11.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:

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

发布于 2020-04-14 22:42:55

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

代码语言:javascript
复制
pod 'Sentry'
票数 1
EN

Stack Overflow用户

发布于 2021-02-09 14:14:17

在花了几个小时寻找并试图解决这个问题后,唯一的解决方案是添加一个预编译的Firestore SDK。

将此行添加到PodFile

代码语言:javascript
复制
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '7.3.0'

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61106793

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档