当你创建好私有库,提交好后,本地索引做好。
但是当你pod search name
或者pod install
时候报错
Analyzing dependencies
[!] An unexpected version directory `Classes` was encountered for the `/Users/Zapper/.cocoapods/repos/Foobar/Foobar` Pod in the `Foobar` repository.
搜了网上一大堆解决方案,都不是真正的办法,原因是你podfile里配置问题
- 错误事例:
# 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