Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

iOS pod update fails because repo url is not well defined #603

Open
hgc2002 opened this issue Nov 29, 2019 · 1 comment
Open

iOS pod update fails because repo url is not well defined #603

hgc2002 opened this issue Nov 29, 2019 · 1 comment

Comments

@hgc2002
Copy link

hgc2002 commented Nov 29, 2019

"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 CocoaPods/CocoaPods#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
.- weex-toolkit@2.0.0-beta.31

@YorkShen
Copy link
Contributor

YorkShen commented Dec 2, 2019

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

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

No branches or pull requests

2 participants