Swift Playground

RSS for tag

Learn and explore coding in Swift through interactive learning experiences on the Swift Playground app for iPadOS and macOS.

Swift Playground Documentation

Posts under Swift Playground subtopic

Post

Replies

Boosts

Views

Activity

“Keep Going with Apps” Tutorial section will not complete.
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.
2
1
98
4d
Reoccurring data access prompt issue with Swift Playgrounds 4.6.4 on macOS 26.1
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 :)
9
4
266
1d