记一次 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 ...
随机推荐
- [Android应用开发] 04.页面跳转和数据传输
*:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...
- [JavaWeb基础] 003.JAVA访问Mysql数据库
上面两篇讲解了简单的JSP + Servlet的搭建和请求,那么后面我们肯定要用到数据交互,也就是操纵数据库的数据,包括对数字的增加,删除,修改,查询.我们就用简单的MySql来做例子 我们需要引入驱 ...
- Java中的String、StringBuffer和StringBuilder
作为作为一个已经入了门的java程序猿,肯定对Java中的String.StringBuffer和StringBuilder都略有耳闻了,尤其是String 肯定是经常用的.但肯定你有一点很好奇,为什 ...
- 【HIVE & Spark】将hive引擎换成Spark,运行速度快!怎么换?请看本文
本教程仅仅是使用spark,能在hive用就行. 1.下载Spark; 2.WinSCP上传spark压缩包到虚拟机: 3.tar -zxvf spark-2.3.3-bin-without-hado ...
- SpringMVC(三)Restful风格及实例、参数的转换
个人博客网:https://wushaopei.github.io/ (你想要这里多有) 一.Restful风格 1.Restful风格的介绍 Restful 一种软件架构风格.设计风格,而不是 ...
- DynamIQ扫盲文
综述: ARM CPU的架构都基于big.LITTLE大小核技术.而再big.LITTLE的基础上,又添加了DynamIQ.单一Cluster中可以又8个core,且支持不同架构的core,以及支持不 ...
- Java实现 LeetCode 514 自由之路
514. 自由之路 视频游戏"辐射4"中,任务"通向自由"要求玩家到达名为"Freedom Trail Ring"的金属表盘,并使用表盘拼写 ...
- java实现第七届蓝桥杯分小组
分小组 分小组 9名运动员参加比赛,需要分3组进行预赛. 有哪些分组的方案呢? 我们标记运动员为 A,B,C,... I 下面的程序列出了所有的分组方法. 该程序的正常输出为: ABC DEF GHI ...
- Linux 用户管理命令-useradd
useradd [选项] 用户名,用来添加用户,实质是创建了几个用户信息的相关文件,选项可以支持手动创建 常见选项 -u UID:手动指定用户的UID -d 家目录 -c 用户说明 -g 组名:指定用 ...
- Centos6.5--svn搭建
0x01 配置好镜像源安装svn yum install subversion -y 0x02 安装完成之后在/opt下面新建一个svn的目录,当然也可以在其他的地方建立svn目录,这个看个人爱好. ...