xcodebuild build failed:Use the $(inherited) flag

 原创    2019-11-19

今天遇到一个奇怪的问题:编译一个framework静态库,使用Xcode直接编译能成功,但在脚本中使用xcodebuild编译失败,提示某些头文件找不到。在「Header Search Paths」中添加$(inherited)解决问题。

项目是通过CocoaPods解决依赖问题的,在执行pod install之后,有如下警告提示:

Use the `$(inherited)` flag or
Remove the build settings from the target.

尝试在「Header Search Paths」中添加$(inherited)解决问题。保险起见,「Other Linker Flags」,「LIBRARY_SEARCH_PATHS 」等都加上$(inherited)。

$(inherited)是什么?

Xcode项目中很多地方都有$(inherited),$(inherited)的意思就是继承上一级或依赖项的配置。通过CocoaPods集成的项目,$(inherited)将会包含Pods.xcodeproj中的配置。

文章最后修改于 2023-08-01

相关文章:

解决 Xcode 下载 iOS Simulator 频繁失败的问题
Using a Custom Toolchain in Xcode
iOS:清除Xcode缓存
Xcode 10/iOS 12适配
iOS CoreMotion 传感器开发

发表留言

您的电子邮箱地址不会被公开,必填项已用*标注。发布的留言可能不会立即公开展示,请耐心等待审核通过。