Post marked as unsolved
57
Views
I tried to use PlaygroundLiveViewMessageHandler, but it seems that is only for UIKit not SwiftUI.
How can i pass data(for me, it's string created in Main.Swift in playground book page) from playground book page to SwiftUI View which is Always-on Live view?
Post marked as solved
157
Views
Hello! I am using a Mac Swift Playground 3.4.1, and want to save data inputted on one playground page to be used across the other pages. I read in the Apple Documentation to use PlaygroundKeyValueStore, but when I put it into my playground page (after importing Playground Support), I get the error in above title. Is this function deprecated? Since it seems like it still worked in 2020.
Apple Documentation for this class:
https://developer.apple.com/documentation/playgroundsupport/playgroundkeyvaluestore
Post marked as unsolved
113
Views
I'm using the Playgrounds app for Mac and I'm trying to create my pages from the folder. How do you get new folders within the "pages" folder to show up in the app?? I can edit the file in the "My Playground.playgroundpage" folder and that shows up but if I make another one nothing comes up in the app?? I want multiple pages. Any help is appreciated thanks!
Post marked as solved
123
Views
Should we use an Author Template, or the regular Swift Playground Template?
Hey!, I've downloaded from: https://developer.apple.com/download/more/?=Swift%20Playgrounds%20Author%20Template
This file is an Xcode project, where you can build your playground, however this template seems rather advanced, shall we use this template if we prefer for the challenge, or is the goal to stick to a more basic template such as the one found in the Swift Playground App?
Post marked as unsolved
88
Views
Hey, soo I‘m working on a playground experience that you will have to start from on Swift Playground for the Mac, then pick up the iPad and continue from there. But my question is.. is that even possible in terms of judgement? Are the judges restricted to the one platform you selected when submitting, or can they switch between devices.
If anyone knows any better, please let me know.
Thank you!
Post marked as solved
218
Views
Hey all!
I have a few questions regarding the format of submission:
does it have to be created in the playgrounds app or can it be made in Xcode (using file new playground)?
i see there are playground books and plain playgrounds. Are both acceptable? Or just one?
About the Xcode creation, I tried and the playground created in Xcode seems to open correctly in the playgrounds app on Mac. Please let me know if I’m missing something, thanks!
Post marked as unsolved
308
Views
Hi, I am applying for this year's WWDC 2021 swift student challenge. I am creating a Mac Xcode Playground. I have created a start menu in Swift UI and a game in SpriteKit, I was wondering how I would go about transitioning between them when a button is clicked in the view.
Right now I am using this code to display the SwiftUI view
swift
PlaygroundPage.current.setLiveView(
ContentView()
.frame(width: 800, height: 750)
)
I was thinking I could transition like this:
swift
func goToGameScene() {
let sceneView = SKView(frame: CGRect(x:0 , y:0, width: 800, height: 750))
if let scene = GameScene(fileNamed: "GameScene") {
sceneView.showsNodeCount = true
sceneView.showsFPS = true
scene.scaleMode = .aspectFit
sceneView.presentScene(scene)
}
PlaygroundPage.current.needsIndefiniteExecution = true
PlaygroundSupport.PlaygroundPage.current.liveView = sceneView
}
I am not sure if this is a good approach. And this method does not give space for animated transitions as well. I was wondering if there is a better way to transition between these views, thank you so much in advance!
Post marked as unsolved
127
Views
Hi, I'm using the Swift Playground Author Template and I would like to use a .sks file. I added my .sks under the PrivateResources folder and with the Playground as target but when I run the playground the Tile Set from the file is not found.
I checked my code in an Xcode project and it worked perfectly, so I'm sure it's something with the playground. Maybe it's not possible?
Post marked as unsolved
52
Views
Hi
Im using swift playground for MacOS
I created a project using the answers theme: file:///var/folders/lx/kyvhjqjx5fz_dd8qt78k1nw80000gn/T/com.apple.Safari/WebKitDropDestination-hKatPPzl/Screen%20Shot%202021-04-09%20at%206.37.42%20PM.png
And the live view font is too small..
pls help
Post marked as unsolved
110
Views
Hi, I am challenging in student challenge. I have a few questions to ask.
I met the condition of graduation in university, but I have delayed graduation. In this case, can I submit a swift student challenge?
If I can submit a challenge, is it okay to fill the academic team's number in question of Educational Supervisor’s Contact Information?
I sent a email to swiftstudentchallenge@apple.com 2 days ago, but I didn't receive anything :-(
Post marked as unsolved
161
Views
Hello, I am looking to apply for the Swift Student Challenge, and I saw that it cannot rely on network connection. I want to use a cloud database, so this would not be accepted?
Post marked as unsolved
139
Views
I was wondering if compile time for our Playgrounds counts towards the three-minute maximum for the challenge.
The reason I'm asking is that at the moment, my Playground takes an uncomfortable amount of time to compile (about 30-40 seconds after clicking the run button). However, my Mac is from 2013, so it might compile faster on newer machines.
Post marked as solved
167
Views
I was wondering if there was a place to submit a link to a youtube video to supplement our wwdc submission this year; because I found that on the github repo (linked below), people had video linked in a chart.
https://github.com/wwdc/2020
Post marked as unsolved
113
Views
I tried to hide some code in my Playground by doing //#-hide-code but at one point all my code had disappeared. I then tried to duplicate the page to see if that would fix anything but Playgrounds just crashed. Now, I am completely unable to open my Playground. Now every time I try and open it I get the following error: Error parsing source tags, Improperly nested tag: hidden-code
Post marked as unsolved
87
Views
Hello, I am 17 and I have 2 apps published on the App Store under my dad's account because you need to be 18 to have a paid developer account. However, for the Swift Student Challenge I'm going to submit under my own Apple ID. Can I still include my apps in the "Apps on the App Store" section since they are under a different Apple ID but still created by me? Thank you