pod小问题
2016-03-17 17:38
519 查看
CocoaPods中一些问题的解决
最近想模仿某个项目中的某个功能做个Demo,用到CocoaPods管理第三方库,期间出现了一些小问题。
问题一:
通过CocoaPods去导入AFNetworking,执行 pod install –verbose –no-repo-update 终端会有相应的警告:[!] The `aikaaikaComic [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `aikaaikaComic [Release]` target overrides the `OTHER_LDFLAGS` 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. |
选择程序 xxx -> TARGETS -> Build Settings
找到 Other Linker Flags 如果里面有配置参数先删除,添加 $(inherited)
然后执行 pod update –verbose –no-repo-update
问题二:
编译程序提示错误:Undefined symbols for architecture i386 或 Undefined symbols for architecture armv7解决方法:
编辑 Podfile
添加
post_install do |installer_representation| installer_representation.project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ARCHS'] = 'armv7 armv7s' end end end |
问题三:
再次编译提示错误:lb: library not found for -lPods 或者 lb: library not found for -libPods-AFNetworking.a解决方法:
编辑 Podfile
在上面添加的内容中再加上 config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘NO’
post_install do |installer_representation| installer_representation.project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ARCHS'] = 'armv7 armv7s' config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' end end end |
问题四:
通过 CocoaPods 引入 BaiduMapAPI ,执行 pod update 终端提示如下:[!] The `YYW [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. 99b4 [!] The `YYW [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. |
选择程序 xxx -> TARGETS -> Build Settings
找到 Library Search Path 添加 $(inherited)
编译运行通过
相关文章推荐
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 不可修补的 iOS 漏洞可能导致 iPhone 4s 到 iPhone X 永久越狱
- iOS 12.4 系统遭黑客破解,漏洞危及数百万用户
- 每日安全资讯:NSO,一家专业入侵 iPhone 的神秘公司
- [转][源代码]Comex公布JailbreakMe 3.0源代码
- 升级到mac 10.10之后使用pod出现问题的解决方法
- 讲解iOS开发中基本的定位功能实现
- iOS中定位当前位置坐标及转换为火星坐标的方法
- js判断客户端是iOS还是Android等移动终端的方法
- iOS应用中UISearchDisplayController搜索效果的用法
- IOS开发环境windows化攻略
- iOS应用中UITableView左滑自定义选项及批量删除的实现
- 浅析iOS应用开发中线程间的通信与线程安全问题
- 检测iOS设备是否越狱的方法
- .net平台推送ios消息的实现方法
- perl的POD权限问题处理
- 探讨Android与iOS,我们将何去何从?
- Android、iOS和Windows Phone中的推送技术详解