App Development in Swift Playgrounds for iPad
www.mattrichards.net.au | facebook.com/mattrichardscdl
Swift Playgrounds is a powerful and intuitive place to learn Swift Code. At first glance, some may be put off by the ‘code-y’ nature of the language, but spend a little time, engage with curiosity and dive a little deeper, and you will find a fun and engaging tool on which to build out your Swift coding language. An update to Playgrounds run December 2021, propelled the app into a new level of creativity - App Creation.
To now, app creation was exclusively for those using Xcode on a Mac. A behemoth of an app that ticks all the right boxes and used by seasoned app developers. For the education world filled with iPad, a gap had finally been filled.
Beyond the blank template for Apps (I’ll get to this later) Playgrounds now offers the new “App Gallery” section, providing users with templates from which to build out fully functioning apps.
Two great starting points are the: “About Me” and “Choose Your Own Story” templates.
As the name suggests, ‘Choose Your Own Story’ allows creators to take their own multi-directional narrative and set it into an interactive app. While the app’s coding work has been pre-scaffolded for you, it does leaves users to build out and create additional elements and amplify their app in unique and interesting ways.
So what’s the special sauce for the code-challenged? Well, here is where these templates step up. Each template has an app Walk-Through - a user guide that steps you through each aspect of the code - what it is, what it does and how to manipulate it. Use this to your advantage!
When getting started in this space, I always say to students and educators alike, ‘look for the relationships’… as in, look for the connections between what is written in code and what you see in the App Preview.
The “About Me” app template is a great place to find code > design connections. Take a look and you will immediately notice relationships between:
- file names and… tabs
- Text (strings) in red and… the same text appearing in the preview
- Modifiers (fontWeight, colour, etc ) and… text appearance
As you experiment in this space, making changes, your confidence in ‘playing’ with code will undoubtedly grow. The instant gratification of seeing change happen will only encourage you to experiment further - and further.
Don’t forget, there is always an ‘undo’ button should you need it!
So here’s some of my hot tips when starting out in exploring App Development in Swift Playgrounds 4:
- Adding an external keyboard / trackpad / mouse to your iPad is liberating! - trust me, the extra screen real estate is worth it when coding!
- Code is written in American English, eg. ’color’, ‘resizable’, ‘center’
- Red spots beside code means, ‘error’ - there’s something to fix.
- Adding your own images as assets? Name them appropriately - avoid ‘pic1’, ‘pic2’…
- Code is caseSensitive
- !! Experiment by finding relationships between what’s written in code - and what you see in the Preview.
More information
“Celebrating You” Educator Guide [https://apple.co/celebrating-you-atlc-pdf]
Everyone Can Code App Design Journal Journal [https://education-static.apple.com/coding-club-kit/appjournal.key?cid=pm-enus-atlc-na-edu-eccode-launch22]
November 29, 2022
Thanks for sharing Matt. I love the "About me" templates, so easy for students (and teachers like me) to access!
I will have a look at the story template next.
This action is unavailable while under moderation.
This action is unavailable while under moderation.