Uploaded April 2023 | Updated September 2026, 2 hours ago
Go to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
Swift Generics provide a general solution in code that can handle various types. In this video I break down the syntax and use cases for Generics in Swift by going through a number of examples (basic and real life). We talk about protocol conformance and single letter variable names. Then I explain why you should be careful with Generics and not use them everywhere in your code.
This tutorial was created using Xcode 14 and iOS 16.
My iOS Dev Courses:
seanallen.teachable.com/?video=a3AH0ItFTKU
iOS Developer Interview Questions Playlist:
youtube.com/playlist?list=PL8seg1JPkqgF5wazzCKSq3EEfqt3t8mvA
Twitter:
Sean Allen - twitter.com/seanallen_dev
Hired.com:
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:
gumroad.com/a/762098803
Donny Wals - Combine:
gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
gumroad.com/a/656585843
#swift #softwaredeveloper #iosdeveloper
Timestamps:
0:00 - What are Generics?
0:31 - Abstract Example - Code Breakdown
2:08 - Basic Example in Code
4:53 - Generics in Swift Language
6:23 - Real Life Example - Generic Network Call
8:20 - The Generic Balancing Act
Go to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
Swift Generics provide a general solution in code that can handle various types. In this video I break down the syntax and use cases for Generics in Swift by going through a number of examples (basic and real life). We talk about protocol conformance and single letter variable names. Then I explain why you should be careful with Generics and not use them everywhere in your code.
This tutorial was created using Xcode 14 and iOS 16.
My iOS Dev Courses:
seanallen.teachable.com/?video=a3AH0ItFTKU
iOS Developer Interview Questions Playlist:
youtube.com/playlist?list=PL8seg1JPkqgF5wazzCKSq3EEfqt3t8mvA
Twitter:
Sean Allen - twitter.com/seanallen_dev
Hired.com:
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:
gumroad.com/a/762098803
Donny Wals - Combine:
gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
gumroad.com/a/656585843
#swift #softwaredeveloper #iosdeveloper
Timestamps:
0:00 - What are Generics?
0:31 - Abstract Example - Code Breakdown
2:08 - Basic Example in Code
4:53 - Generics in Swift Language
6:23 - Real Life Example - Generic Network Call
8:20 - The Generic Balancing Act










