由于我并不熟悉ruby的语法,因此走了许多的弯路,终于用上了cocoapod的强大功能。 我的错误在于使用本地的编辑器对podfile进行编辑,好多符号与ruby并不完全一样,非常容易混淆,故强烈建议大家使用xcode编辑podfile文件,以避免这种低级错误。首先贴出一篇大神的cocoapod的详细文章,链接在此
http://code4app.com/article/cocoapods-install-usage
为新手补充一个常用的podfile 文件的例子:(下图)(记得用xcode编辑!!!!!)
#
# Uncomment this line to define a global platform for your project
platform :ios,'8.0'
use_frameworks!
target 'Test' do
pod 'AFNetworking', '~> 2.6.0'
pod 'MJRefresh' , '~> 2.4.11'
pod 'HysteriaPlayer' , '~> 2.1.2'
pod 'TMCache' , '~> 2.1.0'
pod 'FMDB' , '~> 2.5'
pod 'Masonry' , '~> 0.6.2'
pod 'Toast' , '~> 2.4'
pod 'MBProgressHUD' , '~> 0.9.1'
pod 'SDWebImage' , '~> 3.7.3' # add webimage lib
pod 'BlocksKit' , '~> 2.2.5'
end
this line to define a global platform for your projectplatform :ios,'8.0'
use_frameworks!
target 'Test' do
pod 'AFNetworking', '~> 2.6.0'
pod 'MJRefresh' , '~> 2.4.11'
pod 'HysteriaPlayer' , '~> 2.1.2'
pod 'TMCache' , '~> 2.1.0'
pod 'FMDB' , '~> 2.5'
pod 'Masonry' , '~> 0.6.2'
pod 'Toast' , '~> 2.4'
pod 'MBProgressHUD' , '~> 0.9.1'
pod 'SDWebImage' , '~> 3.7.3' # add webimage lib
pod 'BlocksKit' , '~> 2.2.5'
end
# Uncomment this line to define a global platform for your project
platform :ios,'8.0'
use_frameworks!
target 'Test' do
pod 'AFNetworking', '~> 2.6.0'
pod 'MJRefresh' , '~> 2.4.11'
pod 'HysteriaPlayer' , '~> 2.1.2'
pod 'TMCache' , '~> 2.1.0'
pod 'FMDB' , '~> 2.5'
pod 'Masonry' , '~> 0.6.2'
pod 'Toast' , '~> 2.4'
pod 'MBProgressHUD' , '~> 0.9.1'
pod 'SDWebImage' , '~> 3.7.3' # add webimage lib
pod 'BlocksKit' , '~> 2.2.5'
end
# Uncomment this line to define a global platform for your projectplatform :ios,'8.0'
use_frameworks!
target 'Test' do
pod 'AFNetworking', '~> 2.6.0'
pod 'MJRefresh' , '~> 2.4.11'
pod 'HysteriaPlayer' , '~> 2.1.2'
pod 'TMCache' , '~> 2.1.0'
pod 'FMDB' , '~> 2.5'
pod 'Masonry' , '~> 0.6.2'
pod 'Toast' , '~> 2.4'
pod 'MBProgressHUD' , '~> 0.9.1'
pod 'SDWebImage' , '~> 3.7.3' # add webimage lib
pod 'BlocksKit' , '~> 2.2.5'
end
# Uncomment this line to define a global platform for your project
platform :ios,'8.0'
use_frameworks!
target 'Test' do
pod 'AFNetworking', '~> 2.6.0'
pod 'MJRefresh' , '~> 2.4.11'
pod 'HysteriaPlayer' , '~> 2.1.2'
pod 'TMCache' , '~> 2.1.0'
pod 'FMDB' , '~> 2.5'
pod 'Masonry' , '~> 0.6.2'
pod 'Toast' , '~> 2.4'
pod 'MBProgressHUD' , '~> 0.9.1'
pod 'SDWebImage' , '~> 3.7.3' # add webimage lib
pod 'BlocksKit' , '~> 2.2.5'
end