Diploma in Apple Development 🍎👩🏻‍💻: Coding One: Lecture 2: Introduction to Swift, Constants, Variables and Operators, Swift REPL, Xcode, Xcode playgrounds and SwiftUI
Back to slide index.
👋🏻 Hi!
First, don't forget to confirm your attendance using the Seats Mobile app!
Second, I'm going to start every lecture with a meditation from the fantastic Sitting Still Like a Frog book, all read by Myla Kabat-Zinn. If you don't want to participate that's completely fine.
What is Swift? Let's look at the Swift homepage, which is at:https://www.swift.org. What does Wikipedia say about Swift?
What does Apple say about Swift? Let's look at the Swift page on developer.apple.com: https://developer.apple.com/swift/
Apple's new approach to collecting all their videos, documentation and resources are known as Pathways. You can see all the Pathways at: https://developer.apple.com/pathways/. Let's take a look at the Swift Pathway, at https://developer.apple.com/swift/pathway/.
Swift isn't just for making apps on Apple hardware, you can also use it to make cross platform web browsers, web applications or games for the Playdate.
Let's go through the Block One lectures in Coding One.
Time for a Keynote from Develop in Swift Fundamentals, part of the Develop in Swift curriculum, "Introduction to Swift and Playgrounds". As well as the book, you can download all the content from the book by looking at the Apple Textbooks section of the Apple Diploma wiki.
Another Keynote from Develop in Swift Fundamentals, "Constants, Variables and Data Types". What does the Swift Book say about Constants, Variables and Data Types? By the way, whenever I'm writing Swift, I find it REALLY useful to have A Swift Tour open in a browser window. I recommend you do the same.
One more Develop in Swift Fundamentals Keynote, "Operators". What does the Swift Book say about Operators?
What is SwiftUI? Let's see what Apple says about SwiftUI. What documentation is available for SwiftUI? What does the SwiftUI Pathway contain?
Every year, Apple hosts a World Wide Developers Conference aka WWDC aka Dub Dub. It's the place where Apple debuts new technology that you (their developers) can use to make new software. Most sessions from WWDC are archived at: https://developer.apple.com/videos/. As well as Pathways and the Develop in Swift curriculum we will be making extensive use of them over the next academic year. They are a really well produced free resource that you'll be able to reference this year and onwards in your developer career.
An important thing to remember is that Apple is always revising its code, meaning that often videos and other content can become out of date. This is another of the joys of becoming a programmer - life long learning!
Let's start our WWDC video exploration with:
"Introduction to SwiftUI" (54 mins)
"Explore the world of declarative-style programming: Discover how to build a fully-functioning SwiftUI app from scratch as we explain the benefits of writing declarative code and how SwiftUI and Xcode can combine forces to help you build great apps, faster."
Let's continue this lecture's WWDC video exploration with:
"App essentials in SwiftUI" (16 mins)
"Thanks to the new App protocol, SwiftUI now supports building entire apps! See how Apps, Scenes, and Views fit together. Learn how easy it is to implement the features people expect from a best-in-class product while saving time and reducing complexity. Easily add expected functionality to your interface using the new commands modifier, and explore the ins and outs of the new WindowGroup API."
Let's finish this lecture's WWDC video exploration with:
"Stacks, Grids, and Outlines in SwiftUI" (20 mins)
"Display detailed data in your SwiftUI apps more quickly and efficiently with improved stacks and new list and outline views. Now available on iOS and iPadOS for the first time, outlines are a new multi-platform tool for expressing hierarchical data that work alongside stacks and lists. Learn how to use new and improved tools in SwiftUI to display more content on screen when using table views, create smooth-scrolling and responsive stacks, and build out list views for content that needs more than a vStack can provide. Take your layout options even further with the new grid view, as well as disclosure groups."
Finally, let's complete the Build an iOS app with SwiftUI guide from Swift.org.
Homework:
  1. Review today's content.
  2. Complete the three playgrounds from today's lectures from Develop in Swift Fundamentals: Lab - Introduction.playground, Lab - Constants and Variables.playground and Lab - Operators.playground. Don't forget completed versions can be found in the Teacher.zip download. Check the wiki for download links.
  3. Slack me with any problems or queries. See you on Friday for the next Spatial lecture, the next ML lecture is first, on Thursday from 0930.
Thanks!
Back to slide index.