

Swift Playgrounds 4.0: First Look
source link: https://www.macstories.net/news/swift-playgrounds-4-0-first-look/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Swift Playgrounds 4.0: First Look

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.
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.
Starting a coding project from Playgrounds isn’t new either. However, now, you can take that project, submit it to the App Store and sell it once the app clears the App Review process – all from an iPad. That’s a very big deal because it’s the first time an app can be created end-to-end on the same device that runs it. Swift Playgrounds can be used to create apps with iOS and iPadOS 15.2 that run on iPhones, iPads, and M1 Macs, but you cannot create Apple Watch apps or Mac apps that aren’t built for iOS or iPadOS.
Creating my first Swift Playgrounds project.
The update to version 4.0 requires iPadOS 15.2. Once installed, the most recent version of the Swift programming language and Apple’s SwiftUI framework for building app UIs are both available. As you work on an app, you can monitor a live preview that changes as you work on your code. That preview can be taken full-screen too. The editor has code-completion suggestions, project-based search, keyboard support, a snippets library of SwiftUI interface elements, and Swift Package support that allows for integrating third-party code into projects. Projects can also be moved back and forth between Swift Playgrounds and Xcode.
The update is a big step forward, but there are still limitations compared to building an app with Xcode on a Mac. Steve Troughton-Smith has been tweeting his first impressions of Swift Playgrounds, and although I think it’s fair to say he’s been impressed overall, he’s also run into some notable limitations like the lack of access to In-App Purchases if you build an app on the iPad.
I can already tell that Swift Playgrounds 4 is a big deal. It is pretty much exactly what I was hoping for from an ‘Xcode for iPad’, more than just an upgrade to previously slow & clunky Playgrounds app. It dramatically reframes what iPad is capable of even in this first offering
— Steve Troughton-Smith (@stroughtonsmith) December 15, 2021
While you can monetize your app as a paid-upfront app just fine, there’s no access to In-App Purchase, which feels like an unnecessary restriction on people learning to develop iOS apps through Playgrounds — paid-upfront is extremely hard to make work even for experienced devs pic.twitter.com/nN93bG017g
— Steve Troughton-Smith (@stroughtonsmith) December 15, 2021
Swift Playgrounds’ limitations aren’t surprising. Creating a usable development environment on an iPad is a significant challenge. I haven’t tried building anything myself yet, but from what I’ve seen, Swift Playgrounds 4.0 is a huge step forward that I expect Apple will continue to refine and expand if the app’s last five years of development are any indication.
Recommend
-
37
README.md
-
31
Swift Playgrounds is a revolutionary app for Mac and iPad that makes it fun to learn and experiment with code. You solve interactive puzzles in the guided “Learn to Code” lessons to master the basics of coding, or experi...
-
8
I made a Swift Playground for iOS 12 that opens the Memoji editor on iPad. Along the way, I learned to swizzle Obj-C methods in Swift and to use a library with no documentation. Download
-
14
Develop and publish apps from your iPad with Swift Playgrounds for iPadOS 15 by Imran HussainJun 9, 2021Jun 9, 2021 Apple has announced S...
-
9
AppKit in Swift Playgrounds Tuesday, February 11, 2020 A Catalyst version of
-
5
Swift Playgrounds now allows you to build and publish apps on your iPadSwift Playgrounds was first revealed during WWDC in 2016. The app initially would only work on iPads, but Apple has recently expanded support to include
-
14
Swift Playgrounds 4 is here, and it’s a thing of beauty Building complete apps on your iPad is now possible. At WWDC21 Apple revealed that Swift Playgrounds was getting a huge upgrade to allow us...
-
4
Swift Playgrounds 4上线,在iPad上也能编程了三易生活·10小时前Swift Playgrounds 4的上线,让iPad的生产力工具属性更强了。自2018年推...
-
4
Apple’s Swift Playgrounds 4 Now Lets Developers Create Apps Directly from iPad By Jesse Hol...
-
13
Swift student challenge winners named for Swift Playgrounds projects
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK