解决cocoapods diff: /../Podfile.lock: No such file or directory以及iOS开发同一应用多环境配置的问题

最后都变了- 提交于 2019-12-02 09:02:21

有时候我们需要为一个App生成不同环境下的版本,比如Debug版本,Appstore版本,Adhoc版本,之前见到别人都是用多个Target,但其实不用多个Target也行,这个替代方案就是多个Configurations。

如果你是用Xcode5之前的版本,可能参考这两篇文章就行:

如何在一个设备上安装一个App的两个不同版本

iOS开发之同一应用设置不同图标和名称 - 曾静的技术博客

 

但如果使用的是Xcode5之后的版本,特别是使用了Images.xcasset来设置应用图标,那么配置多环境可能就不那么容易了,还好找到了这篇教程:

iOS multi-environment configuration | Blog | AppFoundry

 

搞定了上面的设置,但是并没有完。如果你的项目使用了Podfile,pod install或者pod update时可能会有下面的提示:

今天在使用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 `项目名` to `Pods/Target Support Files/Pods-项目名/Pods-项目名.release.xcconfig` or include the `Pods/Target Support Files/Pods-项目名/Pods-项目名.release.xcconfig` in your build configuration.

 

解决方案如下:

参考:

CocoaPods did not set the base configuration of your project 问题解决方案 - 月若无涯的专栏 - 博客频道 - CSDN.NET

CocoaPods Error with undefined symbols for architecture armv7 - 简书

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!