Coding at Home: WWDC Special #4, the Wrap-Up

Join us today at 1pm when we talk about the final chapter of Swan’s Quest!

The Quest

So Swan’s Quest ended on Friday with one more performance for the swan in Swan’s Quest, Chapter 4.

We added the the playground book for Chapter 4 to our special WWDC feed for ease of use putting it on your iPad.

We’ll spend a little bit of time talking about the final chapter today. The first chapter was an excellent reminder to make sure our apps are accessible, because there are all kinds of users out there.

We focused on playing notes and organizing our code to enable us to do so in a flexible and (relatively) easy to use manner in the last three chapters.

I’ve posted the code online (and will add it to the video description) for solving the puzzle for Chapter 4.

The last three challenges were designed for attendees of WWDC, who are typically professional software engineers who are doing this sort of thing for their day job. So if you’re still learning Swift with us, don’t be too frustrated. These playgrounds give us a nice level of knowledge to aspire to, especially if you’re into music. But don’t forget, most of this code is based on fundamentals you’ve just learned.

Other WWDC goodies

We’ll talk briefly about WWDC and some of the other fun sessions they had this year.

And I’ll also show you one little feature for Reality Composer on the iPad I didn’t realize was there (thanks to @PaulHamilton8!).

This will let us add images to our Reality Composer scenes.

It was an exciting week of great content from the engineers at Apple. We hope you enjoyed our little diversion to Swan’s Quest!

I’ll see you at 1pm, Irish time!

Coding at Home: WWDC Special #3

Join us today for our live coding session at 1pm, Irish time!

Today’s session

Today we’re going to explore Swan’s Quest: Chapter 3, but I’m not quite sure the material lends itself to our session. We’ll see.

There’s some music theory thrown in, subdivision of notes, pitches, frequencies… It’s a little bit Greek to me. But we can take a poke around the playground in the beginning, anyway, and see if we can make head or tails of it.

!! Image from Swan’s Quest: Chapter 3 WWDC20 Session

There are also Protocols, which is an interesting Swift feature, and enumerations, or Enums. This, again, is a little beyond the scope of what we’ve covered so far, but I hope we can make some of it clear.

As before, you can download the Swan’s Quest: Chapter 3 playground from The Code Hub WWDC Playground feed.

Or…

It might not be “or”, it might be “and.”

There was an awesome session yesterday called Create Swift Playgrounds content for iPad and Mac.

The playground book they used in that session was excellent, so we may talk a little bit about that playground book, which is now available in The Code Hub WWDC Playground feed.

We’ll see you at 1pm!

Coding at Home: WWDC Special #2

Join us today at 1pm for some more fun, playing with the new set of playgrounds from Apple, Swan’s Quest!

Swan’s Quest, Chapter 2

Wow.

Have you seen the session for Swan’s Quest, Chapter 2?

It is an awesome playground and builds on the previous challenge, but boy oh boy, are we in deep!

There are some brand new concepts we haven’t covered yet, in our sessions. But we’re going to dive in, anyway, and try and explain and help you solve this new challenge.

First, you’ll want to grab the latest playground from the playground feed we mentioned yesterday.

There’s no VoiceOver setup this time, today we’ll be working with sound, though.

What we’re almost certainly going to want to do is open up the Developer app, either on our iPad or on a Mac.

The Developer page for many sessions (including the Swan’s Quest ones we care about) has a tab bar near the top: Overview, Transcript, and Code.

We’re going to tap on the Code tab if we get stuck.

This tab includes all the code mentioned in the videos. You can copy the code and paste it right into your playground.

This playground uses some advanced stuff. In addition to more advanced audio stuff than we’ve played with, so far, in The Code Hub classes, it includes concepts like Timers, which have some interesting properties, and guard statements, which is a handy control mechanism in Swift.

We’ll talk about all of that stuff today on the session.

In these cases, where the content is that bit more difficult or maybe just something you’re not familiar with (yet), it helps sometimes to copy and paste in code someone insists will work, try it, run it, then play around with it. You can learn a lot by copying someone else’s code and then breaking it!

For the advanced

If you’re blazing ahead, congratulations!

I’ve added the blank Quest Create playground book in the feed, too, so you can grab that and add it to your iPad. It gives you a really interesting starting point for building your own adventure based off this code.

We’ll see you at 1pm, bring some popcorn, patience, and your coding pants!

Coding at Home: June 24th, WWDC Special #1

Join us today at 1pm to get set up for following along with the Swan’s Quest, the new playgrounds from Apple!

Today’s session

I love what Apple is doing with this Swan’s Quest series! We learn about accessibility, which is a hugely important, and often overlooked aspect of programming.

We are going to visit the Swan’s Quest, Chapter 1 session and download the playgrounds and set up our iPad to follow along.

I posted a short video yesterday to walk you through getting set up to use this playground.

So go to the session link and download the playground book.

You’ll need to unzip the file. I had to do it in Files on my desktop… so you can even download that playground book to your desktop and Airdrop it to your iPad for tomorrow’s session.

!!!UPDATE!!!

You can now add the playground book to your iPad via a Swift Playground feed. I’ve added a special, temporary subscribe button on https://thecodehub.ie/playgrounds/ that you can use, from your iPad, to add the playground to your own iPad.

Get the playground book on your iPad, and the next thing you need to do is enable Voiceover support.

First, open up the settings app on your iPad and tap on the Accessibility icon in the settings list.

Scroll down to the bottom of the Accessibility settings and tap on Accessibility Shortcut:

Tap on that item and we’re going to tap on VoiceOver from the next list:

