Hello All,
I am currently working through ”Keep going with Apps” in Swift Playground. The section in the tutorial “Add a DancingCreature view” will not complete. I have tried to type it is as written in the tutorial and even used the copy and paste button provided. I have restarted the app and my IPad with no success. I have attached a screen shot of the tutorial prompt.
Here is the code block:
import SwiftUI
import Guide
struct DancingCreatures: View {
//#-learning-code-snippet(varDeclaration)
@EnvironmentObject var data : CreatureZoo
var body: some View {
SPCAssessableGroup(view: self) {
VStack {
ZStack {
/*#-code-walkthrough(dance.forEach)*/
ForEach(data.creatures) { creature in
/*#-code-walkthrough(dance.forEach)*/
/*#-code-walkthrough(dance.textView)*/
Text(creature.emoji)
.resizableFont()
.offset(creature.offset)
.rotationEffect(creature.rotation)
/*#-code-walkthrough(dance.textView)*/
}
}
ZStack {
/*#-code-walkthrough(dance.forEach)*/
ForEach(data.creatures) { creature in
/*#-code-walkthrough(dance.forEach)*/
/*#-code-walkthrough(dance.textView)*/
Text(creature.emoji)
.resizableFont()
.offset(creature.offset)
.rotationEffect(creature.rotation)
/*#-code-walkthrough(dance.textView)*/
//#-learning-code-snippet(exp1)
//#-learning-code-snippet(animationSolution)
//#-learning-code-snippet(exp3)
}
}
/*#-code-walkthrough(dance.onTap)*/
.onTapGesture {
data.randomizeOffsets()
}
/*#-code-walkthrough(dance.onTap)*/
/*#-code-walkthrough(dance.onTap)*/
.onTapGesture {
data.randomizeOffsets()
}
/*#-code-walkthrough(dance.onTap)*/
}
}
}
}
struct DancingCreatures_Previews: PreviewProvider {
static var previews: some View {
DancingCreatures().environmentObject(CreatureZoo())
}
}
Device information: IPad Pro (11 inch, 2nd gen)
iPad OS Version: 26.0.1
Playground Version: 4.6.4
Anyone else come across this?
Thank you in advance.
Swift Playground
RSS for tagLearn and explore coding in Swift through interactive learning experiences on the Swift Playground app for iPadOS and macOS.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
In swift playgrounds on my Mac I keep getting this message, “Keep Going with Apps” would like to access data from other apps. I click allow but it the message keeps popping back up.
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
Have downloaded playgrounds 4.3 to my iPad Air running ipados 16.5.
Trying to use playground “Get started with Apps” but receiving message “Unsupported file format Get Started with Apps.swiftpm cannot be opened in Swift Playgrounds”.
I do not have Mac or windows PC so am stuck! Help ??
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
Tags:
Swift
Swift Playground
Playground Support
Just downloaded the latest Swift Playground for Mac (4.6). The Welcome window does not let you scroll horizontally via mouse, trackpad, or other means, so you can only see the first two Learn to Code resources - similar for the App Gallery and Extend Your App sections.
I'm facing an issue with Swift Playgrounds and files created in Xcode 16. It seems that Swift Playgrounds does not support Swift 6, but even when I create files specifically with Swift 5, Swift Playgrounds still reports that the files are unsupported.
This creates a significant problem because macOS Sequoia does not allow me to revert to Xcode 15, which might have offered better compatibility. As it stands, I can't find a solution to work seamlessly between Xcode and Swift Playgrounds.
Has anyone else encountered this issue? Are there any workarounds or updates planned to address this compatibility gap? Any advice would be greatly appreciated!
Hello,
I am having a recurring issue using Swift Playgrounds version 4.6.4 on macOS 26.1.
Upon opening a file and every other time I start typing in the code section I get a prompt, the image below, two or three times. It doesn't matter if I accept or decline all or some of the prompts, as soon as I start typing on another line I get prompted another two or three times for permission.
It appears to me that prompt generates every time the preview pane tries to update. Declining the prompt breaks the preview but accepting the prompt only gets you through a single line of code before it appears again.
I believe this issue started after I updated to macOS26.1 as I had not encountered it before. I've also opened other files with Swift Playgrounds and encounter the same problem.
It could also be unrelated to the update and could be an issue with some permission setting somewhere, however, I have been unable to find what or where it could be.
Is anyone else experiencing this?
Thank you for your time :)