How to create a Carthage framework
Carthage is a ruthlessly simple dependency manager for Mac and iOS, created by a group of developers from Github.
It turns out that creating a framework to be used trough Carthage is as ruthlessly simple as using it.
Create a framework
If you already have an Xcode project and you want to create a framework with some of the files in it, the operation is quite simple.
First off add a new target of type Cocoa Framework to your project.
Once the new Target has been created, select it and switch to the tab Build Phases. Under Compile Source add the files you want to include in your framework.
A new schema should have been create already for you with the same name as your new target.
Open Manage Schemes and check the Shared checkbox for your newly created schema.
Remember to add any external framework/library your framework depends on. From the tab General of the framework target add the missing files under Linked Frameworks and Libraries.
Now to test that everything is working correctly, try to run the command
carthage build --no-skip-current
from the command line.
If no errors occurs you are pretty much ready to go.
Publish to Github
To make your framework available to the public you need to push your project to Github. Another import point is to include any Cartfile to the repository if your framework has dependencies.
Remember to tag your release as Carthage determines which versions of your framework are available by searching through the tags published.