Faster xcode with spm


How you can speed up compile times in XCode with Swift Package Manager

Workflow features:

✅ Speeds up builds
✅ Simple to setup
✅ Version Controlled
✅ Encourages re-usability
✅ Future proof
✅ Supports macOS
🚫 Supports iOS

Sync your modules to github:

1: cd /dev/MyApp/Packages/My-Awesome-Module-1.0.0/ 👈 navigate to your module
2: git checkout master 👈 switch to the master branch for your module
3: git commit -a -m "Updated Feature-x"
4: git push origin master

Blazing fast compile times:

When parts of your apps get complete and is not actively worked on move it to a Module. This will make your app faster to build because your only re-compile the code that is not in your modules. If you change code inside a module it will re-build When you run the app, it will take some time. If you want other parts of your app to be able to use new method calls, just hit cmd + b and it will become available to your entire app.

Module oriented programing:

By keeping your app in modules you are also able to reuse these in XCode playground. Because modules produce .framework files which works in XCode playground read this for a .frame work + playground workflow

Further reading:

  • Use .framework by splitting up in different frameworks helps with compile time artsy.com, see comments) here

Related Posts

Startup Oslo

“Kulturhuset” is a new place in the startup scene in Oslo. It’s “free” and can be used by anyone to collaborate or work on different projects.

Infinite Tree List

My notes on Infinite tree list

Protocol Inheritance

My notes on Protocol Inheritance

Protocol Ambiguity

How to differentiate protocol ambiguity

The Ultimate Xcode Workflow

Spend zero time managing dependencies

Spm And Ci Travis

My notes on Swift PM + CI Travis

Spm And Nested Frameworks

My notes on Swift package manager + XCode + Nested frameworks

Xcode And Spm

Here is how you use Swift package manager in your XCode app projects

Carthage And Nested Frameworks

A few workflows concerning Carthage and nested framework

Two Finger Swipe

Notes on implementing two finger swipe for macOS