In a recent tutorial, we looked at the SwiftUI List and included a very brief introduction to Swipe actions. In this tutorial we’ll expand on this in the form of a simple To-Do list app that allows you to swipe to flag or delete tasks. We will also utilise SwiftData hosted in CloudKit so that tasks can be synchronised across devices.
Start by creating a new iOS app by opening Xcode and selecting New > Project.
Select SwiftUI for interface, Swift for language, SwiftData for storage, and make sure Host in CloudKit is selected. Ensure that you select a Team that is a company and not the personal option. SwiftData stored in iCloud requires a development team to be selected.
[Read more…]