Swift Tutorials
This is not a package, it's just a bunch of tutorials
This project uses Apple's DocC (Documentation Compiler) to create a set of SwiftUI tutorials for students.
Requirements
- Xcode 13.0 (Beta 5)
Creating DocC
- Open the
Package.swift
file - In the menu bar, Product → Build Documentation
- Alternatively, if you have the dexterity for it, use ⌘+⌃+⇧+D (Command+Control+Shift+D)
- The tutorials should open up in the Documentation viewer
DocC on Web
Thanks Ryan The for helping with the web set up.
Building
- Run
npm i
in theWeb
folder - To run it locally, run
npm run dev
- Open http://localhost:3000/ with your browser to see the results.
Updating DocC
Don't bother editing the /Web/Sources
folder as it is auto-generated by running build.sh
.
There is a GitHub Action to deploy onto Vercel. If it is on main
, it should be on production.
Run build.sh
to update the DocC web
$ sh build.sh
Errors (and possible solutions)
xcodebuild: error: Unknown build action 'docbuild'.
- Run
xcode-select --switch /Path/To/Xcode.app
. - Ensure the path leads to Xcode 13.
- Run
Contributing
For more information on contributing to these tutorials, visit learn.swiftinsg.org/contributing.
Issues
Spot an issue in the tutorial? Use the issues template to submit an issue