1,352 questions
2
votes
0
answers
36
views
Is there a way to suppress “Access Data from Other Apps” popup in Swift Playgrounds on macOS 26
I’m using Swift Playgrounds on macOS 26 to learn app development, starting with the “Get Started with Apps” template. Every time I run the template, macOS shows a popup asking: “Get Started with Apps” ...
-2
votes
2
answers
88
views
Image rotation causing misplacement
I've stripped this issue down to an image on a ZStack. The image should be in the lower left corner of the ZStack. When the .rotation for the image is modified, the location changes as if the ...
2
votes
1
answer
246
views
Usage of { get set } in protocol causes "Couldn't look up symbols" error
I have been following this tutorial for learning swift programming, and up until the section on Protocols, it has been going flawlessly as per the tutorial. But once I reached the section on ...
1
vote
0
answers
91
views
Is it possible to build an iOS 'App Playground' from the command line?
Xcode - and the iPad and OSX Swift Playgrounds apps - allow one to make an App Playground - a super light SwiftUI boilerplate which runs under Catalyst on the desktop and as an App or in the Swift ...
1
vote
0
answers
102
views
Swift JSON Decoding Crashes Xcode Playgrounds
I'm learning Swift and I find using Playgrounds helpful to test code snippets. However, when trying to decode JSON, Xcode consistently crashes at the point of decoding. I have tried printing any ...
2
votes
0
answers
107
views
iPhone doesn’t support any of app’s architectures. You can set app's Architectures build setting to Standard Architectures to support iPhone
I'm getting
iPhone doesn’t support any of app’s architectures. You can set app's Architectures build setting to Standard Architectures to support iPhone.
when I try to build/run my app in Xcode and I'...
0
votes
0
answers
42
views
Swift Playgrounds 4.6 removes support for libraries?
I had several library projects that were working in Swift Playgrounds < 4.6 but I get several duplicate compilation errors and previews will not build in Swift Playgrounds > 4.6. Does anyone ...
0
votes
1
answer
199
views
Is there a simple way to convert an Xcode Project to a swiftpm file?
I was creating an app for the Apple Swift Student Challenge, and when I go to submit it I realized that it needs to be a swiftpm file. I made my app as an Xcode project, and can't find any way to ...
0
votes
2
answers
183
views
VNDetectBarcodesRequest throws an error in Swift Playground
My simple code written in Swift Playground is very simple and short (based on popular tutorials):
import UIKit
@preconcurrency import Vision
var queue = DispatchQueue.global()
extension UIImage {
@...
4
votes
1
answer
792
views
Why is there a "Type of expression is ambiguous without a type annotation." error when using a ternary operator on inferred function types in Swift?
I'm reading the official Swift Programming Language Documentation and writing the code snippet examples in Playgrounds. Currently, I'm on Function Types as Return Types which seemed pretty ...
-1
votes
1
answer
153
views
How to Add .mlmodel File to Xcode App Playgrounds (.swiftpm) Project?
I’m working on an Xcode App Playground project (.swiftpm) and trying to add a .mlmodel file (e.g., Exercises.mlmodel) to it. However, when I add the .mlmodel file to my project, I encounter the ...
0
votes
0
answers
19
views
Having trouble integrating a ARViewContainer into a CoreML playground
I tried to integrate a ARViewContainer which gets 3D coordinate from a 2D frame into a CoreML playground. Before integrating, both of them works: the ARViewContainter take a CGRect frame as input and ...
0
votes
1
answer
26
views
Xcode Playgrounds - code does not display after git branches changed (from "master" -> "main")
NOTE: This is not a "Swift Playground" (app), this is a standalone, Xcode-playground.
I have have several existing playgrounds that were created a while ago, you know the story. They live on ...
0
votes
1
answer
451
views
Main Actor Isolation Error in Xcode Playground for Simple Swift Code
I’m new to Swift and running into an issue with actor isolation in Xcode Playgrounds. When I try to run the following simple code, I get the error message about actor isolation, and I’m not sure why.
...
0
votes
2
answers
455
views
Swift Playground and async function
I try to learn something about asynchronous functions and I'm facing a nasty problem with Playground. I have a simple program to download some data, but unfortunately it crashes and all I get are ...