top of page

Mastering Swift's Development Blog

Follow Us On Twitter
  • Writer's pictureJon Hoffman

Mastering Swift Cocktails App

Updated: Jul 15, 2022

Mastering Swift Cocktails is an Open Source iOS app, written in Swift and uses SwiftUI for the user interface. The code is distributed under the MIT license and can be found on my Github page here:

The app uses The Cocktail DB ( as the backend data source. The Cocktail DB is an open, crowd sourced database of drinks on cocktails from around the world. It uses a free JSON API but also has a few paid premium APIs as well. The only premium APIs used in the Mastering Swift Cocktails App is the list of popular cocktails. This list will not work with the free test API key included with the source code. You can see the full list of APIs here:

I wrote this app so I can use it as an example on how to develop an app that uses a webservice API as its backend data source. I plan on writing several posts that explain how the app was written and why I choose to do certain things within the code.

The key features of this app is to display recipes for cocktails. On the main screen you can see a list of popular cocktails with a horizontal scroll and a list of ingredients that you have selected as currently in your bar (use the bar tab options at the bottom of the screen to select the ingredients) which is also a horizontal scroll. There are two buttons on the main screen where one lets you see a list of drinks by the first character in the drinks name, and the other button lets you see a random recipe.

The app is currently on the App Store here

Some of the articles that I have written about how this app was developed are:



Mastering Swift 5.3

The sixth edition of this bestselling book, updated to cover through version 5.3 of the Swift programming language




Protocol Oriented Programming

Embrace the Protocol-Oriented design paradigm, for better code maintainability and increased performance, with Swift.



bottom of page