Swift API Calls for Beginners (Networking) - Async Await & JSON
Sean Allen Sean Allen
149K subscribers
70,279 views
0

 Published On May 31, 2023

Go to https://squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.

Learning how to write network calls as a beginner in Swift can be daunting. I remember it taking me a long time to fully grasp them. In this video I break down the basics of how network calls work and introduce you to the concept of JSON (JavaScript Object Notation).

I show you how to download data from the GitHub API with a network call and display a basic user profile page using that data. For this we use Swift Concurrency with Async Await.

This tutorial was created using Xcode 14 and iOS 16.

My iOS Dev Courses:
https://seanallen.teachable.com/

iOS Developer Interview Questions Playlist:
   • Swift Interview Tips  

Twitter:
Sean Allen -   / seanallen_dev  

Hired.com:
https://hired.com/x/1n01g

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Paul Hudson's Hacking With Swift:
https://gumroad.com/a/762098803

Donny Wals - Combine:
https://gumroad.com/a/909014131

Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51

Objc.io Books (Thinking in SwiftUI & Advanced Swift):
https://gumroad.com/a/656585843

#swift #softwaredeveloper #iosdeveloper

Timestamps:
0:00 - Networking in iOS Apps
0:32 - This is hard!
1:06 - What is JSON?
2:06 - Using CURL to test a response
3:39 - Open API, OAuth, API Keys - Out of Scope
4:14 - My 4 Step Process for API Calls
5:10 - Using JSON to inform your design
5:46 - Create Models from JSON
9:13 - Network Call Code
18:10 - Networking Code Review
20:02 - Using the network call
22:48 - Connecting the UI

show more

Share/Embed