【问题标题】:After installing Firebase with CocoaPod, I can no longer build使用 CocoaPod 安装 Firebase 后,我无法再构建
【发布时间】:2020-10-05 15:00:38
【问题描述】:

我正在尝试使用 Cordova 将 Javascript 源代码构建为 iOS 应用程序。

我已经用CocoaPods引入了firebase,我很烦恼,因为我不能构建。

这是愿望

Ignoring file /Users/MYNAME/Library/Developer/Xcode/DerivedData/ProductName/Build/Products/Debug-iphonesimulator/CocoaLumberjack/CocoaLumberjack.framework/CocoaLumberjack, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64

这是错误

未定义的符号大量出现

这是我的 Cocoapod 个人资料。

platform :ios, '10.0'
use_frameworks!

target 'product_name' do
  use_frameworks!
  project 'product_name.xcodeproj'
    use_frameworks!
   pod 'Firebase/Analytics'
   pod 'Firebase/Core'
   pod 'Firebase/Firestore'
   pod 'FirebaseFirestoreSwift', '~> 0.2'
   # ID Instance
   pod 'Firebase/Messaging'
   # config
   pod 'CocoaLumberjack/Swift'
   # Pods for PodTest
   pod 'Fabric', '~> 1.10.2'
   pod 'Crashlytics', '~> 3.14.0'
   # Bluetooth
   pod 'RxBluetoothKit'
   # debug
   pod 'SimulatorStatusMagic', :configurations => ['Debug']
   # design pattern
   pod 'Swinject'
   # zip
   pod 'Zip'
   # Protect UI
   pod 'iOSDFULibrary'
   pod 'libb2s'
end

target 'shareExtension' do
   use_frameworks!
   pod 'Firebase/Analytics'
   pod 'Firebase/Core'
   pod 'Firebase/Firestore'
   pod 'FirebaseFirestoreSwift', '~> 0.2'
   # ID Instance
   pod 'Firebase/Messaging'
   # config
   pod 'CocoaLumberjack/Swift'
   # Pods for PodTest
   pod 'Fabric', '~> 1.10.2'
   pod 'Crashlytics', '~> 3.14.0'
   # Bluetooth
   pod 'RxBluetoothKit'
   # debug
   pod 'SimulatorStatusMagic', :configurations => ['Debug']
   # design pattern
   pod 'Swinject'
   # zip
   pod 'Zip'
   # Protect UI
   pod 'iOSDFULibrary'
   pod 'libb2s'
 end

我的环境

XCode 版本 11.5 CocoaPods 版本 1.9.3

到目前为止我做了什么。

第 1 步:解决 CocoaPods 警告。

第 2 步:错误 ID:未找到库 XXXX → 我用 CocoaPod 安装了 Not Found 框架(并决定安装很多)

STEP3 : 修改库搜索路径

STEP4 : 将 Build Active Architecture Only 明确设置为 No

如果有人遇到过类似的错误,我想对当前的错误提出一些建议。 谢谢。

【问题讨论】:

    标签: ios xcode firebase cordova cocoapods


    【解决方案1】:

    我解决了我的问题。

    我在使用模拟器的构建条件中找到了解释。

    前提: Why does the iOS simulator require i386 and x86_64 symbols even though I'm on an x86_64 system only?

    实现示例: Could not find module for target 'x86_64-apple-ios-simulator'

    在我的项目中,我必须明确 Cordiva - Firebase 的关系。 之后,问题,我做了两个实现。

    第 1 步:找出我无法构建的原因 参考上述文章或在我们的 iPhone 上构建。

    STEP2:组织兼容性 将 CORDOVA 设为父元素,将其他目标设为子元素

    谢谢!!

    【讨论】:

      猜你喜欢
      • 2017-11-28
      • 2018-12-24
      • 2015-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-07
      • 2019-09-29
      • 1970-01-01
      相关资源
      最近更新 更多