这个问题前前后后折磨了我大概一周的时间,记录下来供大家参考共勉,估计用了cocoaPods的同学难免出现这个问题。
都是DerivedData惹的锅
我做的工程项目需要用到友盟统计,用cocoaPods下载集成后,command+R最后报错,主要错误就是大家耳熟能详的头文件找不到,“xxxxx file not found”,自己改配置还是找不到,到网上找攻略,无非是设置各种path,经过旷日持久的查找始终没能找到解决的办法,最后我仔细看那错误提示,发现里面提到了一个derivedData的路径,灵机一动,不会因为这个缓存吧……
复制粘贴此路径:
/Users/用户名/Library/Developer/Xcode/DerivedData/
command+shift+G进入文件夹,把derivedData全都删除,command+R运行,运行成功。
有时候遇到问题换个思路去解决,也许并没有那么苦难。
网友评论
String that represents a fully qualified filesystem path. When a path contains spaces, the path must be surrounded by single quotation marks (') or double quotation marks ("), or the spaces must be escaped with a backslash (\). 官方文档:https://developer.apple.com/legacy/library/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/0-Introduction/introduction.html#//apple_ref/doc/uid/TP40003931-CH3-SW38