Pods 更新后提示Bundle资源找不到

恋恋美食 发布于 2016/03/22 00:22
阅读 7K+
收藏 0

  • 当前Podfile运行正常

rubytekiMacBook-Pro:DecorationBus ruby$ cat Podfile
platform :ios, '7.0'
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.3.1'
    pod 'SMSSDK', '~> 2.0.0'



  • 升级Pod到1.0.0.beta.4
rubytekiMacBook-Pro:DecorationBus ruby$ pod --version
1.0.0.beta.4



  • 更新Pod资源(由于Pods升级,引入了target的概念,必须在Podfile中指定target, 此步必失败)

rubytekiMacBook-Pro:DecorationBus ruby$ pod install
Re-creating CocoaPods due to major version update.
Updating local specs repositories

CocoaPods 1.0.0.beta.6 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.0.0.beta.6

Analyzing dependencies
[!] The dependency `MWPhotoBrowser (~> 2.1.1)` is not used in any concrete target.
The dependency `UMengAnalytics-NO-IDFA (~> 3.4.7)` is not used in any concrete target.
The dependency `MJRefresh (~> 3.0.4)` is not used in any concrete target.
The dependency `MDRadialProgress (~> 1.3.2)` is not used in any concrete target.
The dependency `MOBFoundation_IDFA (~> 1.3.1)` is not used in any concrete target.
The dependency `SMSSDK (~> 2.0.0)` is not used in any concrete target.



  • 按照官方guide修改Podfile

rubytekiMacBook-Pro:DecorationBus ruby$ cat Podfile
platform :ios, '7.0'
target 'DecorationBus' do
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.3.1'
    pod 'SMSSDK', '~> 2.0.0'
end



  • 更新Pods

rubytekiMacBook-Pro:DecorationBus ruby$ pod update
Update all pods
Re-creating CocoaPods due to major version update.
Updating local specs repositories

CocoaPods 1.0.0.beta.6 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.0.0.beta.6

Analyzing dependencies
Downloading dependencies
Installing DACircularProgress (2.3.1)
Installing MBProgressHUD (0.9.2)
Installing MDRadialProgress (1.3.2)
Installing MJRefresh (3.0.8)
Installing MOBFoundation_IDFA (1.3.1)
Installing MWPhotoBrowser (2.1.1)
Installing SDWebImage (3.7.5)
Installing SMSSDK (2.0.4)
Installing UMengAnalytics-NO-IDFA (3.4.7)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 6 dependencies from the Podfile and 9 total pods installed.



  • 编包提示MWPhotoBrowser.bundle找不到
PhaseScriptExecution Copy\ Pods\ Resources /Users/ruby/Library/Developer/Xcode/DerivedData/DecorationBus-ewahmhbzzgyytwefamtwlzktzjpt/Build/Intermediates/DecorationBus.build/Debug-iphonesimulator/DecorationBus.build/Script-1B153D9A39078434770F20CE.sh
    cd /Users/ruby/horen/gitHub/DecorationBus
    /bin/sh -c /Users/ruby/Library/Developer/Xcode/DerivedData/DecorationBus-ewahmhbzzgyytwefamtwlzktzjpt/Build/Intermediates/DecorationBus.build/Debug-iphonesimulator/DecorationBus.build/Script-1B153D9A39078434770F20CE.sh

/Users/ruby/horen/gitHub/DecorationBus/Pods/MJRefresh/MJRefresh/MJRefresh.bundle
/Users/ruby/horen/gitHub/DecorationBus/Pods/SMSSDK/SMSSDKUI.bundle
error: Resource "/Users/ruby/Library/Developer/Xcode/DerivedData/DecorationBus-ewahmhbzzgyytwefamtwlzktzjpt/Build/Products/Debug-iphonesimulator/MWPhotoBrowser.bundle" not found. Run 'pod install' to update the copy resources script.



  • 按照指示再次”pod install“, 问题依然存在


有朋友提示,怀疑是我使用的beta版pods的缘故,正在尝试降级。有结果回来更新.


加载中
0
恋恋美食
恋恋美食

自己回来结贴。更新Podfile

rubytekiMacBook-Pro:DecorationBus ruby$ cat Podfile
platform :ios, '8.0'
use_frameworks!


target 'DecorationBus' do
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.5.1'
    pod 'SMSSDK', '~> 2.0.4'
    pod 'KMPlaceholderTextView', '~> 1.1.2'
end

注意标红色的必填!

0
Lovey34
Lovey34

想问下:下面的“DecorationBus”是什么呀?

platform :ios, '8.0'

use_frameworks!


target 'DecorationBus' do
    pod 'MWPhotoBrowser', '~> 2.1.1'
    pod 'UMengAnalytics-NO-IDFA', '~> 3.4.7'
    pod 'MJRefresh', '~> 3.0.4'
    pod 'MDRadialProgress', '~> 1.3.2'
    pod 'MOBFoundation_IDFA', '~> 1.5.1'
    pod 'SMSSDK', '~> 2.0.4'
    pod 'KMPlaceholderTextView', '~> 1.1.2'
end
恋恋美食
恋恋美食
回复 @aiyun0628 : 更准确的说应该是target名称。一个项目中可以有多个target。
aiyun0628
aiyun0628
target '这是是项目的target名称 再简单点就是项目名称 但是不一定' do
0
crifan
crifan

1.use_frameworks!

如果是swift项目,则必须写这句

-》旧的ObjectC的项目,不需要写这句

2.target 'DecorationBus' do 中的DecorationBus

是你的项目的名字。


0
水光ZQ
水光ZQ
请问我的项目不是swift项目也出现这个问题,是什么原因?
返回顶部
顶部