incubator-weex-cli icon indicating copy to clipboard operation
incubator-weex-cli copied to clipboard

iOS pod update fails because repo url is not well defined

Open hgc2002 opened this issue 6 years ago • 1 comments

"npm run ios" fails when cloning the pod repo because the repo url is not well defined. this make it to download the repo every time, that takes much longer than npm command is stated to wait for.

The reason why "pod update" fails is because it tries to clone the repo every time, but url is rejected by GitHub, so the repo is always missing.

Pod repo is defined by default project template in Podfile as git:github.com/CocoaPods/Specs.git but this fails because git does plain calls, not secured (SSL), and GitHub does not allow it.

Solution is described barely in https://github.com/CocoaPods/CocoaPods/issues/2696 when it mentions that url should be like "https://github.com/CocoaPods/Specs.git" (without quotes)

This way the repo is well cloned and it won't try to download it again every time (unless really required!), making the "npm run ios" to execute well.

Additional things to keep in mind: pod update can be really slow if there are huge changes pending to download. It makes sense to run it periodically alone, out of "npm run ios" to minimize timeout issue possibilities.

To reproduce it: .- install a weex environment from scratch (literally) in Mac npm install -g weex-toolkit Run the App Store and download Xcode Install Command Line Tools for Xcode too sudo gem install xcodeproj sudo gem install cocoapods pod setup sudo easy_install pip pip install six Install JDK 8 (Android studio was also installed from scratch but it has nothing to do with this issue)

.- make a new easy-simple project weex create my-app-name weex platform add ios

.- execute "npm run ios"

Environment: .- MacOS 10.15 .- iPhone 8 Simulator .- npm 6.12.0 .- node 12.13.0 .- [email protected]

hgc2002 avatar Nov 29 '19 16:11 hgc2002

It seems like you already find the solution for the problem, could you please help us solving the problem by creating a PR?

YorkShen avatar Dec 02 '19 07:12 YorkShen