This is the root project where you'll learn how to create a mobile application on iOS with SwiftUI.
You will need to download Xcode 13 (or later) either from the App store or from Dev.Apple.com.
Easy Way
The tutorial is hosted on Github Pages or you can pull the project and build the documentation to see it in xCode
Hard Way
You can run the project by clicking on the Xcode project file. When it opens it will fetch the Documentation Package that contains the tutorial (If this fails, you may need to add your git credentials to Xcode from its settings, if it still fails, it's usually related to your ssh configuration. Ask me and I'll help you with it.)
Once the Swift Package finishes the download, you can press CMD
+ Control
+ Shift
+ D
to compile the docs and open them. You should see The Apple documentation viewer open. On the left is the navigation. You can open the tutorial there.
As of right now the mobile experience will not always show all of the changed lines of code for a step in the tutorial. Going split screen on a laptop with Xcode + Apple Docs will usually put you into the mobile experience.
This repository holds the necessary code to start the tutorial. When you launch the docs, you can use this Xcode project to follow along.
Now, this tutorial isn't for a total beginner, it does assume some basic knowledge of Swift and Xcode. Here are a couple of helpful resources:
- To learn a little about Xcode checkout this tutorial. You can ignore the interface builder, playgrounds, and xcode settings sections for the purposes of this tutorial.
- For in depth learning about Swift I would check out their docs.
We will be interacting with an API that I wrote. The API docs are available here in the README.
From a *.swift
file:
- To open the preview canvas you can press
option
+cmd
+enter
- To build/resume the preview you can press
option
+cmd
+p