unity-jar-resolver icon indicating copy to clipboard operation
unity-jar-resolver copied to clipboard

Use CocoaPods CDN to speed up pod install

Open tomtwo opened this issue 5 years ago • 5 comments

Please fill in the following fields:

Unity editor version: 2019.3.0f6 Play Services Resolver version: 1.2.135.0 Features in Play Services Resolver in use (Android Resolver, iOS Resolver, VersionHandler, etc.): iOS Resolver Plugins SDK in use (Firebase, Admob, Facebook, etc.): Firebase Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac Platform you are targeting (iOS, Android, and/or desktop): iOS Scripting Runtime (Mono, and/or IL2CPP): IL2CPP

Please describe the issue here:

On some CI services (in my case TravisCI) sometimes the pod install step can slow to a crawl. This is due to GitHub throttling traffic to the CocoaPods/Specs.git source repo.

CocoaPods have since released support to use a CDN (in CocoaPods 1.7.2+). To opt-in, the source at the top of the Podfile should be changed over to https://cdn.cocoapods.org/.

The straightforward change to unity-jar-resolver would be to update this hardcoded string in IOSResolver to point to the CDN:

https://github.com/googlesamples/unity-jar-resolver/blob/master/source/IOSResolver/src/IOSResolver.cs#L80

However this is a breaking change since it drops support for CocoaPods < 1.7.2. Perhaps the better solution would be to allow configuring this URL in our build scripts before running the build.

Any thoughts?

tomtwo avatar Feb 26 '20 17:02 tomtwo

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Feb 26 '20 17:02 google-oss-bot

@tomtwo this sounds like a neat idea, perhaps the default source URL could be configured based upon the detected version of Cocoapods that is installed?

At the moment the version is only checked before pod install (see https://github.com/googlesamples/unity-jar-resolver/blob/8b7fb85d5f0d117fd6015dd06ca64b9fff71c896/source/IOSResolver/src/IOSResolver.cs#L2288 ) but could always happen before the Podfile is generated.

stewartmiles avatar Feb 26 '20 18:02 stewartmiles

Hey! Any news on this issue? Using the CDN would speed up built times, and Cocoapods might eventually deprecate the old repo

polmum avatar May 15 '20 12:05 polmum

Bump

capyvara avatar Mar 30 '21 12:03 capyvara

pretty sure this can be closed since it is using cdn now

StephenHodgson avatar Feb 11 '24 04:02 StephenHodgson