使用产品 -> 存档时“找不到 FirebaseCore/FirebaseCore.h”文件

Bri*_*n L 5 xcode ios firebase swift

当我在 xcode 项目上尝试产品 -> 存档时遇到问题。我收到错误消息:

'FirebaseCore/FirebaseCore.h' file not found
Could not build Objective-C module 'Firebase'
Run Code Online (Sandbox Code Playgroud)

仅当我使用通用 iOS 设备作为我的设备执行“产品”->“存档”时,才会发生此错误,而不是在真实设备上运行模拟器时发生。

我在互联网上的其他地方寻找答案,但没有找到有效的解决方案。

正如此链接中的那样,在我的 podfile 中将 Firebase 恢复到版本 4.13.0 对我不起作用。发表评论use frameworks对我来说没有好处;我需要它来用于其他 Pod。

链接建议我这样做:

close Xcode, rm -rf ~/Library/Developer/Xcode/DerivedData/, pod deintegrate, pod install, restart Xcode

However, that does not work either.

One link suggests that I unlink react-native-firebase by adding this to the end of my podfile:

post_install do |installer|
  system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")
end
Run Code Online (Sandbox Code Playgroud)

But that just shifts the error message to No such module 'Alamofire'. Using that I can not get Product -> Archive to recognize Alamofire.

Here is my podfile for reference:

# Uncomment the next line to define a global platform for your project
platform :ios, '11.3'

target 'Spotbirdparking' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Spotbirdparking
  pod 'Stripe'
  pod 'Alamofire'
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage', '~> 5.0'
  pod 'Firebase/Database'
  pod 'SDWebImage'
  pod 'GoogleMaps'
  pod 'GooglePlacePicker'
  pod 'GooglePlaces'
  pod 'IQKeyboardManagerSwift', '~> 5.0'
  pod 'JTAppleCalendar', '~> 7.0' 
  pod 'MBProgressHUD'
  pod 'themis'

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

end
Run Code Online (Sandbox Code Playgroud)

I am very stuck with this, have been looking at it for days. Would really appreciate any help.

Ser*_*nik 0

我遇到了同样的问题,并花了相当多的时间试图解决它。对我来说,解决方案是减少可用架构的数量。不知何故,当我回滚到 Firebase 版本 4.13 时,xcode 返回错误,表明我的 Pod 之一不支持 Arm7 架构。

在“有效架构”字段的项目目标设置中,我只留下了arm64和arm64e架构,并且项目已成功存档为通用IOS设备

我的 Podfile

source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
inhibit_all_warnings!
use_frameworks!

target 'XXX' do
  
  pod 'Fabric', '~> 1.7'
  pod 'Crashlytics', '~> 3.10'
  pod 'Alamofire', '~> 4.5'
  pod 'SwiftHEXColors', '~> 1.2'
  pod 'KeychainSwift', '~> 10.0'
  pod 'SkyFloatingLabelTextField', '~> 3.6'
  pod 'Anyline', '16'
  pod 'TwilioVideo', '3.2'
  pod 'Firebase/Core'

  abstract_target 'Tests' do
    target "XXXUnitTests"

      pod 'Quick'
      pod 'Nimble'
    end
end
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述