记一次 CocoaPod 的使用过程
目前有一个cocos2d creator项目, 接入了微信SDK, 现在需要接入阿里云移动推送.

用到了CocoaPod集成. 于是创建了一个Podfile, (此文件在项目目录中, 和 xxxxxxxx.xcodeproj 同一路径 )
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/aliyun/aliyun-specs.git'
project 'HaloNativeIOS.xcodeproj' target 'HaloNativeIOS-mobile' do
platform :ios, '10.0' pod 'AlicloudPush', '~> 1.9.9.1'
end
接着在Podfile文件路径下, 执行pod install
➜ proj.ios_mac git:(master) ✗ pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /Volumes/dzqExt/source/engine/cocos2d-x-3.17.2/templates in PATH, mode 040777
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 4 total pods installed. [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `HaloNativeIOS-mobile` to `Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig` or include the `Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig` in your build configuration (`ios/UserConfigIOS.debug.xcconfig`). [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `HaloNativeIOS-mobile` to `Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.release.xcconfig` or include the `Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.release.xcconfig` in your build configuration (`ios/UserConfigIOS.release.xcconfig`). [!] The `HaloNativeIOS-mobile [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target. [!] The `HaloNativeIOS-mobile [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
第一次使用cocoapod, 碰到这些感叹号, 有点头皮发麻. 没办法工作还得继续. 一个一个解决就好了.
第一个感叹号的问题(debug模式)和第二个反馈的问题(release) 可以看作是一样的, 基本可以一起处理了
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `HaloNativeIOS-mobile` to `Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig` or include the `Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig` in your build configuration (`ios/UserConfigIOS.debug.xcconfig`).
大概意思:
CocoaPods未设置项目的基本配置,因为我的项目已经有了自定义配置集。为了使CocoaPods完美工作, 请设置
1: 设置 HaloNativeIOS-mobile 目标的基本配置为: Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig
或者
2: 在ios/UserConfigIOS.debug.xcconfig文件中包含 Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig
看懂了解决办法后,开始实操:

设置后:

然后关闭Xcode, 重新pod install

非常完美, 错误少了一大截. 继续解决.
重新执行命令后, 只反馈了两个问题,并且这两个基本上可以看作一样的. 解决了debug, 那么release也就迎刃而解了
The `HaloNativeIOS-mobile [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig'. This can lead to problems with the CocoaPods installation
大概意思:
“ HaloNativeIOS-mobile [Debug]”目标会覆盖“Pods/Target Support Files/Pods-HaloNativeIOS-mobile/Pods-HaloNativeIOS-mobile.debug.xcconfig'”中定义的“ FRAMEWORK_SEARCH_PATHS”构建设置。 这可能会导致CocoaPods安装出现问题
当前工程设置:
FRAMEWORK_SEARCH_PATHS的路径为bugly库的路径.

Pod目录下的配置:
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AlicloudPush/push" "${PODS_ROOT}/AlicloudUT/ut" "${PODS_ROOT}/AlicloudUTDID/utdid" "${PODS_ROOT}/AlicloudUtils/utils"
很明显覆盖, 因为2个库都在使用, bugly是原始方式集成的, 而阿里推送是使用pod方式集成.
2个都需要使用:
添加一个$(inherited) , 选项即可

重新pod install

非常完美, 所以感叹号消息
记一次 CocoaPod 的使用过程的更多相关文章
- 记一次数据库调优过程(IIS发过来SQLSERVER 的FETCH API_CURSOR语句是神马?)
记一次数据库调优过程(IIS发过来SQLSERVER 的FETCH API_CURSOR语句是神马?) 前几天帮客户优化一个数据库,那个数据库的大小是6G 这麽小的数据库按道理不会有太大的性能问题的, ...
- 记一次WordPress 安装的过程
安装WordPress你我他大家都会,记得10年的时候,哥已经玩转WordPress.dedecms.sns,那为何现在要记一次WordPress安装过程呢? 因为现在不会了! 之前安装都是在Wind ...
- 记一次oracle数据库复制过程
记录一次自己数据库复制的过程(从公司测试环境复制到客户测试环境),主要是每次自己都会忘记,不如记录一下,方便自己以后找,因此,本篇内容不会很详细,主要是用于给我自己提醒,相对于一种记笔记的效果. cm ...
- 记一次Android内存分析过程
前言 上周五的时候,祝峰找到我,反映了Android收银台买单结果页内存飙升的问题.我在自己的机器上也试着重现了一下,发现从支付台-微信支付成功并返回后,进入买单结果页的内存会突然增大,导致GC,如图 ...
- 记一次PHP项目部署过程
首先介绍一下项目的基本情况:使用PHP语言开发,数据库用的是MySQL 5.5,HTTP服务器用的是Apache 2.2.早上十点到机房看了看服务器的基本情况:Windows 2000操作系统,没有安 ...
- 彷徨中的成长-记一个文科生的IT成长过程
纠结了许久,要不要写这篇文章,然而最终还是写了.就权当总结与呻吟吧..当然,呻吟最开始还是发在自己的站点的,忍不住手贱,还是想发博客园. 1 剧透 人算不如天算:时隔多年,我竟然搞起了前端. 2 发端 ...
- 谁记录了mysql error log中的超长信息(记pt-stalk一个bug的定位过程)
[问题] 最近查看MySQL的error log文件时,发现有很多服务器的文件中有大量的如下日志,内容很长(大小在200K左右),从记录的内容看,并没有明显的异常信息. 有一台测试服务器也有类似的问题 ...
- 斩获新知——记一次reverse的实现过程
最近学习C++,在实现reverse模板函数的时候,从一个小问题开始,在对这个问题的旁敲侧击当中带起了更多疑惑,顺藤摸瓜之后,尽管没有将诸多问题完美解答,但整个过程下来却也似有所获.最初的问题从使用C ...
- 记一次OOM问题排查过程
上周运维反馈线上程序出现了OOM,程序日志中的输出为 Exception in thread "http-nio-8080-exec-1027" java.lang.OutOfMe ...
随机推荐
- Unity调用Android Studio中的Java方法
1. 新建Unity项目: 2. Android Studio中新建EmptyActivity: 3. 新建安卓项目时记住最小版本号: 4. 将左侧项目文件浏览面板切换到Project项下,在本项根节 ...
- 0506static【重点】
static[重点] [重点] 1.[没有对象] [没有对象] [没有对象] 2.static 修饰的是一个资源共享类型的变量 3.静态成员变量的基本使用规范 static修饰的成员变量只能通过静态方 ...
- 记一次使用windbg排查内存泄漏的过程
一.背景 近期有一个项目在运行当中出现一些问题,程序顺利启动,但是观察一阵子后发现内存使用总量在很缓慢地升高, 虽然偶尔还会往下降一些,但是总体还是不断上升:内存运行6个小时候从33M上升到80M: ...
- javascript -字符串常用方法
let str ="stRing" toUpperCase / toLowerCase 大小写 toUpperCase()把一个字符串全部变为大写; toLowerCas ...
- 磨刀-CodeWarrior11生成的Makefile解析
https://mp.weixin.qq.com/s/plvviDFLsLQeg9ZeP_3WMA 一. 简介 Code Warrior 11是基于Eclipse CDT开发的集成开发环境(IDE ...
- 非阻塞赋值(Non-blocking Assignment)是个伪需求
https://mp.weixin.qq.com/s/mH84421WDGRb7cuU5FEFIQ Verilog的赋值很是复杂,包括: 1. Continuous assignment; 2. Pr ...
- rewrite和return的简单需求
Rewrite 需求作业 背景:现在我有一个网站,www.linux.com www.linux.com访问主页面 friend.linux.com访问交友页面 blog.linux.com访问博客页 ...
- Java四种权限修饰符
四种权限修饰符
- 高性能可扩展mysql 笔记(五)商品实体、订单实体、DB规划
个人博客网:https://wushaopei.github.io/ (你想要这里多有) 一.商品模块 商品实体信息所存储的表包括: 品牌信息表: create table `brand_i ...
- PriorityBlockingQueue 和 Executors.newCachedThreadPool()
1.PriorityBlockingQueue里面存储的对象必须是实现Comparable接口. 2.队列通过这个接口的compare方法确定对象的优先级priority. 规则是:当前和其他对象比较 ...