This Week's Sponsor:

Kolide

Ensures that if a device isn’t secure it can’t access your apps.  It’s Device Trust for Okta.


Posts tagged with "Swift"

Building Games for Playdate in Swift

Panic’s Playdate has been in the news again recently. The company has caught up with pre-orders, so anyone can order one, and it will ship within 2-3 days. Also, Lucas Pope, the creator of beloved games like Papers, Please and Return of the Obra Dinn just released Mars After Midnight, a game I plan to dig into this weekend. The Playdate catalog is also running its first-ever sale, but there’s just one day left, so check it out today.

Most recently, I saw Panic’s Cabel Sasser link on Threads to a post by Rauhul Varma on the Swift.org blog. The Playdate’s developer SDK supports Lua and C, and as Varma explains, “the typical Swift application and runtime exceed the device’s tight resource constraints.”

However, Varma, who is an engineer in Apple’s Advanced Prototyping in the Platform Architecture group, had an idea for building Playdate games that would fit on the device:

Recently, the Swift project began developing a new embedded language mode to support highly constrained platforms. This mode utilizes generic specialization, inlining, and dead code stripping to produce tiny binaries, while retaining the core features of Swift…

These defining characteristics make the embedded language mode a great solution for shrinking Swift to fit the Playdate’s constraints.

To demonstrate the approach, Varma shares two games built in Swift: Conway’s Game of Life, which is a sample included in the Playdate SDK, and a Breakout-like game called Swift-Break. For developers who are interested in building games for the Playdate using Swift, Varma’s post includes a detailed explanation of the process, and the code and documentation are available on GitHub.

I love this project because it lowers the barrier to getting started for Swift developers who may not be as comfortable or familiar with Lua or C. I hope this leads to even more great releases for Panic’s awesome little handheld game platform.

Permalink

Apple Opens the 2024 Swift Student Challenge to Submissions

Source: Apple.

Source: Apple.

Apple has opened up submissions for the 2024 Swift Student Challenge. As we reported last November, the format of this year’s format is a little different than in the past. Eligible students have from today through February 25, 2024, to submit their app playgrounds on a topic of their choosing.

Apple will choose 350 winners from the entries submitted and name 50 of those Distinguished Winners who will be invited by Apple to visit its Cupertino headquarters. All winners will receive a one-year membership in the Apple Developer Program, a voucher to take an App Development with Swift certification exam, and a special gift.

Two of my kids participated in the Swift Student Challenge in the past. If you know a student who’s interested in learning to code, I know from experience that this is a great way to get them started and excited about the subject.

Permalink

Apple Announces the Swift Student Challenge Will Begin in February 2024 and New Everyone Can Code Resources

Source: Apple.

Source: Apple.

It’s hard to believe that it has been over nine years since Apple announced the Swift programming language at WWDC. From the day it debuted, one of the pillars of Swift has been Apple’s education efforts, which have included Swift Playgrounds, materials for teachers and students, events, coding centers, and of course, the annual Swift Student Challenge at WWDC. So, with Swift’s 10th anniversary around the corner, it’s not surprising that Apple is updating its Swift Student Challenge program and releasing new resources for educators.

Today, the company announced that the next Swift Student Challenge will begin in February 2024, a break from the past WWDC schedule. The competition will name 350 winners in total, 50 of whom will be named Distinguished Winners whose projects stand out from the other submissions. Distinguished Winners will be invited to Apple’s headquarters in Cupertino in the summer to meet with Apple engineers and other winners, and all winners will receive a one-year membership to the Apple Developer Program.

The Swift Student Challenge will run for three weeks in February 2024, and students can sign up to be notified of when the competition will begin here.

Apple is also expanding its Everyone Can Code program with four new projects providing additional resources for students to learn to build apps. The projects, which provide educators with resources to guide students, include the following:

  • Design a Simple App: Students can create an app prototype in Keynote to learn the fundamentals of app design, practice rapid prototyping, and collect feedback, following the same steps as professional developers. 
  • Build with Stacks and Shapes: Students can take the first steps of building an app in Swift Playgrounds and code a self-portrait or a work of art using SwiftUI to learn the fundamentals of user interface design.
  • Build Custom Shapes: Students can bring an app interface to the next level by designing a shape, learning how to plot the coordinates, and coding their custom shape using SwiftUI and the About Me sample app within Swift Playgrounds.
  • Design an App Icon: Students can learn and apply app design principles to create a unique and memorable app icon that communicates an idea; practice rapid prototyping; collect feedback; and upload the icon to Swift Playgrounds to become part of an app.

The projects can be accessed by educators from the Apple Education Community website.

The expansion of the Swift Student Challenge and other announcements today are great to see. It’s a fantastic way to get students excited about coding, as we’ve seen first-hand based on the growing number of apps we write about at MacStories that were built by former Challenge participants. I’m looking forward to seeing what students come up with this year.


