解决xcode10打包报错:That command depends on command in Target ‘xxx’:scrpit phase"[CP] Copy Pods Resources"

问题:使用xcode10打包报错,提示

error:Multiple commands produce ‘xxxx/xxx.app’
1)Target ‘xx’ has create directory command with output ‘xxxxxxx'
2)That command depends on command in Target ‘xxx’:scrpit phase"[CP] Copy Pods Resources"
 

解决方法:将pod升级到1.4.0以上 

原因:

我们原来的pod版本为1.3的,但是xcode10要求pod 版本必须>=1.4.0
但是我们的工程使用版本不能大于1.4.0,所以需要制定版本升级到1.4.0
 

升级pod方法如下

一、安装ruby,并配置环境变量

1、安装ruby
brew install ruby
 
2、配置ruby环境变量
vi ~/.bash_profile,增加如下内容
export PATH=$PATH:/usr/local/Cellar/ruby/2.5.1/bin
 
source ~/.bash_profile
 
ruby -v查看ruby版本号,版本要大于2.4.1
 

二、通过gem安装指定版本pod

gem list|grep cocoapods:查看支持的pod版本
如果版本都过低,先更新gem
gem sources -l:列出gem所有支持的源
gem sources --remove https://ruby.taobao.org/:移除某个源
gem source -a https://gems.ruby-china.com:增加某个源
gem update --system:更新gem
sudo gem install -n /usr/local/bin cocoapods -v 1.4.0:指定pod升级到1.4.0版本
原文地址:https://www.cnblogs.com/meitian/p/9767854.html