Swift Package Manager (SPM) is already a dependency management tool that developers cannot escape, but Xcode access to Github is slow most of the time, adding proxy has become a necessary solution.
First you have to have an agent.
1. Run the following command for the agent to take effect on the terminal
export all_proxy=your_proxy:your_port
Copy the code
2. Copy the following command to make Xcode pull dependencies from git in your system
xcodebuild -resolvePackageDependencies -scmProvider system
Copy the code
If you have more than one Project in your directory, add the -project parameter as prompted
3. Open the project file after the command is executed.
Swift Package Manager (SPM) is the real next generation dependency management tool that solves the speed problem
Don’t forget to like it