Reputation: 557
I'm a newbie to swift. I don't know and I can't find out how to use Swift Package Manager in command line.
Is there any equivalent stuff to Podfile
pod install
and pod update
? How to add a local package dependency to the project?
Xcode SPM GUI is totally unusable because of some proxy problems.
Upvotes: 3
Views: 3996
Reputation: 557
git config --global http.proxy http://0.0.0.0:1087
git config --global http.proxy socks5://0.0.0.0:1080
Append those lines at the end of ~/.ssh/config
to add a socks5 proxy
Host github.com
ProxyCommand nc -X 5 -x 0.0.0.0:1080 %h %p
Remember you must add the -scmProvider system
option to force xcodebuild to use system git and git configurations, or it will use the xcode built-in git which will never go through the proxy.
xcodebuild -resolvePackageDependencies -scmProvider system
Upvotes: 3