An introduction to using Swift's new concurrency features in SwiftUI

Overview

Contributors Forks Stargazers Issues Discussions Feature Requests License


Logo

SwiftUI Concurrency Essentials

An introduction to using Swift's new concurrency features in SwiftUI

Discuss with me · Report Bug · Request Feature

Articles and videos

The code in this repository accompanies a series of articles and videos that aim at providing a gentle introduction to Swift Concurrency in the context of SwiftUI.

  • Getting started with Swift Concurrency in SwiftUI (Article | Video)
  • Using Task cancellation for more efficient UIs (Article | Video)
  • Fetching images asynchronoursly using AsyncImage
  • Running work in parallel with Swift Structured Concurrency
  • Using Firebase's asynchronous APIs with async/await
  • Refactoring and other tooling
  • Swift Concurrency and SwiftUI behind the scenes

Contributing

Contributions are welcome!

  • If you found a typo in an article or a bug in one of the samples, consider filing a bug report
  • Even better, consider fixing the bug and sending me a PR
  • If you've got suggestions for other things I should write/talk about, send me a feature request
  • Want to discuss w/ me and the other folks on this repository? Come on over to the discussions forum!

Requirements

  • Xcode 13
  • Swift 5.5

License

Distributed under the Apache 2 License. See LICENSE for more information.

You might also like...
Slack message generator and API client, written in Swift with Result Builders and Concurrency

Slack Message Client This package provides a Swift object model for a Slack Block Kit message, as well as a Result Builder convenience interface for e

Several synchronization primitives and task synchronization mechanisms introduced to aid in modern swift concurrency.

AsyncObjects Several synchronization primitives and task synchronization mechanisms introduced to aid in modern swift concurrency. Overview While Swif

A Modern Concurrency and Synchronization for Swift.
A Modern Concurrency and Synchronization for Swift.

##Features Simple AtomicT class for numbers and strings. Uncomplicated dispatch keyword for firing off background routines. Awesome ChanT for conc

A demonstration for bridging between Combine and your new async functions

CombineAsyncually This is a DEMONSTRATION of how you can bridge the new async / await functionality in Swift 5.5 with Combine. There is NO WARRANTY. T

New Way Of Working Around With Closures.

Closured New Way Of Working Around With Closures. Are you tired of old-school callback closures? Are you always mess up with capturing references on a

Schedule timing task in Swift using a fluent API. (A friendly alternative to Timer)
Schedule timing task in Swift using a fluent API. (A friendly alternative to Timer)

Schedule(简体中文) Schedule is a timing tasks scheduler written in Swift. It allows you run timing tasks with elegant and intuitive syntax. Features Elega

SwiftyTimer allows you to instantly schedule delays and repeating timers using convenient closure syntax. It's time to get rid of Objective-C cruft.

SwiftyTimer Modern Swifty API for NSTimer SwiftyTimer allows you to instantly schedule delays and repeating timers using convenient closure syntax. It

Using async / await on iOS 13: everything you need to know
Using async / await on iOS 13: everything you need to know

Using async / await on iOS 13: everything you need to know! 🚀 Content This repository contains the code sample I've used during December 14th's lives

Demonstration of using Tasks and TaskGroup to thread a calculation.

TasksTest Demonstration of using Tasks and TaskGroup to thread a calculation. The calculation takes place in a separate Swift class that can be reused

Comments
  • Typo in Getting Started... article:

    Typo in Getting Started... article:

    Describe the bug Typo in Getting Started with async/await in SwiftUI article.

    To Reproduce The fourth bullet in the Calling asynchronous code from SwiftUI … section. See here. respponseresponse

    opened by ncooke3 1
  • Misspelling in README.md

    Misspelling in README.md

    Describe the bug There is a bug in the README file.

    To Reproduce Steps to reproduce the behavior:

    1. Go to the "Articles and Videos" section on the README.md
    2. On checkbox number 3, "asynchronously" is misspelled as "asynchronoursly"
    opened by stevenyuser 0
Owner
Peter Friese
Developer Advocate @google on @firebase 🔥
Peter Friese
Tools for using Swift Concurrency on macOS 10.15 Catalina, iOS 13, tvOS 13, and watchOS 6.

ConcurrencyCompatibility Tools for using Swift Concurrency on macOS 10.15 Catalina, iOS 13, tvOS 13, and watchOS 6. Xcode 13.2 adds backwards deployme

Zachary Waldowski 9 Jan 3, 2023
A declarative state management and dependency injection library for SwiftUI x Concurrency

A declarative state management and dependency injection library for SwiftUI x Concurrency

Ryo Aoyama 199 Jan 1, 2023
A complete set of primitives for concurrency and reactive programming on Swift

A complete set of primitives for concurrency and reactive programming on Swift 1.4.0 is the latest and greatest, but only for Swift 4.2 and 5.0 use 1.

AsyncNinja 156 Aug 31, 2022
Venice - Coroutines, structured concurrency and CSP for Swift on macOS and Linux.

Venice provides structured concurrency and CSP for Swift. Features Coroutines Coroutine cancelation Coroutine groups Channels Receive-only chan

Zewo 1.5k Dec 22, 2022
Functional Concurrency Primitives

Concurrent Concurrent is a collection of functional concurrency primitives inspired by Concurrent ML and Concurrent Haskell. Traditional approaches to

TypeLift 206 Dec 24, 2022
A Swift DSL that allows concise and effective concurrency manipulation

NOTE Brisk is being mothballed due to general incompatibilities with modern version of Swift. I recommend checking out ReactiveSwift, which solves man

Jason Fieldman 25 May 24, 2019
⚡️ Fast async task based Swift framework with focus on type safety, concurrency and multi threading

Our apps constantly do work. The faster you react to user input and produce an output, the more likely is that the user will continue to use your appl

Said Sikira 814 Oct 30, 2022
Swift concurrency collection support

AsyncCollections Functions for running async processes on Swift Collections ForEach Run an async function on every element of a Sequence. await array.

Adam Fowler 11 Jul 11, 2022
The projects and materials that accompany the Modern Concurrency in Swift book

Modern Concurrency in Swift: Materials This repo contains all the downloadable materials and projects associated with the Modern Concurrency in Swift

raywenderlich 137 Dec 16, 2022
Type-safe networking with Swift Concurrency

AsyncRequest AsyncRequest is a type-safe framework for building a suite of requests to communicate with an API, built on top of Swift Concurrency. Ins

Light Year Software, LLC 1 Feb 9, 2022