我正在使用Capacitor为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个小时。我阅读了所有提到这个错误的帖子。
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/
,但都不行。 - Shark Deng