Swift Concurrency Made Easy : Start Using Swift Concurrency In Your Apps

Опубликовано: 14 Ноябрь 2021
на канале: tundsdev
12,069
430

*Note*
Starting with Swift 5.7 when working with the @MainActor you may get the following warning Expression requiring global actor 'MainActor' cannot appear in default-value expression of property in order to resolve you can either use the @MainActor property wrapper above specific functions or create an instance of your stateobject in the init as seen here https://stackoverflow.com/questions/7... it’s just one of those changes by Apple 🤷🏾‍♂️

i.e to create an instance of it in the initialiser do the following below

@StateObject var vm: MyViewModel

init() {
self._vm = StateObject(wrappedValue: MyViewModel(service: MyService()))
}

Learn Swift Concurrency Now - It's FREE! (For iOS Developers)

In this video, we’re going to explore Swift Concurrency in this free swift concurrency course and some of the new capabilities we get in Swift when working with iOS Concurrency such as the new Swift Concurrency Async Await in SwiftUI. In this Swift Concurrency tutorial, we’ll be looking at practical examples in SwiftUI & UIKit.

We’ll discuss a range of topics within the Swift Concurrency Framework such as Swift Async Await Example, SwiftUI Async Await Example, Actors, Continuations, Async Task, Group Tasks and many more topics within the Swift Concurrency Framework, alongside real-life examples you may come across in your project.

So let’s get straight into this SwiftUI tutorial & UIKit tutorial and learn swift concurrency online for free.

Timestamps

00:00 Introduction
00:45 What is Swift Concurrency?
03:35 Async/Swift in Swift
19:45 Structured Concurrency
27:40 What are Tasks in Swift Concurrency?
28:52 Breaking down AsyncLet
33:58 Breaking down the Task Lifecycle
37:14 What is Task Cancellation?
45:59 Exploring Group Tasks
55:30 Unstructured Tasks
01:05:35 Working with Detached Tasks
01:13:11 Exploring Continuations
01:23:03 Breaking down Actors
01:31:38 Preventing Actor Reentrancy
01:42:35 Exploring Actor Isolation
01:48:05 What is Sendable?
01:49:28 What is MainActor?
01:51:21 Shoutouts

Master Swift Concurrency with this Free Course for iOS Developers | Free Swift Concurrency Course

Getting Started with Swift Concurrency (Learn Swift Concurrency online for FREE)

Getting Started with Swift Concurrency (Free Swift Concurrency Course, Swift Concurrency For Beginners)

Getting Started with Swift Concurrency Learn Swift Concurrency online for FREE, Async Await, Actors

Resources

Github Repo
https://github.com/tunds/YouTubeResou...

Other Resources

https://www.donnywals.com/category/sw...
https://www.andyibanez.com/posts/unde...
https://docs.swift.org/swift-book/Lan...
https://www.hackingwithswift.com/quic...
https://swiftsenpai.com/swift/actor-r...

SwiftUI MVVM Async/Await Networking Example(SwiftUI 3.0, Xcode 13, Error Handling, SwiftUI Tutorial)
   • The Complete Guide Using SwiftUI MVVM...  

My SwiftUI Async/Await MVVM Project Structure & Approach (SwiftUI 3.0, async/await Swift, Xcode 13)
   • Breaking Down My SwiftUI Async Await ...  

SwiftUI Data Flow (SwiftUI Tutorial, SwiftUI Beginner, Swift UI Data Flow)
   • SwiftUI Data Flow (Beginner Level | S...  

Mastering Stacks in SwiftUI (VStack, HStack, LazyStacks, SwiftUI Tutorial)
   • Mastering Stacks in SwiftUI (VStack, ...  

Firebase SwiftUI Login, Registration, Password Reset & Session Management with Combine
   • Firebase SwiftUI Auth, Login, Registr...  

Setup SwiftUI App with Firebase SPM (Swift Package Manager, SwiftUI Tutorial, Firebase Crashlytics)
   • How to setup Firebase in an iOS app w...  

Getting Started with Combine (Practical Combine Framework Examples in UIKit & SwiftUI)
   • Master The Combine Framework: From Be...  

SwiftUI Form Validation using Combine (SwiftUI Tutorial, Regular Expressions, Combine Framework)
   • Learn SwiftUI Form Validation with th...  

Build a news app in SwiftUI tutorial series
   • SwiftUI News App (Beginner Level | MV...  

Build Onboarding Screens in SwiftUI (TabView, PageTabViewStyle, SwiftUI Tutorial, @AppStorage)
   • Build Onboarding Screens in SwiftUI (...  

SwiftUI Redacted Tutorial - Loading Skeleton View - (SwiftUI Tutorial, Xcode 12, SwiftUI 2.0)
   • SwiftUI Redacted Tutorial - Loading S...  

Build Clubhouse in SwiftUI 2.0 and Dark Mode (SwiftUI Tutorial, SwiftUI 2.0, Clubhouse App Clone)
   • Build Clubhouse in SwiftUI 2.0 and Da...  

Dark Mode in SwiftUI using @Binding & @AppStorage (SwiftUI Tutorial, @Binding, @AppStorage)
   • Dark Mode in SwiftUI using @Binding &...  

#swiftconcurrency #swiftuitutorial #gettingstartedwithswiftconcurrency #uikit #uikittutorial #swiftconcurrencyswiftuitutorial #swiftconcurrencypracticalexamples