Sometimes, we need to compile others’ program, but to the people who didn’t know Swift or Objective-C at all, compiling other people’s program is so difficult to do. So this passage will tell you how to compile existed project in XCode.
There are two ways to install project’s dependency, so judge it from project files.
You may saw some projects tree like this:
Look at the last two files, they start by
Cartfile. You need to process these project in the step Carthage.
Or you saw others are like this:
You can see
Podfile in this project, to complie this kind of projects, see step CocoaPods.
Carthage is a light dependency installer for Swift or Objective-C. Different from CocoaPods, it installes the packages whichever you need but not all packages.
For more information, see Carthage.
First, you should install brew, a software which can patch your macOS with some open source packages.
This Command Line Will Install Homebrew.
Then, execute it to update your brew.
Last, install Carthage by
This Command Line Will Install Carthage.
CocoaPods is a long-standing third party package manager, but it is too huge.
First, you should download the XCode from App Store. And you should start it to finish the first runing config and download the
Command Line Tools for XCode.
Clone your project from github in XCode, you should press the button
Clone an existing project..
In this window, you should fill the textfiled with your project link, like
Notice: You can fill your github account link in the textfiled and check the project you stared. Like this
Clone, you will get the project.
NOTICE: THIS BLOG IS NOT FINISHED, AND SOMETHING MUST BE WRONG BECAUSE I DID NOT TEST IT AT ALL