美文网首页刘的个人专题
iOS 与 CocosCretor之间的对接问题。

iOS 与 CocosCretor之间的对接问题。

作者: 辉546 | 来源:发表于2023-03-09 18:01 被阅读0次

对接出现的问题一:

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

是否觉得警告没啥,然后就忽略了。那你就会跟我一样,走进坑里。花大把时间去试错。
如果不解决这个waring,那么接下来编译时,工程就会报错:

library not found for -XXX

出现这个错误,最先想到的是去 build setting 设置 libaary search path 中添加确实的Library
博主第一反应也是这样做的,找了一大圈,设置了一大堆然冰暖。

而实际 上面的错误都是因为cocopods 的那个warning 引起的,其实 cocopods 已经给出提示且给出解决方案了(Use the $(inherited) flag) ,跟着做就好了。
HEADER_SEARCH_PATHS(警告报错的地方) 加入$(inherited) 就可以了。把所有的警告都处理掉,重新运行,你就能发现新大陆了。

对接出现的问题二:
当你cocoapods 一些SDK以后,一切顺利,但是编译后蹦出来:

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

然后你就跟着pod install ,跟着pods update。。缺发现,没用。why?这时候就一脸懵。
查看报错信息,你就会发现,有额外的路径提示

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory

找了一圈发现好像没什么作用。百思不得其解
这时候你要是去看cocoapods的警告,你可能就会发现,你在pod install 的时候,其实已经告诉你了。只是你无视了它。

[!] 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 `XXXX-mobile` to `Target Support Files/Pods-XXXX-mobile/Pods-XXXX-mobile.debug.xcconfig` or include the `Target Support Files/Pods-XXXX-mobile/Pods-XXXX-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 `XXXX-mobile` to `Target Support Files/Pods-XXXX-mobile/Pods-XXXX-mobile.release.xcconfig` or include the `Target Support Files/Pods-XXXX-mobile/Pods-XXXX-mobile.release.xcconfig` in your build configuration (`ios/UserConfigIOS.release.xcconfig`).

现在你只需要把对应的.xcconfig添加到Cocos Creator的.xcconfig里,就能解决你的问题了。

image.png

记得两个文件都要哟,区分好debug与release。

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

#include "../../cocos2d-x/cocos/platform/ios/CCModuleConfigIOS.debug.xcconfig"
//添加下面这行代码。
#include "../Pods/Target Support Files/Pods-你的项目名称-mobile/Pods-你的项目名称-mobile.debug.xcconfig"

添加完以后,编译,新世界欢迎你。

相关文章

  • 对接

    对接对于我们每一个人成人来说都不陌生,它可以是物体与物体之间的对接,也可以是事与事之间的对接。当然,在对接当中离不...

  • 后端产品间系统对接

    在后端产品中,各个子系统之间的对接或者子系统与外部系统之间的对接非常常见,对接的本质是为了实现数据信息的传输与交换...

  • [IOS经验总结]UIWebView与JS之间的数据交互(转自神

    [IOS经验总结]UIWebView与JS之间的数据交互 [IOS经验总结]UIWebView与JS之间的数据交互...

  • Safari对接

    iOS 9 之后推出了SFSafariViewController可以实现与Safari对接。 使用场景:当APP...

  • iOS服务器返回数据null,操作数据崩溃

    文件参考: ios中json解析出现的null问题 GitHub-NullSafe 一、问题 客户端与服务器之间的...

  • 《深圳微访谈·天天约会》之深圳市金融商会

    1、希望对接的服务与机构 ①加强会员之间走访互动 ②为会员对接资金渠道 ③为会员推荐优质项目 2、核心会员企业 中...

  • 关系

    类之间的关系纵向关系-继承:父与子之间的关系——extends-实现:类对接口的实现——implements 横向...

  • 2018-12-23

    【品牌故事流程】 1、确定企业,了解和我们之间的关系(与企业对接人沟通) 2、企业对接人建立该企业品牌故事群(包含...

  • iOS蓝牙权限提示修改

    因为最近公司iOS项目需要对接ibeacon,所以最近在研究corebluetooth。今天遇到一个问题就是需要修...

  • 你离自由职业的距离,就在老板一念之间!

    我觉得自由职业在未来一定会成为价值输出的主流。 曾经我在公司上班的时候,就和老板探讨过部门与部门之间对接的问题,当...

网友评论

    本文标题:iOS 与 CocosCretor之间的对接问题。

    本文链接:https://www.haomeiwen.com/subject/jotzldtx.html