我有一个使用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:
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发布于 2020-04-14 22:42:55
我通过更新到最新版本的Sentry解决了这个问题。显然,Firestore和Sentry的3.11.0版本之间存在构建冲突。修复方法是将Sentry的Podfile条目更改为以下内容:
pod 'Sentry'发布于 2021-02-09 14:14:17
在花了几个小时寻找并试图解决这个问题后,唯一的解决方案是添加一个预编译的Firestore SDK。
将此行添加到PodFile
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '7.3.0'有关更多信息,请参阅firestore-ios-sdk-frameworks
https://stackoverflow.com/questions/61106793
复制相似问题