How to Discover Interesting Swift Code and Contribute to Open Source

5 steps to take to become a part of the Swift Open Source movement and improve you coding skills immensely.

Paul Pela

--

Photo by Fotis Fotopoulos on Unsplash

We are living in a very fortunate times. We have access to more Swift code than we could ever imagine. Code that we can use in our own projects and not have to reinvent solutions for problems that others already solved. Here’s how to do that.

1. Look for interesting Swift packages at the Swift Package Index

Swift Package Index is the place to look for Swift code and it’s experiencing a rapid growth at the moment with more and more packages being added.

Main page of the Swift Package Index

The project aims to be the best way for Swift developers to search for existing solutions. It provides nice features that allow you to see important details about each package and more are coming soon. When you find a package that catches your eye, you can quickly check if it’s being currently maintained, how many commits it had so far, if there are open issues and if it’s compatible with the latest versions of Swift.

For each package there’s also a GitHub link where you can dive into the source code yourself.

2. Check the package on GitHub

Once you’ve located a package that you find interesting, the next step is to visit it’s GitHub repository and find out more about it. Each repository comes with a readme file which gives some basic information and functions as introductory documentation. Take some time to read through it.

Official Apple repository for the Swift language Open Source project

3. Dive into the code

Now it’s time to take a deep dive. And don’t worry, even if you’re a beginner and you don’t have a lot of experience. At first it may seem like a daunting task. Of course, make sure you’re not starting with some gigantic framework…

--

--

Paul Pela

Future dad, 9to5: tech support agent. I write about the User Experience of learning programming.