當(dāng)你創(chuàng)建好私有庫(kù),提交好后,本地索引做好。
但是當(dāng)你pod search name或者pod install時(shí)候報(bào)錯(cuò)
Analyzing dependencies
[!] An unexpected version directory `Classes` was encountered for the `/Users/Zapper/.cocoapods/repos/Foobar/Foobar` Pod in the `Foobar` repository.
搜了網(wǎng)上一大堆解決方案,都不是真正的辦法,原因是你podfile里配置問(wèn)題
- 錯(cuò)誤事例:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
source 'https://gitee.com/paoche/ywchainable-animations.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'ceshi' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'YWChainableAnimations'
pod 'SDWebImage'
# Pods for ceshi
target 'ceshiTests' do
inherit! :search_paths
# Pods for testing
end
target 'ceshiUITests' do
# Pods for testing
end
end
- 正確事例:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
#source 'https://gitee.com/paoche/ywchainable-animations.git'
#source 'https://github.com/CocoaPods/Specs.git'
target 'ceshi' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'YWChainableAnimations', :git => "https://gitee.com/paoche/ywchainable-animations.git", :tag => '1.0.0'
pod 'SDWebImage'
# Pods for ceshi
target 'ceshiTests' do
inherit! :search_paths
# Pods for testing
end
target 'ceshiUITests' do
# Pods for testing
end
end