Building Reusable iOS Components in Swift

Keeping it DRY (Don’t Repeat Yourself) is every software developer’s priority in seeing a product through to completion. It not only helps make debugging easier, but also provisions easy testing and writing less code whilst achieving more. More than once, I’ve found myself building reusable components to reduce the repetitiveness in my code. For instance, building an iOS application will involve building multiple table view controllers…. Read More

Handling Incoming Phone Calls with Server Side Swift, Vapor and Twilio

You’re building a Vapor app and want to be able to handle phone calls? Let’s walk through how to add Twilio Programmable Voice to the barebones Vapor “Hello World” app. Swift Package Manager For this project we’re going to use Swift Package Manager to set everything up and install dependencies. Make sure you have Swift 4.0 or greater installed before moving on. You can check your Swift version by running… Read More

Migrating Swift iOS Apps from MVC to MVVM

Design patterns are reusable solutions to common problems in code. MVVM (Model-View-Viewmodel) and MVC (Model-View-Controller) are both design patterns. While MVC is a very common and easy-to-implement design pattern, it has been faulted as very inefficient while working with large code bases. If you’ve built a product, you’ve probably built using MVC. Other common design patterns include MVP (Model-view-presenter) and VIPER (here is a little write up that describes… Read More

Receiving and Responding to Text Messages with Server Side Swift, Vapor and Twilio

You’re building a Vapor app and want to be able to respond to SMS messages? Let’s walk through how to add Twilio SMS to the barebones Vapor “Hello World” app. Swift Package Manager For this project we’re going to use Swift Package Manager to set everything up and install dependencies. Make sure you have Swift 4.0 or greater installed before moving on. You can check your Swift version by running… Read More

How to receive a POST request with server side Swift using Vapor

After displaying text on a web page, receiving a POST request is the “Hello, World” v2 of building a web app. Let’s walk through how to do that using the popular server side Swift web framework, Vapor. Swift Package Manager For this project we’re going to use Swift Package Manager to set everything up and install dependencies. Make sure you have Swift 4.0 or greater installed before moving on…. Read More

Working with Xcode Auto Layout in Swift and iOS Projects

Auto Layout in Xcode

Have you ever had trouble designing an application to look good in both landscape and portrait orientation? Do not despair! Auto Layout is here to the rescue. Originally Apple had only one screen size, which was developer friendly since they did not have to be terribly flexible fitting into different screen sizes. Fast forward to today, it has become quite frustrating to design an app that supports different… Read More

Playing Pokemon via SMS in Swift Using Vapor and Twilio

Pokemon filled many childhoods with joy. For some of us as adults, server side Swift does the same. What better way to spend a fun afternoon than combining the two? Let’s walk through how to build your own version of Twitch Plays Pokemon powered by text messages using the Twilio API, Vapor and Lua scripting for the Visual Boy Advance emulator. Getting Equipped Before moving on you’ll… Read More

Constraint Animations on iOS Apps using XCode and Swift

Laptop

You have likely seen a bunch of animations if you own an Apple device, from third-party apps or Apple’s stock apps. Maybe you thought to yourself, “I wish I knew how to do that. That’s really cool but it looks so complicated!” Well if that describes you, follow along with me through this tutorial to discover that creating animations in iOS is not as hard as… Read More