您的位置:首页 > 移动开发 > IOS开发

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

2016-11-25 00:00 816 查看
有时候我们需要为一个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 - 简书
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息