-
Notifications
You must be signed in to change notification settings - Fork 1
Home
CLSPM is a command-line application for managing Swift Package Manager dependencies for Xcode projects.
As of this writing there is no way to manage SPM packages for Xcode projects through a command line interface. CLSPM grew out of a desire to be able to quickly toggle between local and remote packages, a need to quickly spin up projects without having to manually add multiple packages, and a frustration with the tedium of working with Xcode projects that build multiple targets that include different SPM packages.
Expand for additional frustrations
When toggling between remote and local packages:
-
Xcode can leave orphaned references to packages. (View toggle package sources)
-
Xcode introduces noise in
project.pbxproj
git-diffs by creating new IDs for the same package and by rearranging references of build-files and dependencies. (View Consistent Target and Dependency IDs)
I have:
-
an existing project that already utilizes Swift Package Manager:
View the existing project quickstart
-
a new project or a project that has no Swift Package Manager dependencies yet:
View the new project quickstart
The init command generates an spmfile inside the project directory. spmfiles determine which packages get added to the project when the install command is run.
The install command reads the project's spmfile and modifies the project's xcodeproj
.
The add command adds new dependencies to the spmfile and updates the project's xcodeproj
.
The reset command can be used to reset config, dependencies and spmfile files.