为什么我在尝试运行我的 iOS 应用程序时收到错误“找不到 FirebaseCore/FirebaseCore.h"文件 [英] Why am I getting the error ''FirebaseCore/FirebaseCore.h' file not found' when trying to run my iOS app

查看:40
本文介绍了为什么我在尝试运行我的 iOS 应用程序时收到错误“找不到 FirebaseCore/FirebaseCore.h"文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用带有 M1 芯片的 MacBook Pro,该芯片来自较旧的 MacBook Pro,运行此应用程序没有问题.现在,当我尝试构建和运行我的应用程序时,我遇到了以下问题:

I recently started using a MacBook pro with the M1 chip from an older MacBook Pro which had no issues running this app. Now when I try to build and run my app I get the following issues:

'FirebaseCore/FirebaseCore.h' file not found

Could not build Objective-C module 'Firebase'

我尝试过的:

  • 清理我的构建文件夹
  • 删除派生数据
  • 重新启动我的计算机
  • 运行 pod install --repo-update
  • 当我将 Scheme 更改为 FirebaseCore 时,错误确实消失了,但随后我无法在模拟器上运行该应用.

这是我的 pod 文件:

Here is my pod file:

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

post_install do |pi|
    pi.pods_project.targets.each do |t|
      t.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      end
    end
end

target 'Pikit' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Firebase
  pod 'Firebase'
  pod 'Firebase/Storage'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
  pod 'Firebase/Functions'
  pod 'Firebase/Analytics'
  pod 'Firebase/Messaging'
  pod 'Firebase/DynamicLinks'
  pod 'FirebaseUI/Auth'
  pod 'FirebaseUI/Email'
  pod 'FirebaseUI/Google'
  pod 'FirebaseUI/Facebook'
  pod 'FirebaseUI/OAuth' # Used for Sign in with Apple, Twitter, etc
  pod 'FirebaseUI/Phone'

  
  # Other Podfiles
  pod 'OnboardKit'
  pod 'SDWebImage'
  pod 'PureLayout'
  pod 'IQKeyboardManagerSwift'
  pod 'Google-Mobile-Ads-SDK'


  
end

推荐答案

如果有人仍然面临问题,如果您已经清理了构建文件夹,请删除派生数据,删除 pod.lock 和 pods 文件夹,我建议打开终端并

If someone is still facing the problem, If you already cleaned the build folder, remove derived data, remove pod.lock and the pods folder what I suggest is to open the terminal and

插入:吊舱分解&&吊舱安装

insert : pod deintegrate && pod install

差异是由 deintegrate 调用引起的,该调用将删除构建阶段以及框架文件夹.

The difference is caused by the deintegrate call which will remove build phases as well as the framework folder.

还要考虑:使用 M1 芯片 MacBook,在为模拟器而不是真实设备/macbook 构建项目时,我也遇到了上述错误

To consider also : Using a M1 chip MacBook, what happened to me as well was getting the said error when building the project for a simulator and not a real device / macbook

这篇关于为什么我在尝试运行我的 iOS 应用程序时收到错误“找不到 FirebaseCore/FirebaseCore.h"文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