Module Outline
Use the following resources and work with your mentor to master the objectives for this module. Practice by completing the Mini-Project, Project, and Challenges.
Required Preclass Resources
- A Short Practical Guide to Closures
- Gosh Darn Block Syntax
- Higher Order Functions - Map, Filter, Reduce
-
A Beginner's Guide to HTTP and REST
Understand HTTP requests, URLs, and the HTTP Verbs (GET, PUT, DELETE, POST). Do not build the Example Application.
-
What's New in Foundation Networking
WWDC 2014 Video
- Ray Wenderlich URLSession Tutorial
-
About the URL Loading System
Apple's documentation about the URL Loading System. Read as much as you can.
Lesson Video
Preclass Videos
-
iOS Cohort - Jake Gundersen
Closure Syntax
-
iOS Cohort - Jake Gundersen
Intro to REST APIs
-
iOS Cohort - Jake Gundersen
URLSession Intro
- iOS5 Cohort - Caleb Hicks
- iOS4 Cohort - Layne Moseley
- iOSAH5 Cohort - Parker Wightman
- iOSAH5 Cohort - Caleb Hicks
- iOS3 Cohort - Caleb Hicks
- iOSAH3 Cohort - Taylor Mott
Video Challenges
-
Sort the Array
Using the Playground used in the Group Demo for this objective, sort the array of people by age in ascending order.
Map an array of ages and sort that array in descending order.
-
App Icon
- Create an URLSessionDownloadTask to get poster art
- Display the album art on the View Controller
Stretch Problem
- Make a person class with name, age, and favoriteMovie properties
- init the class with a dictionary of type string:anyobject.
- Test this to make sure that it works
- Read about Failable Initializers
- Use a guard statement to handle missing dictionary values
- If a value is missing, don't init the person and instead return nil
Failable Initializers
Example Dictionary:
let workingDictionary = ["nameKey" : "Derek", "ageKey": 28, "favMovieKey" : "Zoolander"]
let brokenDictionary = ["nameKey" : "Steve", "ageKey": 2]
PART 1
PART 2
♦ Black Diamond
Guided Project
StudentPUTAPI Part Two (PUT/POST)
StudentPUTAPI is a simple student list API that lets students practice using PUT and GET with a REST API.
Project
-
Post Part Two
Post is a simple global messaging service. Students will review MVC principles and work with NSURLSession, JSON parsing, and closures to build an app that lists and submits posts to a global feed.
ReadMe
Mastery Review
- Failable Initializers stretch problem
- Challenges
- Sort the Array objective challenge
- App Icon objective challenge
- StudentPUTAPI Part Two (PUT/POST) guided project