Playground Support

RSS for tag

Share playground data, manage live views, and control the execution of a playground in Swift Playgrounds using Playground Support.

Playground Support Documentation

Posts under Playground Support tag

39 Posts
Sort by:
Post not yet marked as solved
1 Replies
358 Views
I'm using Xcode 13.2.1 on a MacBookAir (13-inch, 2017) running MacOS 11.4 BigSur. I'm working on the playgrounds that come along with the Develop in Swift Program but when I'm going through the exercises nothing shows on the LiveView bar on the right. In the activity bar it's stuck saying "Running playground name" with the blue wheel spinning endlessly. Anyone else having the same problem? Any suggestions?
Posted
by Davidik.
Last updated
.
Post not yet marked as solved
2 Replies
211 Views
Hey, So. I am writing and searching and refactoring code. specifically my "cos" function is not producing the correct values. the value for '0' is correct, however when I put '20' in for cos() the value produced looks like a tinder profile value age phone & zip. I've looked up many different equations that cosine might produce, none of them solve as the value shown in my console. any tips, or advice. I was hoping to just have to find radians or degrees, but so far not the case.
Posted
by Villian.
Last updated
.
Post not yet marked as solved
1 Replies
236 Views
Question when trying to add a Capability to a test app for example let’s say “Camera “ my Swift Playground app just closes back to my IPad Home Screen this seems to be the case with all the capabilities in the menu there is no error message. I’m running the latest Swift Playground 4 version and my iPad is current up to date.
Posted
by Torrez1.
Last updated
.
Post not yet marked as solved
1 Replies
394 Views
I’m building a simple app exclusively using Swift Playgrounds on the iPad - prefer not to get into Xcode if I can help it.. my MacBook is ancient (2011) and doesn’t support the newer Swift Xcode releases. My app needs it to play background audio but I haven’t been able to find any way to enable background modes outside of Xcode https://developer.apple.com/documentation/avfoundation/media_playback_and_selection/creating_a_basic_video_player_ios_and_tvos/enabling_background_audio Is there any way to do this without Xcode or will I need a newer Mac?
Posted Last updated
.
Post marked as solved
1 Replies
359 Views
Has anyone been able to successfully use MusicCatalogSearchRequest in a playgrounds app? I have configured my playground similar to a regular app: app id with automatic music token generation turned on, music access authorized within the app itself, but whenever I query MusicCatalogSearchRequest I get an error thrown with .developerTokenRequestFailed. Considering musickit is restricted in the sim, it would not surprise me if it was the same in playgrounds but it would be super helpful if I could prototype with musickit in playgrounds 4!
Posted Last updated
.
Post not yet marked as solved
0 Replies
285 Views
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.
Posted
by oshell.
Last updated
.
Post not yet marked as solved
2 Replies
371 Views
In our PK-12 school, we would like to try Apple's coding resources, including Swift Playground for our 6th grade computer science classes. Our classes, though, meet in the same computer lab with two class sections rotating every other day. Therefore, our students use shared devices -- Macbook Airs. Is there a way to use the Swift Playground app on shared devices where each student has his/her own Playground account? If not, does Apple offer a different coding program that does allow students to log into their own work? Hopefully this makes sense.
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.1k Views
Hi, you say swift playground 5 will come to ipad when the ipados 15 come out, yesterday the Ipados 15 came out i update my ipad but swift playground 5 update didn’t came out with Ipados 15. so i want to know when the swift playground 5 came out and how can i update it
Posted Last updated
.
Post not yet marked as solved
2 Replies
287 Views
I am running Xcode 10.3 on a MBP from 2015. Does this limit the version of Swift I can write with? How can I tell which version of Swift I am using? I am getting an error: Value of type URL has no member 'withQueries' and I think it is because the code is incompatible with the version of Swift I am using? let baseURL = URL(string: "https://api.nasa.gov/planetary/apod")! let query: [String: String] = [ "api_key": "DEMO_KEY", "date": "2011-07-13"] let url = baseURL.withQueries(query)! let task = URLSession.shared.dataTask(with: url) { (data, response, error) in     if let data = data, let string = String(data: data, encoding: .utf8) { print(string) } PlaygroundPage.current.finishExecution() } task.resume()
Posted
by eturn23.
Last updated
.
Post not yet marked as solved
1 Replies
912 Views
Hello 👋, I recently started running the new macOS beta [macOS Monterey] everything, all my apps, work great however I did notice since I updated that the functionality to see my Results Bar and Debug area on Xcode have disappeared. To confirm this I created a new blank playground on Xcode, and I tried resseting my workspace. However, no code is showing on the results bar, very strange. Could someone help me out figure out what is going? Could this be an issue on my part or there are more users with a similar problem? Thanks
Posted Last updated
.
Post not yet marked as solved
3 Replies
2.2k Views
I have trouble with importing CreateMLUI in the PlayGround. What I have tried: – Creating Mac OS blank playground – Restarting Xcode more than 5 times – Removing all the other boilerplate code – Reinstalling xCode completely – Checking PlayGround Settings platform But anyway the same: No such module “CreateMLUI” How to import this thing? Any suggestions?
Posted
by maxkalik.
Last updated
.
Post not yet marked as solved
4 Replies
1.6k Views
In the WWDC session Explore Packages and Projects with Xcode Playgrounds. The demo showed a playground NutritionFacts inside of a package. I tried to create a playground inside my package and the playground cannot find my module. What setup needs to occur to allow the playground to be able to use the module besides typing import module
Posted
by brettha.
Last updated
.