ios – XCode 6 CocoaPods错误:target覆盖“OTHER_LDFLAGS”构建设置

我刚刚开始使用 CocoaPods,当我从终端安装pod(我的项目称为babyMilestones,我正在尝试使用CocoaPods作为ShipLib框架)时,我收到以下错误. :

The babyMilestones [Release] target overrides the FRAMEWORK_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the
$(inherited)` flag,or
– Remove the build settings from the target.

头文件搜索路径和框架搜索路径我收到此错误.

当我尝试构建我的项目时,我在#import行上发现错误,说明找不到ShipLib / ShipLib.h文件.在我的项目导航器中,我的Pods项目正在显示,ShipLib框架是可见的.

我从来没有设置任何这些搜索路径,我只是让XCode 6做到这一点.我发现这个答案:The target … overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig
我已经尝试过以下内容:

>删除构建设置中的所有框架搜索路径.这并没有解决这个问题

>然后我将$(继承)添加到框架搜索路径.我做了Clean然后Build.这给出了以下类型的新错误:

ld: warning: directory not found for option ‘-L/Users/billpaystation/Documents/iOS/babyMilestones/babyMilestones/Pods/build/Debug-iphoneos’
ld: warning: directory not found for option ‘-F’
Undefined symbols for architecture i386:
“_OBJC_CLASS_$_ActionSheetDatePicker”,referenced from:
objc-class-ref in EditItemViewController.o
“_OBJC_CLASS_$_SYSincerelyController”,referenced from:
objc-class-ref in EditItemViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Action Sheet Picker and Sincerely Controller是我试图用Pods添加的库.

>我注意到libPods.a在我的文件检查器的框架下是红色的.所以我去了Scheme – > Edit Scheme->并将Pods添加到Build.
我真的不明白整个目标/构建设置,我可能会更糟糕的尝试这么多不同的事情.任何帮助将不胜感激!

解决方法

您应该将$(继承)添加到框架搜索路径.对于新的错误,你应该去:

TargetSettings->构建阶段 – >编译源 – >()ActionSheetDatePicker.m和SYSincerelyController.m类,然后构建和运行.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...