Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Cocoapods source url #738

Closed
ciriousjoker opened this issue Dec 11, 2019 · 8 comments
Closed

Wrong Cocoapods source url #738

ciriousjoker opened this issue Dec 11, 2019 · 8 comments

Comments

@ciriousjoker
Copy link

pod install hangs at "Downloading specs".

This is because the Cocoapods team changed their hosting.

Check this out: LINK

TLRD:
Change the first line of "Podfile" to "source 'https://cdn.cocoapods.org/" instead of the Github thing.

@timbru31
Copy link
Member

Thanks for the pointer! Definitively something we should change. Do you happen to know if the new CDN works with older versions of CocoaPods, too? Otherwise, this would be a breaking change.

@jcesarmobile
Copy link
Member

Which Cordova-iOS version are you using? Latest release included some fixes for cocoa pods 1.8.0+
094779f
I created a project with that source and it worked without problems despite being a new computer, it downloaded everything.
What’s your cocoa pods version?

Also, I think the source comes from plugins, not from cordova itself.
But the cdn only works on 1.7.2+, which isn’t a requirement

@ciriousjoker
Copy link
Author

ciriousjoker commented Dec 16, 2019

I'm using cordova-ios v5.1.1.
Don't know the cocoapods version, but i freshly installed it when I posted the issue.

However, I'm not the only one with that issue, since I discovered the solution by following some other people's advice. Was hard to find though and I don't know where I found it..

@jcesarmobile
Copy link
Member

I don't think it's hanging, it just takes a lot of time as it has to download all CocoaPods (about 10-20 minutes). The CDN is supposed to avoid the downloading, but as I said, the source comes from plugins.

But maybe cordova-ios should not write the source if it's the old one and the user is in CocoaPods 1.8.0+

@ciriousjoker
Copy link
Author

ciriousjoker commented Dec 17, 2019

To be honest, I have no idea how cocoapods works internally, I just noticed that it didn't work out of the box so i created the issue. It's not just hanging though. Otherwise downloading would take 20+ minutes, which would be weird given that when I change the url it downloads within 10 seconds.

@jcesarmobile
Copy link
Member

yeah, if the old url is used, CocoaPods downloads the whole CocoaPods repository into your computer, while the CDN url only download the required dependencies.
It only does it once, so next invocations are fast, but still, it wasted a lot of resources on the computer, that's why they created the CDN

@neuronas
Copy link

neuronas commented Jan 13, 2020

I tried to set new cdn from a virtualized mac OS Catalina commenting out the source line in platforms/ios/Podfile file, to increase the installation time performance to a one minute as pointed on:
http://blog.cocoapods.org/CocoaPods-1.8.0-beta/

here are the relevant programs versions:

% npm list -g --depth=0
├── cordova@9.0.0
└── npm@6.13.4

% xcodebuild -version
Xcode 11.3
Build version 11C29

% pod --version
1.8.4

pod install takes a minute but it didn't work when later execute
cordova build --release --device
also I tried removing Podfile.lock, remove all pods in Pods directory with the same result.
this is the error:

▸ Running script '[CP] Check Pods Manifest.lock'

❌  error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

** ARCHIVE FAILED **

The following build commands failed:
	PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/user/Library/Developer/Xcode/DerivedData/MyProjectName-bgxxntwvqlmwnocfgmzydttfdxuo/Build/Intermediates.noindex/ArchiveIntermediates/MyProjectName/IntermediateBuildFilesPath/MyProjectName.build/Release-iphoneos/MyProjectName.build/Script-76393A39D8E9B365915172E6.sh
(1 failure)
xcodebuild: Command failed with exit code 65
user@users-iMac MyProjectName % cd platforms/ios/ 

I ended up doing classic installation (pod install from platforms/ios) with default Podfile source, it takes almost 1 hour

% du -sh ~/.cocoapods
2.4G /Users/user/.cocoapods

@timbru31
Copy link
Member

Closing as we have bumped the required CocoaPods version in cordova-ios@6 to ensure the CDN is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants