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

Post

Replies

Boosts

Views

Activity

Lock Orientation and Disable Multitasking/Slide Over
Hello! I have a quick question about locking orientation and disabling Multitasking/Slide Over in a .swiftpm for the Swift Student Challenge. A .swiftpm file contains a Package.swift file. At the top of this file, there is a very scary warning that directs you to not edit it. However, being unable to edit this means that I cannot lock the orientation of an iPad and disable Multitasking/Slide Over. I have read that it does not break your project if you ignore the warning and I tried it out for myself — editing the file does indeed lock orientation and disable Multitasking/Slide Over! Although, as you can imagine, this is quite nerve-wracking. What are the actual technical implications of doing this? Are participants allowed to do this? If this does not seem like a good idea, would judges follow through with a note that tells them to simply not use certain orientations and Multitasking/Slide Over? (Yeah, I know… not an ideal thing but if there’s anyone to understand it would be Apple employees). I am faced with two uncertain options: ignore a warning and get what I need or follow the warning but then have a very poorly designed experience (some apps just aren’t meant for portrait and Multitasking/Slide Over, even if this is not a full app). I definitely don’t want hundreds of hours of work to go down the drain or risk rejection because of some type of problem with this, that’s for sure. Perhaps a “hack” would work if I were creating an actual app, but the stakes become higher when it is for this challenge. Thanks! :)
1
0
285
4w
Am I allowed to use Speech framework on Swift Student Challenge?
Hello! I would like to use Speech Framework on my App Playground for this year challenge. But I still can't understand if I am allowed to use it to respect the rule of "not rely on a network connection". That's why: Speech framework can use on-device Speech recognition – No internet connection needed ✅. But it can ask to download an Apple's native language package to use it for this on-device recognition – To get this, you need to be connected to the Internet ❌. When I try to add a Speech Recognition Capabilities on my App Playground, its' description says: "Required to perform speech recognition using Apple's servers." (screenshot is attached). Does it mean that I won't be able to use on-device recognition on my App Playground? – And therefore, only online-version of this framework is available and I can't use it to participate on the challenge successfully❓. If it's possible, could you please make it clearer? This framework is crucial for my App Playground and I really need this to make it work. Thanks for your help in advance! And a have a good day!
1
0
300
4w
Create Mac App from Swift Playgrounds
I am running Swift Playgrounds 4.51 under OSX 14.7 on a Mac mini M2 Pro. Under App settings for my app, I select "Install on this Mac." I get an error "An error occurred during installation Please check Console.app for further information" I can't find any entry in the console logs for this. I have a personal (free) developer account. Is there a way to create a Finder launchable app with Swift Playgrounds? I found part of the problem. My main user that I use for "normal" activity does not have administrative rights. If I give that user administrative rights, the create app succeeds and the app is added to the global Applications folder. Is there a way to have the app added to my User Application folder that then shouldn't require administrative access?
2
0
236
Jan ’25
Swift Playgrounds Will Not Upload to App Store Connect
When I go to the App Settings menu in Swift Playgrounds and attempt to upload to App Store Connect, I run into the below error screen: I am registered with the Apple Developer Program. Swift Playgrounds is updated to its latest version. This is occurring on both macOS and iPadOS. All the information I put in is valid. Any reason why this would be happening?
2
1
272
Jan ’25
Can not use or do anything on the Playgrounds app on iPad Air M2 running iPadOS 18.3 beta
Hi, I have recently downloaded the app to start learning how to code in swift and so on. On my first try I have gotten the error stating that ”.swiftpm files cannot be opened”. I have followed some forum posts. I restarted my iPad several times and redown the app several times. I tried to disable the iCloud sync but I think I deleted the iCloud directory entirely that just results in the app closing on any action taken. (such as pressing the “New App” option or choosing the quick actions to make apps). Is there a way to fix this? Any help is appreciate, please ask me to provide any extra needed information.
1
0
323
Dec ’24
Playground created on iPad not opening on Mac
I've entered some code on Version 4.5.1 of Playgrounds on my iPad mini running iOS 18.1.1. The file is saved on iCloud and so is available on my Mac running OS 15.2. However, the file will not open in either Playgrounds v 4.5.1 on the Mac (error "Unable to get file wrapper for contents.xcplayground.") or Xcode 16.1 (error "Couldn't load settings from contents.xcplayground"). The file's type is .playgorund. Any thoughts?
1
0
343
Dec ’24
Swift Playgrounds Incompatibility with Xcode 16 Files and Swift Versions
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!
3
0
598
Dec ’24
(Swift Playgrounds for Mac) How do I build for iPhone?
I am trying to challenge myself by building an iPhone app in Swift Playgrounds. I just got a Mac Mini M4, so I am trying Swift Playgrounds for Mac. I can submit a build to TestFlight, but it's for Mac and won't let me even test on my iPhone. How can I build my app for iPhone? The least "hacky" answer is appreciated, but I'll entertain anything. Examples in order of hackiness might be: I missed an option in Playgrounds for Mac. Open my playground in Xcode, change something, open back in Playgrounds for Mac. Same as above, but maybe I have to add/copy a file (e.g., manifest.plist). Open my playground in Playgrounds for iPad (I have an iPad 9), do something, copy back to Playgrounds for Mac. Submit via Playgrounds for iPad. Submit via Xcode. BTW, I'm challenging myself not just for its own sake, but because I'm curious how far a student/newbie/etc can take Swift Playgrounds. I was hoping to set a good example for others looking for a lighter-resource, more user-friendly experience than Xcode (which is why I assume Playgrounds for Mac even exists). But right now it feels like Playgrounds for Mac is a … third-class citizen? Maybe the iPad version is second-class? I haven't really tried it. P.S. Why does this text editor seem so lame? Making a numbered list and adding to it is a nightmare. Should be: start a numbered list, hit return, new number appears below. I'm on Safari. This should be the best dev experience on the planet, not the worst!
1
0
448
Dec ’24
Swift playgrounds ipad/icloud
Bonjour, a chaque installation de swift playgrounds sur ipad, icloud empeche la sauvegarde et empeche donc d’ouvrir les app. sur icloud drive les fichiers sont present mais a zero ko. par contre les fichiers playgroundsbook fonctionnent. la premiere solution que j’ai ***** etait de desactivé la sauvegarde icloud et ca a fonctionné en local. mais comme je veux mes fichiers sur le icloud drive j’ai tenté une autre approche. j’ai tenté de copié mes fichiers en local sur icloud drive ca ne fonctionne pas. puis j’ai juste fait un drag/drop de fichier app vers le playgrounds. l’app s’ouvre mais n’est pas sauvegardé dans icloud drive. par contre les modifs sont bien enregistrées. enfin j’ai refait la meme approche, une fois l’app ouverte dans playgrounds je l’ai partagé puis enregistré dans icloud. cette fois ci le fichier est pris en compte et fonctionne.
1
0
388
Nov ’24
Empty canvas in Swift Playgrounds Mac 15.1
Hi, First post and I am a total newbie when it comes to Ipads & Macs... And also this forum, so sorry if I post in wrong section. My son use Ipad at school and they use Swift Playground there. To be able to do some programming at home, I have set up Vmware with Sequoia 15.1. I installed the app Swift Playground and try to run the playground Get Started with Code and some other education playgrounds. If I understand correctly, it should be some landscape and a figure on the canvas... For me it is only a blue area. I installed XCode, but could not figure out how to run the learning examples there. Tips? Is it possible to run the education playgrounds there? I removed Swift Playgrounds and installed it again, same issue. I also installed IOS 18.1 (?) but I am not sure it is needed. Any suggestion of how I can get contents to show on the canvas? Except of bying an Ipad. ;)
2
0
519
Nov ’24
Learn to code 3 missing
Hi Folks! Just started again with playgrounds, and had my "Learn to code 1-2-3" Apps on old versions. Updated 1 and 2 to 5.8, and just found that Learn to code 3 was still on old version (3.1), so decided to delete it. I was hoping that normally I'll just find it where the others are for download (Learn to code & Build Apps), but it is not there.. it is not anywhere, cannot find it, and couldn't find a way to download from anywhere else. Any ideas? Maybe for Learn to code 3 there is no Swift 5.8 yet? Thanks!
1
0
461
Oct ’24