chadarutherford / Swift-Async-Await-Experiments

Experiments with Swift's new async/await feature (SE 0296)

Home Page:https://peterfriese.dev/async-await-in-swiftui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues Discussions Feature Requests License


Logo

Swift async/await Experiments

Experiments with Swift's new async/await feature (SE 0296)

Join the discussion · Report Bug · Request Feature

About The Project

Experiments with Swift's new async/await feature (SE 0296)

Here's an article that shows you how to use this feature.

Requirements

The code in this repository makes use of the experimental Swift compiler toolchain.

  • Xcode 12.3 or later
  • Swift Compiler Toolchain (Jan 04, 2021 or later)

Getting Started

To compile and run the code, make sure to follow these steps:

  1. Download the experimental Swift compiler toolchain from the Snapshots/main section on the downloads page (I use the Feb 02 2021 development snapshot)
  2. Install the toolchain by double-clicking the package
  3. Activate the toolchain in Xcode (via Settings > Components > Toolchains)

In case you're stuck, Apple has detailed instructions over here.

Please note that (for a reason I don't yet understand), it's not possible to debug your code using the experimental toolchain. If you run your code and you get an error message saying LLDB couldn't attach to your process or similar, turn off debugging:

  • Edit your launch scheme
  • Navigate into the Run section
  • Make sure Info > Debug executable is unchecked

Unfortunately, you can only select the toolchain on a global level, so keep in mind to select the built-in toolchain when you're done playing around with the code in this repository and want to go back working on your own app!

License

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

About

Experiments with Swift's new async/await feature (SE 0296)

https://peterfriese.dev/async-await-in-swiftui/

License:Apache License 2.0


Languages

Language:Swift 100.0%