Apple to Offer a New Coding Lab for Kids Beginning Next Week

Next week, Apple is introducing a new Today at Apple session for kids who are interested in learning to code: Coding Lab for Kids: Code Your First App. Starting December 5th, the session will walk children 10 and up through building an app with Swift Playgrounds.

According to Apple’s press release:

During the lab, Apple Creative Pros will lead aspiring coders and their guardians in an interactive activity using iPad and Swift Playgrounds…. Working in the About Me playground, participants will use SwiftUI and a new, real-time app preview to customize and bring their app to life with fun fonts, background colors, Memoji, and more.

After its debut, Coding Lab for Kids: Code Your First App will become a regular part of the Today at Apple programming.

As a parent, I’m always glad to see sessions like this added to Today at Apple. The company offers a lot of interesting programs, but having helped my kids find resources to learn to code when they were younger was difficult. Introductory sessions like the one announced today and Apple’s other resources for parents and educators have come a long way in recent years and now enable a wide spectrum of kids who are interested in coding to find the materials to help them get started.

If you want to sign a kid up, you can look for a nearby Apple Store offering the session here.


Swift Playgrounds 4.0: First Look

Source: Apple.

Source: Apple.

Yesterday, Apple released Swift Playgrounds 4.0, the first version of the app from which you can build an app and publish it on the App Store. That’s a big step forward for the app that started as a limited sandbox for learning to code. The app is not as capable as Xcode. Still, with support for Swift 5.5, live previewing of the app you’re building as you code, multiwindowing, access to SwiftUI, UIKit, the ability to move projects between Swift Playgrounds and Xcode, and more, the app has an enormous amount of potential waiting to be tapped.

Apple's coding course selection has grown steadily since 2016.

Apple’s coding course selection has grown steadily since 2016.

Swift Playgrounds has steadily improved since its introduction in 2016 on the iPad and launch on the Mac last year. Early versions of the app were firmly grounded in learning to code. That’s still the case. The app includes an extensive catalog of lessons on how to code and build apps. There’s also a new ‘Get Started with Apps’ lesson and an App Gallery section that includes several sample apps to help teach coding basics.

Read more


MacStories Developer Debrief: WWDC 2021

We kicked off the MacStories Summer OS Preview Series on AppStories a couple of weeks ago with interviews of four 2021 Apple Design Award winners. We’ll also publish a series of in-depth first-looks at what users can expect this fall from iOS and iPadOS 15, macOS Monterey, and watchOS 8. We’ll also be interviewing developers on AppStories, exploring the technical details that we expect will have the biggest impact on upcoming app updates and releases. You can follow along with the series through our dedicated hub or subscribe to its RSS feed.

Today, we wanted to continue the conversations that began with the AppStories ADA interviews by talking to seven more developers about a wide range of topics. Now that the initial excitement has passed and the dust settled from WWDC, we wanted to hear more from the developers who will be using Apple’s latest technologies to bring readers new apps and innovative updates to readers this fall.

This year, we spoke to:

The following is a collection of the responses from each of the developers I interviewed on a wide range of topics from new frameworks and APIs to Shortcuts on the Mac, the ability to publish apps built on the iPad, SharePlay, SwiftUI, Swift concurrency, and more. Thanks so much to everyone for sharing their insights on these topics with MacStories readers. We greatly appreciate everyone taking time out of their busy post-WWDC schedules to participate.

I received fantastic, thoughtful responses from all of the developers I interviewed, which resulted in more material than I could use for this story. However, we’ll be featuring unabridged versions of the interviews in the next two issues of MacStories Weekly. It’s an excellent way to get an even deeper sense of the ramifications of this year’s WWDC announcements. If you’re not already a member, you can learn more at club.macstories.net or sign up below.

Read more


Apple Updates Coding Resources for Students, Teachers, and Families

Apple has updated its lineup of coding resources for kids and educators across the board and introduced all-new resources for parents and children interested in learning to program from home.

Apple first introduced its Everyone to Code program in 2016. That program was joined by Develop in Swift in 2019. Between the two programs, Apple has developed resources for students of all ages and their teachers. With today’s announcement, Apple has updated its existing materials and is expanding them with new offerings. As Susan Prescott, Apple’s vice president of Markets, Apps, and Services describes it in an Apple press release:

“Apple has worked alongside educators for 40 years, and we’re especially proud to see how Develop in Swift and Everyone Can Code have been instrumental in helping teachers and students make an impact in their communities. We’ve seen community college students build food security apps for their campus and watched middle school educators host virtual coding clubs over summer break. As part of our commitment to help expand access to computer science education, we are thrilled to be adding a new professional learning course to help more educators, regardless of their experience, have the opportunity to learn coding and teach the next generation of developers and designers.”

