New Project Quick‐Start - anconaesselmann/CLSPM GitHub Wiki
You just started a project or you are about to add your first Swift package to an existing project.
Instead of manually adding packages through the Xcode GUI, CLSPM
allows you add multiple packages at once.
In the project root directory call
clspm init --csv
this will create an empty file named spmfile
in your project root directory. Here you can list your SPM packages. Go here for more details on init
.
The spmfile
for a project that will use Google Analytics and Firebase Crashlytics for example would look like this:
FirebaseAnalytics, FirebaseCrashlytics
Note: If you have or expect to have multiple targets with different dependencies or if you would like to install packages for your test targets follow the quick-start guide for multiple targets.
To add or update packages listed inside the spmfile
call:
clspm install
Since you have not used either dependency with clspm
in the past you will be prompted to resolve both packages. If you are following along with the example, the url for both google packages is:
https://github.com/firebase/firebase-ios-sdk.git
- If you create your own SPM packages you might want to learn how to quickly Toggle local and remote implementation of a package