Dive into ARKit on iOS with Swift and Twilio Programmable Video

Apple's ARKit logo

Augmented reality has is showing up everywhere these days. Apple’s release of ARKit in iOS 11 and Google’s ARCore APIs are guaranteed to accelerate this trend by making augmented reality development accessible to even more developers and users.   We’re especially excited about the combination of augmented reality and real-time communications. In this post we’ll dive into a simple example on how to combine Programmable Video… Read More

How to Make HTTP Requests in Swift 3

How To Make HTTP Requests In Swift 3

Making HTTP requests is core functionality for modern languages and one of the first things many developers learn when acclimating to new environments. When it comes to Swift there are a fair amount of solutions to this problem both built into the language and by the community. Let’s take a look at some of the most popular ones. We’ll be using NASA’s Astronomy Picture of the Day… Read More

iOS UserNotifications in Swift

Local notifications provide a core functionality in many apps, and in Swift they are easy to add to whatever you’re building. With iOS10’s UserNotifications you can even display GIFs in notifications. Let’s build a quick application to display a local UserNotification containing a SEGA-related GIF and a prompt for the user to continue receiving notifications. Setting up the project Get started by grabbing this example project off of Github…. Read More

Adding Vim keybindings to Xcode with XVim

When building iOS applications, you are most likely using Xcode. While Xcode is awesome, I miss the thrill of modal text editing I get when using my favorite text editor: Vim. Although Vim is available on OSX by default, it’s difficult to use for iOS development. Using XVim, it’s possible to get the best of both worlds by adding Vim keybindings and functionality to Xcode. Preparing… Read More

Promises in Swift: Writing Cleaner Asynchronous Code Using PromiseKit

Writing asynchronous code in Swift can be painful. As many Node.JS developers are familiar with, you can easily run into problems like callback hell. Although Swift and its developer ecosystem are still young, thanks to open source libraries like PromiseKit there is hope for Swift developers wanting to write cleaner code for handling asynchronous tasks. Promises vs “Callback Hell” To illustrate the difference in code structure, let’s… Read More

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