Cocoapods私有库报错处理An unexpected version directory `Classes`

当你创建好私有库,提交好后,本地索引做好。
但是当你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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容