美文网首页
Adding spec repo `trunk` with CD

Adding spec repo `trunk` with CD

作者: 晴天ccc | 来源:发表于2022-03-21 11:24 被阅读0次

pod install的时候出现以下报错:

Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/` 

经过多方查询问题终于解决了方法如下:

  • podfile文件头部添加
source 'https://github.com/CocoaPods/Specs.git'

我的podfile文件大概如下:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
use_frameworks!

target 'MyProject' do
  pod 'SnapKit'      , '~> 5.0.1'     # 代码布局
  pod 'Alamofire'    , '~> 5.5.0'     # 网络请求
end
  • 移除trunk

打开终端执行:

pod repo remove trunk
  • 然后重新执行pod的更新方法
pod install --repo-update
mac@Macmini EMEP % pod install --repo-update
Updating local specs repositories
  $ /usr/bin/git -C /Users/mac/.cocoapods/repos/master fetch origin --progress
  remote: Enumerating objects: 20259, done.        
  remote: Counting objects: 100% (20259/20259), done.        
  remote: Compressing objects: 100% (9015/9015), done.        
  remote: Total 18111 (delta 12367), reused 13719 (delta 8521), pack-reused 0
  Receiving objects: 100% (18111/18111), 2.02 MiB | 949.00 KiB/s, done.
  Resolving deltas: 100% (12367/12367), completed with 1979 local objects.
  From https://github.com/CocoaPods/Specs
     0d59fbb1558..f5af0d2d24a  master     -> origin/master
  $ /usr/bin/git -C /Users/mac/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/bin/git -C /Users/mac/.cocoapods/repos/master reset --hard origin/master
  HEAD is now at f5af0d2d24a [Add] LRKSAdSDK 0.0.13
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 15 dependencies from the Podfile and 15 total pods installed.

问题已解决。

相关文章

网友评论

      本文标题:Adding spec repo `trunk` with CD

      本文链接:https://www.haomeiwen.com/subject/zlnzdrtx.html