This course is available as part of the raywenderlich.com Professional subscription. To learn more click here

Alamofire

Pro

May 5 2020 · Video Course (45 mins) · Intermediate

Learn the ins and outs of Alamofire from making requests to uploading files and how to pin certificates. This course uses Alamofire 5.

4.7/5 3 Ratings

Version

  • Swift 5.1, iOS 13.3, Xcode 11.3

Learn how to add Alamofire to your iOS project using Swift Package Manager, then use Alamofire to make a request and decode JSON.

1

Use Alamofire to send POST requests with data in the request body.

2

Learn how to handle errors and failed requests, then use Alamofire's validation to set expectations for successful requests.

3

Send requests to protected endpoints with both HTTP Basic authentication and bearer authentication with a token.

4

Use Alamofire to upload files to an endpoint from your iOS device using multipart form data.

5

Use Alamofire to download files and images from the internet and either save them locally or use them for outgoing requests.

6

Write Swiftier code for working with Alamofire and endpoints. Stop using Strings when working with Alamofire and make it type-safe.

7

Learn the basics of certificate pinning, what it is and why to use it. Use OpenSSL to get the TLS certificates used by your app.

8

Learn how to leverage Alamofire to implement certificate pinning to prevent man-in-the-middle-attacks.

9

Use Alamofire to retry requests when needed, such as hitting an API limit or using an access token that's expired.

10

Who is this for?

iOS developers who can write simple iOS applications but want to make apps that need more complex API calls. The course expects you to be familar with Xcode, Swift, and building iOS applications. Familiarity with URLSession would be helpful but is not required.

Covered concepts

  • Installing Alamofire with Swift Package Manager
  • Sending requests for POST and GET
  • Encoding and decoding JSON in requests and responses
  • Error handling
  • Authenticated requests and certificate pinning
  • Caching
  • Retrying requests

Contributors

Comments