Swift Playground

RSS for tag

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

Posts under Swift Playground tag

200 Posts

Post

Replies

Boosts

Views

Activity

IPad OS 16.1, Playgrounds and input fields
I have installed the latest beta on my iPad , iPadOS 16.1 (20B5050f) On running in app in Playgrounds that has a TextField, external keyboard input do not seem to be working. Tapping on the Text field inserts the cursor but no text can be entered on my external keyboard. (TextEditor field also do not work) Tested with both a Smart Keyboard and a Magic Keyboard. The keyboard works to enter the code in playgrounds, so it is not a keyboard connection issue. Disconnecting the keyboard, the onscreen keyboard is displayed and works correctly. Is this a Playgrounds issue or an iPadOS 16.1 issue or a compatibility issue with Playgrounds & iPadOS 16.1 ? import SwiftUI struct ContentView: View {     @State var field: String = "Test input"          var body: some View {         VStack {             Image(systemName: "globe")                 .imageScale(.large)                 .foregroundColor(.accentColor)             Text("Hello, world!")             TextField("", text: $field)                 .frame(height: 100)         }     } }
6
0
2.6k
2d
Swift Playgrounds on iPad: “Failed to Fetch Teams — Your session has expired” blocks App Store Connect upload
Hi everyone, I’m unable to select my developer team or upload my app to App Store Connect from Swift Playgrounds on my iPad. Both of these actions produce the same error: Open the app project → Team & Bundle Identifier → Team. Select Upload to App Store Connect. The error reads: “Failed to Fetch Teams Your session has expired. Please log in.” No team appears for me to select, so I cannot proceed with uploading the app. My account status: Apple Developer Program membership is active. Paid Apps Agreement is Active. Bank account is Active. I can sign in to App Store Connect through a browser. Activating the Paid Apps Agreement and banking information did not resolve the error. I reported this to Apple Developer Support on September 15 and provided a screen recording showing both failures. A Senior Advisor has now recommended asking in this forum. Has anyone encountered this exact error and resolved it? Is there a specific way to refresh the developer-account session used by Swift Playgrounds, or any diagnostic information I can collect to identify the cause? Thank you.
1
0
141
2d
Using SpeechAnalyzer in my Swift Student Challenge submission
Hi there, I’m currently developing an App Playground for the Swift Student Challenge, and a core feature of my playground uses SpeechAnalyzer with SpeechTranscriber from Apple’s Speech framework to transcribe microphone input to text. I understand that SpeechTranscriber performs transcription on-device and does not use the internet. However, from the dev documentation for AssetInventory, it looks like the required language/model assets may first need to be downloaded from Apple’s servers for devices that may not have it installed by default. Since Swift Student Challenge submissions are evaluated offline, I’m unsure how this should be handled. My main questions are: If the device on which my playground is tested does not already have the required SpeechTranscriber asset installed, will transcription fail when the submission is run offline? Is it safe for my submission to depend on SpeechAnalyzer / SpeechTranscriber as a core feature, or should I redesign it to work even if it is unavailable? Thank you!! :)
1
0
115
6d
Swift Playground on iPadOS 27
Hello, Since I upgraded my iPad (iPad Pro 11" 2nd generation / A12z) to iPadOS 27 I have the following issue with SwiftPlayground. The preview no longer works and gets stuck on "Preview paused / Restart to continue". If I click on the refresh button, the button becomes disabled a few seconds but preview still remains on "Preview paused". It is quite easy to reproduce : Start SwiftPlayground Click "New playground" Click "App" When "My App n" appears on playground browser click on it I already tried to uninstall / reinstall SwiftPlayground and rebooting my iPad but it didn't help. Thanks for any help
5
0
352
1w
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds + TestFlight
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Environment Swift Playgrounds version: [check in the app under Settings > General > About] iOS version on test iPhone: [fill in] Project deployment target: [fill in if known, otherwise note that you have no way to check this without Xcode] Provider code: import SwiftUI import AppIntents // ============================================================ // MARK: - TEST INTENT // ============================================================ struct TestExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Test dépense" static let description = IntentDescription( "Teste l'intégration de l'application avec Raccourcis." ) static let isDiscoverable = true func perform() async throws -> some IntentResult { return .result(dialog: "Ça fonctionne !") } } // ============================================================ // MARK: - ADD EXPENSE INTENT // ============================================================ struct AddApplePayExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Ajouter une dépense" static let description = IntentDescription( "Ajoute une dépense à un Tricount." ) static let isDiscoverable = true static let openAppWhenRun = false @Parameter(title: "Montant") var amount: Double? @Parameter(title: "Marchand") var merchant: String? func perform() async throws -> some IntentResult { let valAmount = amount ?? 0.0 let valMerchant = merchant ?? "Inconnu" print("Montant :", valAmount) print("Marchand :", valMerchant) return .result( dialog: "Dépense de \(valAmount) € chez \(valMerchant)." ) } } // ============================================================ // MARK: - SHORTCUTS // ============================================================ struct MyAppShortcuts: AppShortcutsProvider { static var shortcutTileColor: ShortcutTileColor = .blue static let appShortcuts: [AppShortcut] = [ AppShortcut( intent: TestExpenseIntent(), phrases: [ "Tester \(.applicationName)" ], shortTitle: "Test dépense", systemImageName: "plus.circle" ), AppShortcut( intent: AddApplePayExpenseIntent(), phrases: [ "Ajouter une dépense dans \(.applicationName)", "Ajouter \(\.$amount) dans \(.applicationName)" ], shortTitle: "Ajouter une dépense", systemImageName: "plus.circle" ) ] }
1
0
380
Aug ’26
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Provider code: import SwiftUI import AppIntents // ============================================================ // MARK: - TEST INTENT // ============================================================ struct TestExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Test dépense" static let description = IntentDescription( "Teste l'intégration de l'application avec Raccourcis." ) static let isDiscoverable = true func perform() async throws -> some IntentResult { return .result(dialog: "Ça fonctionne !") } } // ============================================================ // MARK: - ADD EXPENSE INTENT // ============================================================ struct AddApplePayExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Ajouter une dépense" static let description = IntentDescription( "Ajoute une dépense à un Tricount." ) static let isDiscoverable = true static let openAppWhenRun = false @Parameter(title: "Montant") var amount: Double? @Parameter(title: "Marchand") var merchant: String? func perform() async throws -> some IntentResult { let valAmount = amount ?? 0.0 let valMerchant = merchant ?? "Inconnu" print("Montant :", valAmount) print("Marchand :", valMerchant) return .result( dialog: "Dépense de \(valAmount) € chez \(valMerchant)." ) } } // ============================================================ // MARK: - SHORTCUTS // ============================================================ struct MyAppShortcuts: AppShortcutsProvider { static var shortcutTileColor: ShortcutTileColor = .blue static let appShortcuts: [AppShortcut] = [ AppShortcut( intent: TestExpenseIntent(), phrases: [ "Tester (.applicationName)" ], shortTitle: "Test dépense", systemImageName: "plus.circle" ), AppShortcut( intent: AddApplePayExpenseIntent(), phrases: [ "Ajouter une dépense dans (.applicationName)", "Ajouter (.$amount) dans (.applicationName)" ], shortTitle: "Ajouter une dépense", systemImageName: "plus.circle" ) ] }
0
0
353
Aug ’26
Best path for a 14-year-old student to begin Swift development using an iPad
Hello, My 14-year-old daughter is beginning high school in Florida and is interested in learning Swift and developing applications for Apple platforms. She currently has an iPad and iPhone but does not yet have access to a Mac. We understand that Swift Playground can be used on iPad, while Xcode requires a Mac. We would appreciate guidance on the best learning path for a beginner in her situation: Which official Apple Swift or SwiftUI curriculum should she begin with? How much can she realistically learn and build using Swift Playground on an iPad? At what stage would access to Xcode on a Mac become necessary? Can an app playground started on iPad later be transferred to Xcode on a Mac? Are there recommended Swift Coding Clubs, education programs, or student resources for high-school students in the United States? What should she focus on during her first year if she eventually wants to participate in the Swift Student Challenge? She is motivated to learn correctly from the beginning and build her first small app playground. Thank you for any guidance or educational resources you can provide.
5
0
1.7k
Aug ’26
FB23259904 - com.musepianolab.piano3 Swift Playgrounds upload stuck
Bundle ID: com.musepianolab.piano3 Feedback Assistant: FB23259904 PROBLEM Cannot upload this app to App Store Connect from Swift Playgrounds on iPad Pro. Upload spinner runs 5+ minutes and never completes. "Upload succeeded" is never shown. Sometimes Swift Playgrounds shows: "Another upload is already in progress." Stopped and retried 5-6 times over 36+ hours. Changed build numbers. Restarted iPad, changed Wi-Fi, reinstalled Playgrounds. ISOLATION (important) Same iPad Pro, same Swift Playgrounds, same Apple Developer account: ANOTHER app uploads successfully Only com.musepianolab.piano3 fails App Store Connect state TestFlight shows only previously completed builds New upload attempts do NOT appear in TestFlight or Build Uploads No Processing builds visible Developer Support phone Told they can only see metadata, not upload queue status. Directed me to Feedback Assistant. REQUEST Please investigate and clear any stuck upload session for bundle ID com.musepianolab.piano3. Environment: Swift Playgrounds on iPad Pro (not Xcode). Small app bundle (~few MB).
1
0
499
Jun ’26
Is there a book or webpage that teaches Xcode step by step
I would like to learn Xcode programming on MacOS. I was wondering if anyone knows of a step by step method. Where I can learn one command at a time but also all the nuances and syntax and instances for that command (function). I see a lot of tutorials for iOS programming but I would rather start and end with MacOS, but anything helps. I would like immersive instruction like what you would find in a cad classroom.
4
0
2k
Jun ’26
“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.
8
6
2k
Jun ’26
Community-driven index site for Swift playgrounds
Hey everyone! I wanted to share a small project I’ve been working on called Swiftgrounds: https://swiftgrounds.dev It’s a community-driven index for Swift Playground books and apps. This is my attempt to bring an option for creators to reach learners and share their content. Swiftgrounds supports the same JSON feed format Apple originally designed, so if you already have a feed set up, you can plug it in without making any changes. If you’re building Playground content, I’d love for you to give it a try and share your work there. Hope you like the project!
0
2
1.1k
May ’26
AUV3 effects in Swift Playground iPad - info.plist
Hi everyon. I‘d like to ask If there’s a way of including info.plist into swift playground on the iPad. I’m currently developing a daw on the iPad, I can see and use Apple’s auv3 plugins but can’t see third party apps like fab filter etc installed on the iPad. I think it’s needs inter app or auv3 entitlement. Is there a work around? I have attached my code for auv3 section. if anyone is interested , here is a video of my progress so far https://youtu.be/_2-L3oowfd0?si=cbr_9vYc3DOXV3R1 AUV3Diagnostic.swift
1
0
1.2k
May ’26
Creating playgrounds from a template does nothing
Attempts to create Swift Playgrounds from the built-in templates fail. Clicking the “Get” button on these templates appears to download something, but it changes back into a “Get” button afterwards without creating a playground. Furthermore, the Swift versions of the templates seem to be behind; it shows Swift 5.8 and Swift 5.9 editions whereas it should be Swift 6.x Steps to Reproduce Start the Swift Playground app (the standalone app, not the Xcode one, on macOS or iPadOS). Select “Learn to Code” Choose the “Get Started With Code” template (or any other template will do). Click the Get button. Wait until the Get button becomes a circular progress indicator. Expected Results A new Swift Playground should be created from the selected template. Actual Results The Get button changes into a circular progress indicator and then changes back. No Playground gets created. Versions Swift Playground 4.7 (2088) macOS 26.4.1 (25E253) iPadOS 26.4.2
1
0
1.3k
Apr ’26
On iPad with Swift Playgrounds: How to open chapter as a playground?
Note On a Mac with Xcode installed, or on an iPad with Swift Playgrounds, you can open this chapter as a playground. Playgrounds allow you to edit the code listings and see the results immediately. (Note in page 3) (I would like to open the chapter or book: Swift Programming Language in Swift Playground on iPad) https://books.apple.com/ve/book/the-swift-programming-language-swift-5-7-beta/id1002622538?l=en-GB Best regards
2
0
2.7k
Apr ’26
Updating Apps on the AppStore no longer working for me.
I have been using Swift Playground to build and submit my apps to the appstore for around three years now. Recently I uploaded two of my apps but now when I submit them for approval an error is issued… “Unable to Add for Review”… (see pic attached). I don’t understand it because Playground does not use Xcode as far as I am aware? Can someone advise me what I can do to resolve this? Is it something I have to wait to be fixed by an Apple update?
10
0
1k
Apr ’26
IPad OS 16.1, Playgrounds and input fields
I have installed the latest beta on my iPad , iPadOS 16.1 (20B5050f) On running in app in Playgrounds that has a TextField, external keyboard input do not seem to be working. Tapping on the Text field inserts the cursor but no text can be entered on my external keyboard. (TextEditor field also do not work) Tested with both a Smart Keyboard and a Magic Keyboard. The keyboard works to enter the code in playgrounds, so it is not a keyboard connection issue. Disconnecting the keyboard, the onscreen keyboard is displayed and works correctly. Is this a Playgrounds issue or an iPadOS 16.1 issue or a compatibility issue with Playgrounds & iPadOS 16.1 ? import SwiftUI struct ContentView: View {     @State var field: String = "Test input"          var body: some View {         VStack {             Image(systemName: "globe")                 .imageScale(.large)                 .foregroundColor(.accentColor)             Text("Hello, world!")             TextField("", text: $field)                 .frame(height: 100)         }     } }
Replies
6
Boosts
0
Views
2.6k
Activity
2d
Swift Playgrounds on iPad: “Failed to Fetch Teams — Your session has expired” blocks App Store Connect upload
Hi everyone, I’m unable to select my developer team or upload my app to App Store Connect from Swift Playgrounds on my iPad. Both of these actions produce the same error: Open the app project → Team & Bundle Identifier → Team. Select Upload to App Store Connect. The error reads: “Failed to Fetch Teams Your session has expired. Please log in.” No team appears for me to select, so I cannot proceed with uploading the app. My account status: Apple Developer Program membership is active. Paid Apps Agreement is Active. Bank account is Active. I can sign in to App Store Connect through a browser. Activating the Paid Apps Agreement and banking information did not resolve the error. I reported this to Apple Developer Support on September 15 and provided a screen recording showing both failures. A Senior Advisor has now recommended asking in this forum. Has anyone encountered this exact error and resolved it? Is there a specific way to refresh the developer-account session used by Swift Playgrounds, or any diagnostic information I can collect to identify the cause? Thank you.
Replies
1
Boosts
0
Views
141
Activity
2d
Using SpeechAnalyzer in my Swift Student Challenge submission
Hi there, I’m currently developing an App Playground for the Swift Student Challenge, and a core feature of my playground uses SpeechAnalyzer with SpeechTranscriber from Apple’s Speech framework to transcribe microphone input to text. I understand that SpeechTranscriber performs transcription on-device and does not use the internet. However, from the dev documentation for AssetInventory, it looks like the required language/model assets may first need to be downloaded from Apple’s servers for devices that may not have it installed by default. Since Swift Student Challenge submissions are evaluated offline, I’m unsure how this should be handled. My main questions are: If the device on which my playground is tested does not already have the required SpeechTranscriber asset installed, will transcription fail when the submission is run offline? Is it safe for my submission to depend on SpeechAnalyzer / SpeechTranscriber as a core feature, or should I redesign it to work even if it is unavailable? Thank you!! :)
Replies
1
Boosts
0
Views
115
Activity
6d
Swift Playground on iPadOS 27
Hello, Since I upgraded my iPad (iPad Pro 11" 2nd generation / A12z) to iPadOS 27 I have the following issue with SwiftPlayground. The preview no longer works and gets stuck on "Preview paused / Restart to continue". If I click on the refresh button, the button becomes disabled a few seconds but preview still remains on "Preview paused". It is quite easy to reproduce : Start SwiftPlayground Click "New playground" Click "App" When "My App n" appears on playground browser click on it I already tried to uninstall / reinstall SwiftPlayground and rebooting my iPad but it didn't help. Thanks for any help
Replies
5
Boosts
0
Views
352
Activity
1w
Swift Playgrounds Learn to Code Screen
My M2 Pro Mac mini with OSX 14.7 just updated to Swift Playgrounds 4.6.1. Now the :Learn to Code & Build Apps screen is limited in size and can't be zoomed. There is no way to scroll horizontally and I can't view the whole screen.
Replies
2
Boosts
1
Views
791
Activity
Sep ’26
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds + TestFlight
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Environment Swift Playgrounds version: [check in the app under Settings > General > About] iOS version on test iPhone: [fill in] Project deployment target: [fill in if known, otherwise note that you have no way to check this without Xcode] Provider code: import SwiftUI import AppIntents // ============================================================ // MARK: - TEST INTENT // ============================================================ struct TestExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Test dépense" static let description = IntentDescription( "Teste l'intégration de l'application avec Raccourcis." ) static let isDiscoverable = true func perform() async throws -> some IntentResult { return .result(dialog: "Ça fonctionne !") } } // ============================================================ // MARK: - ADD EXPENSE INTENT // ============================================================ struct AddApplePayExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Ajouter une dépense" static let description = IntentDescription( "Ajoute une dépense à un Tricount." ) static let isDiscoverable = true static let openAppWhenRun = false @Parameter(title: "Montant") var amount: Double? @Parameter(title: "Marchand") var merchant: String? func perform() async throws -> some IntentResult { let valAmount = amount ?? 0.0 let valMerchant = merchant ?? "Inconnu" print("Montant :", valAmount) print("Marchand :", valMerchant) return .result( dialog: "Dépense de \(valAmount) € chez \(valMerchant)." ) } } // ============================================================ // MARK: - SHORTCUTS // ============================================================ struct MyAppShortcuts: AppShortcutsProvider { static var shortcutTileColor: ShortcutTileColor = .blue static let appShortcuts: [AppShortcut] = [ AppShortcut( intent: TestExpenseIntent(), phrases: [ "Tester \(.applicationName)" ], shortTitle: "Test dépense", systemImageName: "plus.circle" ), AppShortcut( intent: AddApplePayExpenseIntent(), phrases: [ "Ajouter une dépense dans \(.applicationName)", "Ajouter \(\.$amount) dans \(.applicationName)" ], shortTitle: "Ajouter une dépense", systemImageName: "plus.circle" ) ] }
Replies
1
Boosts
0
Views
380
Activity
Aug ’26
AppShortcutsProvider not detected by the Shortcuts app – app built entirely with Swift Playgrounds
Context I built an app entirely using Swift Playgrounds on iPad (no access to a Mac / Xcode). The app is distributed via TestFlight and installed on an iPhone. Problem I implemented an AppShortcutsProvider with simple AppShortcut entries (code below), but no shortcuts show up in the Shortcuts app, in the list of apps with shortcuts, or via Siri. What I've already tried without success: Full restart of the iPhone Deleting the app's data Fully uninstalling and reinstalling the app A new TestFlight build (with incremented build number) after adding the code Confirming the phrases correctly include (.applicationName) as required Question Is the Extract AppIntentsMetadata build step (which generates the metadata.appintents file) actually executed when compiling/submitting via Swift Playgrounds on iPad, or is this a known limitation of the tool that would prevent App Shortcuts from being indexed by Shortcuts/Siri? Provider code: import SwiftUI import AppIntents // ============================================================ // MARK: - TEST INTENT // ============================================================ struct TestExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Test dépense" static let description = IntentDescription( "Teste l'intégration de l'application avec Raccourcis." ) static let isDiscoverable = true func perform() async throws -> some IntentResult { return .result(dialog: "Ça fonctionne !") } } // ============================================================ // MARK: - ADD EXPENSE INTENT // ============================================================ struct AddApplePayExpenseIntent: AppIntent { static let title: LocalizedStringResource = "Ajouter une dépense" static let description = IntentDescription( "Ajoute une dépense à un Tricount." ) static let isDiscoverable = true static let openAppWhenRun = false @Parameter(title: "Montant") var amount: Double? @Parameter(title: "Marchand") var merchant: String? func perform() async throws -> some IntentResult { let valAmount = amount ?? 0.0 let valMerchant = merchant ?? "Inconnu" print("Montant :", valAmount) print("Marchand :", valMerchant) return .result( dialog: "Dépense de \(valAmount) € chez \(valMerchant)." ) } } // ============================================================ // MARK: - SHORTCUTS // ============================================================ struct MyAppShortcuts: AppShortcutsProvider { static var shortcutTileColor: ShortcutTileColor = .blue static let appShortcuts: [AppShortcut] = [ AppShortcut( intent: TestExpenseIntent(), phrases: [ "Tester (.applicationName)" ], shortTitle: "Test dépense", systemImageName: "plus.circle" ), AppShortcut( intent: AddApplePayExpenseIntent(), phrases: [ "Ajouter une dépense dans (.applicationName)", "Ajouter (.$amount) dans (.applicationName)" ], shortTitle: "Ajouter une dépense", systemImageName: "plus.circle" ) ] }
Replies
0
Boosts
0
Views
353
Activity
Aug ’26
Best path for a 14-year-old student to begin Swift development using an iPad
Hello, My 14-year-old daughter is beginning high school in Florida and is interested in learning Swift and developing applications for Apple platforms. She currently has an iPad and iPhone but does not yet have access to a Mac. We understand that Swift Playground can be used on iPad, while Xcode requires a Mac. We would appreciate guidance on the best learning path for a beginner in her situation: Which official Apple Swift or SwiftUI curriculum should she begin with? How much can she realistically learn and build using Swift Playground on an iPad? At what stage would access to Xcode on a Mac become necessary? Can an app playground started on iPad later be transferred to Xcode on a Mac? Are there recommended Swift Coding Clubs, education programs, or student resources for high-school students in the United States? What should she focus on during her first year if she eventually wants to participate in the Swift Student Challenge? She is motivated to learn correctly from the beginning and build her first small app playground. Thank you for any guidance or educational resources you can provide.
Replies
5
Boosts
0
Views
1.7k
Activity
Aug ’26
MLX support on swift playground
i cant use mlx on swift for some reason, i would like for them to add the support to add it as a package
Replies
1
Boosts
0
Views
1.3k
Activity
Aug ’26
FB23259904 - com.musepianolab.piano3 Swift Playgrounds upload stuck
Bundle ID: com.musepianolab.piano3 Feedback Assistant: FB23259904 PROBLEM Cannot upload this app to App Store Connect from Swift Playgrounds on iPad Pro. Upload spinner runs 5+ minutes and never completes. "Upload succeeded" is never shown. Sometimes Swift Playgrounds shows: "Another upload is already in progress." Stopped and retried 5-6 times over 36+ hours. Changed build numbers. Restarted iPad, changed Wi-Fi, reinstalled Playgrounds. ISOLATION (important) Same iPad Pro, same Swift Playgrounds, same Apple Developer account: ANOTHER app uploads successfully Only com.musepianolab.piano3 fails App Store Connect state TestFlight shows only previously completed builds New upload attempts do NOT appear in TestFlight or Build Uploads No Processing builds visible Developer Support phone Told they can only see metadata, not upload queue status. Directed me to Feedback Assistant. REQUEST Please investigate and clear any stuck upload session for bundle ID com.musepianolab.piano3. Environment: Swift Playgrounds on iPad Pro (not Xcode). Small app bundle (~few MB).
Replies
1
Boosts
0
Views
499
Activity
Jun ’26
Is there a book or webpage that teaches Xcode step by step
I would like to learn Xcode programming on MacOS. I was wondering if anyone knows of a step by step method. Where I can learn one command at a time but also all the nuances and syntax and instances for that command (function). I see a lot of tutorials for iOS programming but I would rather start and end with MacOS, but anything helps. I would like immersive instruction like what you would find in a cad classroom.
Replies
4
Boosts
0
Views
2k
Activity
Jun ’26
“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.
Replies
8
Boosts
6
Views
2k
Activity
Jun ’26
Community-driven index site for Swift playgrounds
Hey everyone! I wanted to share a small project I’ve been working on called Swiftgrounds: https://swiftgrounds.dev It’s a community-driven index for Swift Playground books and apps. This is my attempt to bring an option for creators to reach learners and share their content. Swiftgrounds supports the same JSON feed format Apple originally designed, so if you already have a feed set up, you can plug it in without making any changes. If you’re building Playground content, I’d love for you to give it a try and share your work there. Hope you like the project!
Replies
0
Boosts
2
Views
1.1k
Activity
May ’26
AUV3 effects in Swift Playground iPad - info.plist
Hi everyon. I‘d like to ask If there’s a way of including info.plist into swift playground on the iPad. I’m currently developing a daw on the iPad, I can see and use Apple’s auv3 plugins but can’t see third party apps like fab filter etc installed on the iPad. I think it’s needs inter app or auv3 entitlement. Is there a work around? I have attached my code for auv3 section. if anyone is interested , here is a video of my progress so far https://youtu.be/_2-L3oowfd0?si=cbr_9vYc3DOXV3R1 AUV3Diagnostic.swift
Replies
1
Boosts
0
Views
1.2k
Activity
May ’26
Creating playgrounds from a template does nothing
Attempts to create Swift Playgrounds from the built-in templates fail. Clicking the “Get” button on these templates appears to download something, but it changes back into a “Get” button afterwards without creating a playground. Furthermore, the Swift versions of the templates seem to be behind; it shows Swift 5.8 and Swift 5.9 editions whereas it should be Swift 6.x Steps to Reproduce Start the Swift Playground app (the standalone app, not the Xcode one, on macOS or iPadOS). Select “Learn to Code” Choose the “Get Started With Code” template (or any other template will do). Click the Get button. Wait until the Get button becomes a circular progress indicator. Expected Results A new Swift Playground should be created from the selected template. Actual Results The Get button changes into a circular progress indicator and then changes back. No Playground gets created. Versions Swift Playground 4.7 (2088) macOS 26.4.1 (25E253) iPadOS 26.4.2
Replies
1
Boosts
0
Views
1.3k
Activity
Apr ’26
Add a DancingCreatures view
I'm almost having a heart attack with this "a DancingCreatures view" issue. I must be really dumb I've tried everything and the question just won't move forward. Someone, for the love of God, explain to me what it would be.
Replies
0
Boosts
0
Views
1.5k
Activity
Apr ’26
On iPad with Swift Playgrounds: How to open chapter as a playground?
Note On a Mac with Xcode installed, or on an iPad with Swift Playgrounds, you can open this chapter as a playground. Playgrounds allow you to edit the code listings and see the results immediately. (Note in page 3) (I would like to open the chapter or book: Swift Programming Language in Swift Playground on iPad) https://books.apple.com/ve/book/the-swift-programming-language-swift-5-7-beta/id1002622538?l=en-GB Best regards
Replies
2
Boosts
0
Views
2.7k
Activity
Apr ’26
Updating Apps on the AppStore no longer working for me.
I have been using Swift Playground to build and submit my apps to the appstore for around three years now. Recently I uploaded two of my apps but now when I submit them for approval an error is issued… “Unable to Add for Review”… (see pic attached). I don’t understand it because Playground does not use Xcode as far as I am aware? Can someone advise me what I can do to resolve this? Is it something I have to wait to be fixed by an Apple update?
Replies
10
Boosts
0
Views
1k
Activity
Apr ’26
Swift Playgrounds and App Store Connect
Hello everyone, On my iPad when I press upload to App Store Connect, It tells me uploaded successfully to App Store Connect. When I go to App Store Connect and to Build section, My app is not there. Am I looking in the right place?
Replies
1
Boosts
0
Views
1.3k
Activity
Apr ’26
Swift Playground issue with "getting started with apps"
There seems to be an error with a code checkpoint in Swift Playground "getting started with apps" It says to put a VStack inside an HStack and shows how to do it. my screen looks the same but it is not getting marked as correct which is preventing me from moving on. Any Ideas?
Replies
4
Boosts
1
Views
1.2k
Activity
Mar ’26