This will let us enable and disable Voiceover by triple-clicking the home button on your iPad.

We can also turn on VoiceOver by going back to the main Accessibility setting screen. At the very top we can tap into VoiceOver and enable it by toggling the switch at the top of the screen:

We’ll need this to solve Swan’s Quest, Chapter 1!

See you at 1pm!

Coding at Home: June 22nd, Augmented Reality AND WWDC2020!

Join us today, WWDC2020 Day (like Christmas Day, but for developers), for some more live coding at 1pm, Irish time!

WWDC2020

Today’s the big day, the kick off of WWDC 2020. We’ll get the big keynote, of course, at 6pm, Irish time, followed by the Platforms State of the Union at 10pm.

They’re always inspiring events to watch, especially if you’re a budding programmer looking for a good, meaty set of problems to solve. Maybe some that you never even realized you could tackle. Like with our Reality Composer work, when we added elements to a book’s cover. Or when we built our own app out of a Swift Playground.

I’ve posted my own wish list for WWDC, but I’m sure there will be plenty of surprises to play with when it’s all said and done.

Today’s session

While we try to keep from bursting, we’ll keep coding in our Augmented Reality Swift Playground today!

We’ll use those actions and start to play with proximity: when the user and their iPad gets close to our models we’ve added to the scene, we’ll be able to run code to react.

We’ll see you today at 1pm for some more coding!

Coding at Home: June 19th, Augmented Reality Swift Playgrounds

Join us today at 1pm for some more coding and augmented reality!

Today’s session

We’re going to continue working on our augmented reality playground today.

We tinkered with some old Swift syntax yesterday; we added an array, we looped through it. For some of it we had to venture off the beaten track, but we’ll review it today.

Today we’ll play some more with these built in actions. These actions are a fairly advanced Swift concept, and you’ve done well on our exercises so far.

In other news

We also posted a lesson for those of you interested in taking your coding that step further: https://ed.ted.com/on/7J6g9Gbi

The video introduces you to Xcode, the tool you use, on your Mac, to build iPhone, iPad, AppleTV, Mac, and Apple Watch apps.

We build a simple app together to show you some of the features of Xcode with a practical goal in mind.

If you have access to a Mac, I highly recommend checking out the video and trying your hand. If you’ve been with us this far, you’re well able for app development!

We’ll see you at 1pm!

Coding at Home: June 18th, Augmented Reality Swift Playgrounds

Join us today to work through some more Swift programming and augmented reality at 1pm, Irish time!

Welcome back, Swift Playgrounds!

So it’s been a while, but we’re back in Swift Playgrounds!

Using the Augmented Reality playground from the Challenges section of “More Playgrounds”, we eased back in to calling functions and creating variables yesterday.

Much of the code we wrote on the second page was similar to the code we were writing in our Lights, Camera, Code series. We have a scene and we need to add our Models to the scene.

These beautiful, pre-built models have some great functionality already baked in, like the ability to animate by just calling their animate() method.

Today’s session

In today’s session we’re going to remind ourselves of a few techniques in Swift to display more models in our scene and shake off some of that rust. The combination of the work we’ve done with Swift and the augmented reality work we did in Reality Composer for these last few sessions are going to go together really nicely!

In other news

If you want to see some of the work other students have done, we have a special preview of one reality file… This student made a domino game for you to play in the comfort of your own home.

I recommend a large, open space, because you’ll be moving around a lot!

Try it out (if you’re on an iPhone or iPad… otherwise, clicking this link will download the reality file for you to play around with):

See you at 1pm!

Coding at Home: Augmented Reality in Swift Playgrounds!

Join us today at 1pm for a bunch more work with Swift Playgrounds and augmented reality!

Today’s Session

We’re back to Swift today!

We’ve done a lot with Reality Composer that last few sessions, now we’re going to dive back into the playgrounds and try our hand at writing some code to build and augmented reality scene!

This is an intermediate playground, so we’ll take our time and ease back into coding after a few days away!

I can’t wait to see what we create!

See you at 1pm, Irish time.

Coding at Home: June 16th, Improving Image Anchors for Reality Composer

Happy Bloomsday!

Join us today at 1pm for some more fun with Reality Composer.

Recap

Yesterday we went over adding an image anchor for a Reality Composer scene. We picked a new book, showed you how to take a picture and trim it to be a good target image.

We also built a series of scenes so we wouldn’t see our assets while we fished around, looking for our image anchor in the real world.

Once we found it we showed a tab we could tap on to get more info about the main character.

This way we can export our experience and share it with friends.

From that character page we then added an arrow to navigate back to the previous scene.

Today’s session

Today we’ll look at what makes a good image anchor and what doesn’t. We’ll give you some tips and tricks for making sure your image gets recognized. And we’ll also look at what’s happening, with our image anchor.

So catch up with us and we’ll play around with some more augmented reality!

Coding at Home: June 15th, Reality Composer and Image Anchors Again

Join us today at 1pm for more with Reality Composer and image anchors!

Last week

We had so much crammed into Friday’s session that it might have been a little overwhelming.

So we’re going to cover some of that same stuff again today.

Today’s session

On Friday we used a book cover as our anchor. That meant taking a photo of the front of our book and importing it into Reality Composer to use as our image anchor. We had to set the size we expected our image to be in real life so RealityKit had an easier time recognizing it.

We also built a small table of contents viewer that navigated to different scenes.

That’s a lot of moving pieces!

Like the book we picked say, “Don’t Panic.”

We’ll go over all of it again today, nice and slow, to make sure we get it.

See you at 1pm!