How to Use Swift and Vapor to Generate Twilio Access Tokens

Vapor + Twilio = Token

Twilio’s iOS SDKs for Programmable Video, Programmable Chat and Programmable Voice require access tokens to authorize users. Generating these tokens must be done on a server. Rather than learning or using a different programming language on the server, let’s use Swift! Setting Up the Token Machine We’ll use the Vapor web framework for Swift and a small helper library to return access tokens from the server. Here are a few… Read More

How to Deploy Vapor Apps to Heroku

Deploying Vapor Apps to Heroku

Building web applications with Swift using Vapor is super simple. Thankfully, deploying them is also a breeze. In just a few steps we’ll go from localhost to Heroku with Vapor’s CLI. Prerequisites We need a few things before we get started: A working Vapor web application. If you don’t have one, you can follow this tutorial to get started. Git A free Heroku account Heroku Command Line Interface – Make… Read More

Getting Started With Vapor: A Swift Web Framework

Getting Started with Vapor: logo

Web frameworks for Swift started popping up almost as soon as Swift went open source at the end of 2015. Vapor quickly became one of the most used libraries for Swift on the web. In this quick tutorial you’ll learn the basics of using Vapor to build web applications using Swift. What You’ll Need Before we take a look at how Vapor works we need to get a few tools…. Read More

Getting Started with Swift Package Manager


When building iOS applications with Swift, you often need to use third party libraries as dependencies to avoid rewriting code that other developers have already created and shared. Swift Package Manager (SwiftPM) is a command-line tool for building, testing and managing Swift project dependencies. We will create a very basic Swift command line program that will parse some JSON using the popular SwiftyJSON framework to learn how to… Read More

Lasers, Drones and Robots: Meet The 13 Year Old Wunderkind On A Mission To Inspire 100,000 Developers


There’s a famous scene from Mission Impossible where top-spy Ethan Hunt infiltrates the Kremlin, wearing a mask made to look the face of a high ranking officer. He walks up to a door, a laser scans his “face”, and the door opens. It’s the stuff of spy movies — until a thirteen year old from Canada builds it in real life, and does a better job… Read More

Getting started with in Swift on iOS


WebSockets are a powerful protocol for real-time event based communication. makes working with WebSockets easier on iOS with Swift compared to implementing all the underlying bits yourself. Let’s demonstrate how to work with the Swift client library by building an application to monitor the status of Twilio phone calls. This application will be similar to the application built in another tutorial for getting started with on… Read More

Web Scraping and Parsing HTML in Swift with Kanna and Alamofire


When building iOS applications, we often need to work with data from various APIs. But sometimes the data you want access to isn’t nicely packaged and available via a REST API. In these cases we can scrape data directly from a web page using the Kanna Swift library. Let’s build an iOS app that will display all of the upcoming metal shows in New York City by… Read More

How to Build API Driven iOS Apps in Swift Using Siesta


There are so many wonderful APIs out there but they aren’t always easy to work with in mobile apps. The Siesta framework makes using APIs in Swift apps a joy. Patterns for using REST APIs in mobile apps tend to focus on requests but the ‘R’ that matters most in REST is Resource. Siesta provides an app-wide observable model of a RESTful resource’s state which answers the following three questions: What is the latest… Read More

Adding Push Notifications to your iOS app with Swift and Twilio Notify

Screen Shot 2016-06-06 at 5.08.06 AM

Notify makes it easy to send cross-platform notifications to your users. From in-app push notifications on Android and iOS to SMS fallbacks, Notify takes care of the heavy lifting. Let’s build an iOS app that can receive and react to push notifications sent by the Apple Push Notification Service (APNS) and Twilio Notify. Tools and Agenda There are a few things you will need in order to run all of the… Read More