【发布时间】:2020-07-08 02:57:00
【问题描述】:
我正在为 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 个小时。我在互联网上阅读了所有提到此错误的帖子。
【问题讨论】:
-
你的 CocoaPods 版本是多少?
-
这个问题你解决了吗?我遇到了同样的问题。我试过
pod repo add master https://github.com/CocoaPods/Specs.git,没有用。我尝试在 Podfile 中添加source https://github.com/CocoaPods/Specs.git,但不起作用,我尝试了pod repo remove trunk、pod repo add trunk https://cdn.cocoapods.org/。两者都不起作用。