为什么我在尝试运行我的 iOS 应用程序时收到错误“找不到 FirebaseCore/FirebaseCore.h"文件

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

问题描述

限时送ChatGPT账号..

我最近开始使用带有 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-17 17:53:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/919149.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我在   找不到   应用程序   错误   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!