The new course that Prescott mentions is a free online course that educators can take to prepare themselves to teach Apple’s Develop in Swift curriculum.

Apple has also updated its set of four free Develop in Swift books that are available from the Apple Books app. The company also introduced a new Everyone Can Code book and teacher guide called Everyone Can Code: Adventures, which is also available in Apple Books.

Also introduced today is a new coding guide that parents and their kids can use at home:

To support parents with kids learning to code at home, Apple is adding a new guide to its set of remote learning resources. “A Quick Start to Code” is now available and features 10 coding challenges designed for learners ages 10 and up, on iPad or Mac. Additional resources are available on Apple’s new Learning from Home website, launched this spring, where educators and parents can access on-demand videos and virtual conferences on remote learning, and schedule free one-on-one virtual coaching sessions, all hosted by educators at Apple. New videos are being added all the time as part of the Apple Education Learning Series — including videos about using Apple’s industry-leading accessibility features.

As someone who struggled to find good resources for my kids to learn to code when they were younger, I’m pleased to see that Apple has continued to expand and support its educational programs. These programs, along with Swift Playgrounds, are rich resources for kids, teachers, and their parents and a terrific way to help kids get started with coding.

Permalink

Apple Highlights Swift Student Challenge Winners

One unique component of Apple’s online WWDC this year is that the company opened a Swift Student Challenge where students could submit a Swift playground creation for special recognition. Today in a press release, Apple is highlighting three of the 350 winners: Sofia Ongele, Palash Taneja, and Devin Green.

For Sofia Ongele, 19, who just finished her sophomore year at New York’s Fordham University, her focus for change lies at the intersection of tech and social justice. ReDawn, her first iOS app, is a powerful example. After one of her college friends was sexually assaulted during her freshman year, Ongele created ReDawn to help survivors access resources in a safe, easy, and sensitive way.
[…]
Palash Taneja…went on to create a web-based tool that uses machine learning to predict how mosquito-borne diseases like dengue fever would spread. And for his Swift Student Challenge submission this year, created against the backdrop of COVID-19, Taneja designed a Swift playground that teaches coding while simulating how a pandemic moves through a population, showing how precautions such as social distancing and masks can help slow infection rates. He created it to help educate young people, after he saw others not taking warnings seriously.
[…]
Devin Green…was having trouble waking up in the mornings, so he designed a program using a pressure mat under his bed. If weight is still on the mat after he’s supposed to be up, an alarm goes off and won’t stop until he uses his phone to scan a QR code.

Apple has also created, naturally, a new post on the App Store where it’s highlighting three more winners and their apps: Lars Augustin, creator of Charcoal, Maria Fernanda Azolin, creator of DressApp, and Ritesh Kanchi, creator of STEMpump. Out of these, Charcoal is an app we’ve covered in our newsletter in the past, it’s an elegant way to perform quick sketches on your iPhone or iPad.

The Swift Student Challenge is a unique way for Apple to highlight some of the best and brightest young coders working on Apple platforms today. I loved reading the details about each of the six winners featured today, and hope we’ll get to learn about more of the 350 winners in the week ahead. With so many winners to recognize, perhaps we’ll see new App Store stories each day leading up to the conference.


Apple Introduces Mac Catalyst Version of Swift Playgrounds

Swift Playgrounds has been around for quite a while on the iPad, but now, it’s on the Mac too as a Mac Catalyst app.

Swift Playgrounds teaches coding concepts and the Swift programming language. Until today, the app, which includes lessons designed to teach Swift alongside a coding environment, was an iPad exclusive. Now, however, anyone interested in learning Swift can move from the iPad to the Mac and back again.

I’ve been a fan of Swift Playgrounds since it debuted. It’s a friendly, easy-to-use environment for experimenting with Swift ideas and concepts, and the lessons available are excellent. With the addition of a native Catalyst app on the Mac, anyone who wants to learn Swift can do so whether they are in front of their Mac or using an iPad. What’s more, the additional space afforded by most Macs there’s more room to navigate playground books and files. Playgrounds on the Mac includes expanded code completion functionality that allows you to navigate code suggestions with the arrow keys on your keyboard or trackpad too.

I haven’t had a chance to spend more than a few minutes with the new Swift Playgrounds yet, but it’s clear from even a cursory review of the app that a lot of thought and care has gone into it. The sidebar and Touch Bar support stand out as terrific Mac-centric additions that take advantage of the Mac’s bigger screen and keyboard and trackpad. I’m looking forward to diving spending more time with Swift Playgrounds on my Mac mini in the coming weeks.

Swift Playgrounds is available as a free download on the Mac App Store and requires macOS Catalina 10.15.3.