49 questions from the last 30 days
1
vote
1
answer
26
views
SwiftUI PhaseAnimator causing AttributeGraph cycle crash when nested in List with @Observable
I’m hitting a very specific runtime crash in iOS 19.2 (Xcode 17.1) that I haven't seen documented anywhere.
I have a List where each row uses the new @Observable macro for its view model. Inside the ...
0
votes
1
answer
61
views
NavigationView List Large Title doesn't work with background color [duplicate]
I have a very weird issue that if I have a List inside a NavigationView, the title disappears. But this only happens if I have set a background color. Here is the code that Works.
import SwiftUI
...
0
votes
1
answer
51
views
Why is undoManager of NSTextView subclass always nil when testing?
I have a subclass (MyTextView) of NSTextView. When i try to test its (working) undo/redo using Swift Testing its undoManager property is always niland the test fails.
// Added extension
extension ...
-1
votes
2
answers
82
views
Mac App starts in light mode before switching to dark
I recently added a setting to my Mac app that allows the use to select between a light, dark, or automatic appearance. While this works overall, if you select dark and relaunch the app while the ...
0
votes
1
answer
39
views
AppShortcut is shown in Shortcuts app but not in Spotlight
I want to create my own AppShortcut so I can search for my app and its contents on Spotlight. Currently I have these codes:
import AppIntents
@available(iOS 16.0, *)
struct TransferIntent: AppIntent {...
0
votes
0
answers
43
views
Failed to load interstitial ad with error: Request Error: No ad to show
Environment
SDK Version: 13.2.0 (via SPM)[https://github.com/googleads/swift-package-manager-google-mobile-ads.git]
Xcode Version: 26.0
Platform: iOS
Ad Format: Interstitial
Issue Description
I am ...
1
vote
0
answers
54
views
Can Core Data avoid index rebuild when adding a new attribute during lightweight migration?
I’m investigating Core Data lightweight migration behavior with SQLite and ran into a performance issue.
Scenario:
Model V1: EntityA has one fetchIndex
Model V2: EntityA adds a new optional ...
Advice
0
votes
1
replies
43
views
In Swift I'm trying to understand the flow of logic when using Sendable, nonisolated, and Actors
My understanding is the TripsFeedViewModel runs on the MainActor due to observable so this class is basically isolated to an actor, the MainActor. So in a sense it does prevent data races. Then when ...
0
votes
0
answers
56
views
SwiftUI Navigation breaks intermittently when building with Xcode 26
Has anyone else been getting reports of navigations breaking for a random subset of users since upgrading to Xcode 26?
Broadly, it seems that the SwiftUI navigation state falls out of sync with the ...
0
votes
2
answers
82
views
How can I change the background color of the selected tab in SwiftUI TabView?
I want to add a background color like below:
I tried to achieve it by adding a ZStack, but was not successful and getting a view like this:
TabView(selection: $coordinator.selectedTab) {
// Chat ...
1
vote
0
answers
59
views
Reality Kit Object Sound Position changes with landscape mode
My object makes the sound is on the right of screen regardless of iOS device landscape mode.
Sound comes from object location while device at landscape mode which usb input is at right.
But when the ...
-4
votes
1
answer
110
views
check each array with each array - and not doubling [closed]
i have a multidimensional Int Array. I want to check each array with each array but without repeating same operations like comparing myArr[4] with myArr[5] and later myArr[5] with myArr[4] .
My goal ...
-1
votes
0
answers
89
views
How to set up rendering in Metal [closed]
I am learning Metal. My starter project is a rewrite of an old Mac kaleidoscope app I wrote in Objective C and OpenGL. I'm rewriting it as a Multiplatform app in SwiftUI and Metal, using `MTKView`s.
...
0
votes
0
answers
42
views
AVCaptureDevice.exposurePointOfInterest readback does not match set value on iPad Pro M4 / M3(UltraWide)and Gen2,3,4(TrueDepth) using resizeAspectFill [closed]
Environment:
Devices: iPad Pro 11" M4, iPad Air 11" M3, iPad Pro 11" Gen2/3/4
Language: Swift
Framework: AVFoundation
Front camera: UltraWide (M4/M3), TrueDepth (Gen2–4)
Video ...
0
votes
0
answers
87
views
ModelContext.didSave not firing for deletion events
The basis for this is that I have an app where I am modifying a database using a simple Model: Record.
If I insert 10 records, and perform modelContext.save() I receive the notification (ModelContext....