Post

Replies

Boosts

Views

Created

Vision Framework Causes EXC_BREAKPOINT Error in Xcode App Playground (.swiftpm) File
I’m trying to use the Vision framework in a Swift Playground to perform face detection on an image. The following code works perfectly when I run it in a regular Xcode project, but in an App Playground, I get the error: Thread 12: EXC_BREAKPOINT (code=1, subcode=0x10321c2a8) Here's the code: import SwiftUI import Vision struct ContentView: View { var body: some View { VStack { Text("Face Detection") .font(.largeTitle) .padding() Image("me") .resizable() .aspectRatio(contentMode: .fit) .onAppear { detectFace() } } } func detectFace() { guard let cgImage = UIImage(named: "me")?.cgImage else { return } let request = VNDetectFaceRectanglesRequest { request, error in if let results = request.results as? [VNFaceObservation] { print("Detected \(results.count) face(s).") for face in results { print("Bounding Box: \(face.boundingBox)") } } else { print("No faces detected.") } } let handler = VNImageRequestHandler(cgImage: cgImage, options: [:]) do { try handler.perform([request]) // This line causes the error. } catch { print("Failed to perform Vision request: \(error)") } } } The error occurs on this line: try handler.perform([request]) Details: This code runs fine in a normal Xcode project (.xcodeproj). I'm using an App Playground instead (.swiftpm). The image is being included in the .xcassets folder. Is there any way I can mitigate this issue? Please do not recommend switching to .xcodeproj, as I am making a submission for Apple's Swift Student Challenge, and they require that I use .swiftpm.
1
0
497
Dec ’24
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 following error: Exercises.mlmodel: No predominant language detected. Set COREML_CODEGEN_LANGUAGE to preferred language. The .mlmodel file works perfectly fine when used in a regular Xcode project (.xcodeproj), but this issue occurs as soon as I add the file in an App Playground project (.swiftpm). Steps I’ve Tried: Ensuring the .mlmodel file is correctly added to the project folder. Checking the generated Core ML Swift code in a .xcodeproj environment—works as expected. Searching for a way to explicitly set COREML_CODEGEN_LANGUAGE in a .swiftpm project, but it seems that Xcode does not provide this option. Any advice or solutions would be greatly appreciated! I have tried the solutions in these articles, however none of them worked: https://medium.com/@sofiadinizms/how-to-use-coreml-in-swift-playgrounds-8d5f001c5d15 https://developer.apple.com/forums/thread/743942?answerId=776359022#776359022
1
0
544
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
425
Jan ’25
What is the difference between .safeAreaInset and the new .safeAreaBar?
I've been trying out the new .safeAreaBar modifier for iOS 26, but I cannot seem to notice any difference between that and .safeAreaInset? The documentation says: the bar modifier configures the content to support views to automatically extend the edge effect of any scroll view’s the bar adjusts safe area of. But I can't seem to see that in action.
1
2
288
Jul ’25
What iPadOS version do evaluation devices run when submitted via Swift Playgrounds?
I'm working on my Swift Student Challenge 2026 submission and have a question about the evaluation environment. My app targets iOS 26 (I had to configure this on the Package.swift file directly) and uses the Speech framework for on-device speech recognition. I've selected Swift Playgrounds as my evaluation path (rather than Xcode) with the intention of having it run on a physical iPad rather than Simulator. My question: What version of iPadOS will the evaluation iPads be running? The reason I ask is practical, as my app's minimum deployment target is iOS 26. If the evaluation device is running an earlier version of iPadOS, the app won't launch at all. I've searched the eligibility and terms pages but couldn't find this documented anywhere.
1
0
127
Feb ’26
Eligibility question regarding part-time employment as a developer during the school year
I have a question about the full-time employment eligibility requirement for the Swift Student Challenge 2026. The rules state that applicants cannot be "employed full time as a developer" at the time of submission. My situation is a bit nuanced: I work as a software engineer at a company, but my contract explicitly distinguishes between summer and school year employment. During the summer I work full-time, but during the school year my hours are part-time and flexible, and therefore not a fixed schedule. Since the submission deadline is February 28th, I would be submitting during the school year, at which point I am not working full-time. My question: Does the eligibility rule apply strictly to full-time hours at the time of submission, or does being employed in a developer role at all (even part-time during the school year) disqualify me?
3
0
225
Feb ’26
Vision Framework Causes EXC_BREAKPOINT Error in Xcode App Playground (.swiftpm) File
I’m trying to use the Vision framework in a Swift Playground to perform face detection on an image. The following code works perfectly when I run it in a regular Xcode project, but in an App Playground, I get the error: Thread 12: EXC_BREAKPOINT (code=1, subcode=0x10321c2a8) Here's the code: import SwiftUI import Vision struct ContentView: View { var body: some View { VStack { Text("Face Detection") .font(.largeTitle) .padding() Image("me") .resizable() .aspectRatio(contentMode: .fit) .onAppear { detectFace() } } } func detectFace() { guard let cgImage = UIImage(named: "me")?.cgImage else { return } let request = VNDetectFaceRectanglesRequest { request, error in if let results = request.results as? [VNFaceObservation] { print("Detected \(results.count) face(s).") for face in results { print("Bounding Box: \(face.boundingBox)") } } else { print("No faces detected.") } } let handler = VNImageRequestHandler(cgImage: cgImage, options: [:]) do { try handler.perform([request]) // This line causes the error. } catch { print("Failed to perform Vision request: \(error)") } } } The error occurs on this line: try handler.perform([request]) Details: This code runs fine in a normal Xcode project (.xcodeproj). I'm using an App Playground instead (.swiftpm). The image is being included in the .xcassets folder. Is there any way I can mitigate this issue? Please do not recommend switching to .xcodeproj, as I am making a submission for Apple's Swift Student Challenge, and they require that I use .swiftpm.
Replies
1
Boosts
0
Views
497
Activity
Dec ’24
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 following error: Exercises.mlmodel: No predominant language detected. Set COREML_CODEGEN_LANGUAGE to preferred language. The .mlmodel file works perfectly fine when used in a regular Xcode project (.xcodeproj), but this issue occurs as soon as I add the file in an App Playground project (.swiftpm). Steps I’ve Tried: Ensuring the .mlmodel file is correctly added to the project folder. Checking the generated Core ML Swift code in a .xcodeproj environment—works as expected. Searching for a way to explicitly set COREML_CODEGEN_LANGUAGE in a .swiftpm project, but it seems that Xcode does not provide this option. Any advice or solutions would be greatly appreciated! I have tried the solutions in these articles, however none of them worked: https://medium.com/@sofiadinizms/how-to-use-coreml-in-swift-playgrounds-8d5f001c5d15 https://developer.apple.com/forums/thread/743942?answerId=776359022#776359022
Replies
1
Boosts
0
Views
544
Activity
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?
Replies
2
Boosts
1
Views
425
Activity
Jan ’25
iOS 26: How to achieve TabView effect like in the Find My app.
I noticed on the Find My app in the new iOS 26 beta that the TabView and the sheet seem to be part of the same view. When you collapse the sheet, the TabView is still visible, and you can swipe up to view the sheet again. Is there a way to recreate this effect? Preferably in SwiftUI, but UIKit works too.
Replies
1
Boosts
1
Views
262
Activity
Jun ’25
What is the difference between .safeAreaInset and the new .safeAreaBar?
I've been trying out the new .safeAreaBar modifier for iOS 26, but I cannot seem to notice any difference between that and .safeAreaInset? The documentation says: the bar modifier configures the content to support views to automatically extend the edge effect of any scroll view’s the bar adjusts safe area of. But I can't seem to see that in action.
Replies
1
Boosts
2
Views
288
Activity
Jul ’25
What iPadOS version do evaluation devices run when submitted via Swift Playgrounds?
I'm working on my Swift Student Challenge 2026 submission and have a question about the evaluation environment. My app targets iOS 26 (I had to configure this on the Package.swift file directly) and uses the Speech framework for on-device speech recognition. I've selected Swift Playgrounds as my evaluation path (rather than Xcode) with the intention of having it run on a physical iPad rather than Simulator. My question: What version of iPadOS will the evaluation iPads be running? The reason I ask is practical, as my app's minimum deployment target is iOS 26. If the evaluation device is running an earlier version of iPadOS, the app won't launch at all. I've searched the eligibility and terms pages but couldn't find this documented anywhere.
Replies
1
Boosts
0
Views
127
Activity
Feb ’26
Eligibility question regarding part-time employment as a developer during the school year
I have a question about the full-time employment eligibility requirement for the Swift Student Challenge 2026. The rules state that applicants cannot be "employed full time as a developer" at the time of submission. My situation is a bit nuanced: I work as a software engineer at a company, but my contract explicitly distinguishes between summer and school year employment. During the summer I work full-time, but during the school year my hours are part-time and flexible, and therefore not a fixed schedule. Since the submission deadline is February 28th, I would be submitting during the school year, at which point I am not working full-time. My question: Does the eligibility rule apply strictly to full-time hours at the time of submission, or does being employed in a developer role at all (even part-time during the school year) disqualify me?
Replies
3
Boosts
0
Views
225
Activity
Feb ’26