无法添加URL为`https://cdn.cocoapods.org/`名为`trunk`的源 [英] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`
本文介绍了无法添加URL为`https://cdn.cocoapods.org/`名为`trunk`的源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为iOS构建一个带电容的应用程序。当我启动命令‘npx cap sync iOS’时
(启动pod install
),我收到以下错误:
✖ Updating iOS native dependencies with "pod install" (may take several minutes):
✖ update ios:
[error] Error running update: Analyzing dependencies
Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
You can try adding it manually in `/Users/damien/.cocoapods/repos` or via `pod repo add`.
如果我执行命令:
pod repo add trunk https://cdn.cocoapods.org/
我收到此错误
[!] Repo name `trunk` is reserved for CocoaPods' main spec repo accessed via CDN.
我在此问题上已被阻止了6小时。我在互联网上读了所有关于这个错误的帖子。
推荐答案
临时解决方案:
我在Podfile的顶部添加了`source‘https://github.com/CocoaPods/Specs.git’
platform :ios, '11.0'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
....
但下载我的Users/damien/.cocoapods/repos/
文件夹🤯中的所有回购(2.5 GB)需要30分钟
这篇关于无法添加URL为`https://cdn.cocoapods.org/`名为`trunk`的源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文