Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`

只谈情不闲聊 提交于 2020-04-30 08:44:37

问题


I'm building an app with capacitor for ios. When I launch the command 'npx cap sync ios' (which launch pod install) and I get this error :

✖ 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`.

If i execute the recommandation :

pod repo add trunk https://cdn.cocoapods.org/

I get this error

[!] Repo name `trunk` is reserved for CocoaPods' main spec repo accessed via CDN.

I'm blocked on this issue since 6 hours. I read all post mentionning this error on internet.


回答1:


Temporary solution :

I added `source 'https://github.com/CocoaPods/Specs.git' on the top of my Podfile

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

But it takes 30 minutes to download all the repo (2.5gb) in my Users/damien/.cocoapods/repos/ folder 🤯



来源:https://stackoverflow.com/questions/60884826/unable-to-add-a-source-with-url-https-cdn-cocoapods-org-named-trunk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!