Alamofire Starter Introduction

In this lesson

Welcome to the Alamofire starter series where you will learn to become quite the firestarter of your HTTP networking skills in Swift! 

Kyle Roberts
Swift Guru at Large

Kyle's Series

Transcript

Tap on time to skip ahead

0:11

Hello world, Kyle here with brax.tv and this is the introduction to my starter series on Alamofire. Alamofire is an open source library on GitHub and as we can see in this description here, it is an elegant HTTP networking library written in Swift. And Alamofire is currently the most starred GitHub repo written in Swift and is based on AFNetworking, originally started by the same guy, Matt Thompson, in Objective-C. And then as Swift was released, Alamofire was eventually, I guess ported or rewritten in Swift for use in Swift apps. 

1:04

And as we scroll down through the ReadMe, there is a large large amount of documentation over Alamofire and this, as a starter series, we’re not going to be covering all of this stuff, but I do want to cover a lot of the basics and some of the customization that you get with Alamofire. So Alamofire is very easy to use and is extremely customizable and manageable. It includes some easy syntax for creating and responding to URL requests, specifically using HTTP. It haas support for file type downloads and uploads and easy built-in authentication. 

1:43

And there’s also a basic set of plugins here, which are technically separate libraries, but they’re sort of extensions for Alamofire, this one works with images and image views, and this one works with activity indicators or spinners, or the little, you know, the little and iOS view. And there’s support for tons of management of all network activity using managers, delegates, subclasses, extensions, you can do a lot of stuff with it. 

2:14

So right now, I’m in the code for my app SteamReader, which is the sample app I’ll be using for the following videos in this series. And I’m in my NetworkInterface.swift right now which is where I have most of my Alamofire code, if not all of it. And I’m really liking Alamofire so far. This is the first project that I’ve really committed to using it on. And I did use AFNetworking quite a bit in Objective-C. And I’m really liking it almost to the point where I’m not sure why you wouldn’t want to use it if you are working with HTTP requests but it’s so easy to use and it’s so easy to read. The syntax with it is pretty awesome for the basic request layout. 

2:56

What I’m using Alamofire for in this app is to download Steam information, and here on the featured page, which has a few categories including specials, new releases, that sort of stuff. And when you first launch the app, we’re going to be downloading all of this app data so we have the ability to search but as you scroll through search results in this feature page, you’re going to be able to watch as some things are dynamically loaded, the images are actually using AlamofireImage plugin library, but stuff like the details here, the price, the release date, and when you open an app, any of the news that is loaded is all loaded in real time with Alamofire in the background. It’s pretty great and I hope you enjoy the series and all the videos to come!

Additional Info

Register to get access to additional resources and info.