无法添加URL为`https://cdn.cocoapods.org/`名为`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`的源的教程就到这里就结束了,希望趣模板源码网找到的这篇技术文章能帮助到大家,更多技术教程可以在站内搜索。