The “Get Started with Apps” in Playgrounds looks great but it won’t allow me to advance to the next activity. It seems to think that my solution is incorrect, but what I did matches the solution provided in the “hint.” This could be corrected by either allowing for more variety in the responses, or by allowing the user to advance to the next activity regardless of whether the response they provided was correct.
Swift Playgrounds
RSS for tagLearn and explore coding in Swift through interactive learning experiences on the Swift Playgrounds app for iPadOS and macOS.
Post
Replies
Boosts
Views
Activity
Hi,
I have a problem with making a swift playgrounds app walkthrough. I followed the steps exactly and modified my Package.swift a bit (in the targets section):
.executableTarget(name: "App", dependencies: ["Guide"], path: "App"),
.target(
name: "Guide",
path: "Guide",
resources: [
.process("Guide.tutorial"),
])
Now when I open the project in Playgrounds I get this error:
public headers ("include") directory path for 'Guide' is invalid or not contained in the target
Any help would be appreciated.
Thanks
When I open a new blank playground in Xcode the very first line "import cocoa" gets the alert "Could not build Objective-C module 'Cocoa'". Can someone please tell me what I have done wrong and how I can fix it.
Xcode 15.0.1
Ventura 13.6.1
Hi,
I want to learn SWIFT and started to use SWIFT Playgrounds 4.4 on iPad and MacBook Air. Unfortunately SWIFT Playgrounds unexpectedly crashes every 2nd to 3rd chapter I work on. I am currently trying to finish "Los gehts mit Code" and "Programmieren lernen 1".
Is the app really so buggy, that it randomly crashes on executing the starting chapters ?
Hi there,
I am trying to add functionalities for my app developed using Swift Playgrounds environment on mac.
There is a plus button that opens an interface where I can choose the feature in question.
Until here, no problem you would say!
But my problem is that I don’t know which package should I use or even import to develop my application?
Best regards,
Hi.
I want to make my Playground Book public.
How can I prepare and provide Swift Playgrounds subscription server?
Thanks.
Hi,
I wanted to learn basics on developing in iOS and started with Swift Explorations. I have installed Xcode 15.0.1 and running it on Ventura 13.5.1. When I execute the Playgroung Basics.playground file, I get an error message saying "Failed to attach to stub for playground execution".
Any clue as to why that might be? I am able to create my own playground and execute it properly. I searched around but could not find anything on the topic (other than disablig Rosetta which is not an option as far I can tell in my case; don't see that checkbox under Get Info).
Any pointer would be welcome.
Cheers,
Piloo
I am trying to generate a simple playground to display Table structure with several TableColumns. Basically, generated a new blank playground; add import statements for SwiftUI and PlayGround support; add structure for content view and a statement for invoking that view as:
`PlaygroundPage.current.setLiveView(ContentView())
In general, all of the view components work as expected EXCEPT for the table structure which does not display anything. Its basic structure is:
Table(rows, selection: $selRow) {
TableColumn("ID") {Text(String($0.id))}
TableColumn("Name", value: \.nt)
}
where "rows" is an array of the structure TRow:
struct TRow : Identifiable {
var id:Int
var num:Int
var nt:String
}
Is there some special trick to allowing a SwiftUI Table to be displayed in Playground?
I am trying to implement a ML model with Core ML in a playground for a Student Challenge project, but I can not get it to work. I have already tried everything I found online but nothing seems to work (the tutorials where posted long time ago). Anyone knows how to do this with Xcode 15 and the most recent updates?
Hello everyone,
Is there a way to set the minimum deployment target in Xcode Playground?
Hi! I'm preparing to apply for the Swift Student Challenge and had a question.
In the terms and conditions, it says
"Your app playground must be built with and run on Swift Playgrounds 4.4 or later (requires iPadOS 16 or macOS 13.5) or Xcode 15 on macOS 13.5 or later. You may incorporate the use of Apple Pencil."
Does this mean that my app must run on iPadOS 16 or macOS 13.5, or can it run on iPadOS 17 or macOS 14 or later as long as it runs on Playgrounds 4.4?
In other words, what should I set my Deployment Target to?
Thanks for your help in advance 😜
I am using Swift Playground to teach "coding" to my nephew. One of the strict requirements I am trying to explain him is: when you are required to solve a problem, you need to use only the instructions/harward/etc you have available.
In the first episode of "Get started with code" -> "Commands" -> "Issuing commands", you are presented with two commands moveForward() and collectGem().
In the second episode "Toggle a Switch" you are introduced to a new command "toggleSwitch()".
Up to this point, the learner was introduced to three commands: moveForward(), collectGem(), toggleSwitch().
However, in order to solve the puzzle in the second episode, you need also to use another command: turnLeft(), that has not been referenced.
It is clear that looking for unknown commands is part of learning to code, but this occurs too early in the playground. Please consider also that some non-English young learners have no idea on how to write "turn left", so they cannot even type the first letters and hope in the auto-completion of the commands.
This has not been well thought by the designers of the playground.
Hi! I'm preparing to apply for the Swift Student Challenge and had a question, how can I find info.plist in Xcode 15.2 playground I will do a game AR game and I need info.plist to access to camera so how can I find info.plist ?
https://www.swift.org/getting-started/swiftui/
Is there a better tutorial than this one. Can't seem to find a live youtube video that teaches it. I went to git hub and downloaded the source code but all it shows is a big round blue circle. I can't seem to get pass the below code without it giving me an error. I need to see this tutorial live. Any suggestions?
struct ContentView: View {
var activities = ["Archery", "Baseball", "Basketball", "Bowling", "Boxing", "Cricket", "Curling", "Fencing", "Golf", "Hiking", "Lacrosse", "Rugby", "Squash"]
var selected = "Archery"
var body: some View {
// ...
}
}
Hello, is the new Journaling Suggestions API available in App Playgrounds (made using Xcode)?
I know I can add capabilities in Xcode, but it seems that the Journaling Suggestions capability isn't available. I assume this API is currently unsupported in App Playgrounds?
Hi Developers,
I want to create a Vision app on Swift Playgrounds on iPad. However, Vision does not properly function on Swift Playgrounds on iPad or Xcode Playgrounds. The Vision code only works on a normal Xcode Project.
SO can I submit my Swift Student Challenge 2024 Application as a normal Xcode Project rather than Xcode Playgrounds or Swift Playgrounds File.
Thanks :)
Hi everyone,
I just finished my first app and I have a doubt about whether picker view automatically makes a series of loops in its func.
I put some prints inside the funcs and this is the result only when starting the view with the picker:
Every time I select it the cycles continue.
It's normal? Is there a way to avoid or control it?
Thanks in advance for any response.
Hey Developers,
I'm on the hunt for a new Apple laptop geared towards coding, and I'd love to tap into your collective wisdom. If you have recommendations or personal experiences with a specific model that excels in the coding realm, please share your insights. Looking for optimal performance and a seamless coding experience.
Your input is gold – thanks a bunch!
Can anyone tell me how to use Swift Data and Core Data with playground?
Hi,
I am trying to create a variable of type Color inside the swift data model in Xcode playground .
This gives me these errors :
No exact matches in call to instance method 'setValue'
No exact matches in call to instance method 'getValue'
No exact matches in call to instance method 'setValue'
What is the problem?