iOS - 构建失败与CocoaPods无法找到头文件 [英] iOS - Build fails with CocoaPods cannot find header files

查看:254
本文介绍了iOS - 构建失败与CocoaPods无法找到头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iOS项目使用CocoaPods。一切顺利,直到另一个开发人员开始在同一个项目上工作。他做了一些更改(只有我知道的代码),并在回购中创建了一个新的分支。我已经签出了他的分支,并试图构建它,但我得到一个错误:ASLogger / ASLogger.h文件未找到。



即使我删除整个项目并制作新的副本并使用pods install,构建失败仍然存在。你有什么想法问题可以在哪里?

解决方案

更新 b

确保您的 Podfile 在缺少配置文件的目标上包含 link_with 。仅Cocoapods 默认情况下设置第一个目标否则。例如

  platform:osx,'10 .7'
pod'JSONKit','〜> 1.4'

link_with'Pomo','Pomo Dev','Pomo Tests'

------结束更新






请注意,您必须查看以下步骤的Project-> Info-> Configurations。






有类似的症状,发现 pods.xcconfig 文件没有包括在具体的目标 。其他一些建议的解决方案对我有用,但是这似乎解决了一部分的基本问题。





简单的解决方案是更改为没有设置目标的配置文件有一套。




I have an iOS project using CocoaPods. Everything was working smoothly until another developer started to work on the same project. He made some changes (only to code as far as I know) and made a new branch in the repo. I have checked out his branch and tried to build it, but I am getting an error: ASLogger/ASLogger.h file not found.

Even if I delete the whole project and make a fresh copy and use 'pods install .' the build failure is still there. Do you have any idea where the problem can be? If you need some more infos, just ask.

解决方案

Update

Make sure your Podfile includes link_with on targets missing a config file. Cocoapods only sets the first target by default otherwise. e.g.

platform :osx, '10.7'
pod 'JSONKit',       '~> 1.4'

link_with 'Pomo', 'Pomo Dev', 'Pomo Tests'

------ End Update


Note: Please do note that you have to look into Project->Info->Configurations for steps below.


I had similar symptoms and found that the pods.xcconfig file was not being included in the specific target I was trying to build. Some of the other suggested solutions worked for me, but this one seemed to address part of the underlying issue.

The simple solution was to change set the configuration file for the targets that didn't have one set.

这篇关于iOS - 构建失败与CocoaPods无法找到头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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