Post

Replies

Boosts

Views

Activity

Verifying braille output in an iOS app without a physical braille device?
I'm developing a calculator app and working to ensure a great experience for both VoiceOver and Braille display users. For expressions like (2+3)×5, I need two different accessibility outputs: VoiceOver (spoken): A descriptive string like “left paren two plus three right paren times five,” provided via .accessibilityValue. I'm using a custom spellOut function since VoiceOver doesn't announce parentheses—which are kind of important when doing math! Braille (symbolic): The literal math string (2+3)×5, provided using .accessibilityCustomContent("", ...), with an empty label so it’s not spoken aloud. The issue: I don’t have access to a Braille display device and Xcode’s Accessibility Inspector doesn’t seem to show the custom content. Is there any way to confirm that custom Braille content is being set correctly in Simulator or with other tools? Or…is there a "math mode" in VoiceOver that forces it to announce parentheses? Any advice or workarounds would be much appreciated! Thanks, Uhl
8
0
307
Jul ’25
How to force VoiceOver to read decimal point even when there are 6 or more decimal digits?
When VoiceOver reads decimal numbers with six or more digits after the decimal, it stops announcing the decimal separator and also adds pauses between each digit. Text("0.12345") // VoiceOver: "zero **point** one two three four five" Text("0.123456") // VoiceOver: "zero one, two, three, four, five, six" How can I force VoiceOver to announce the decimal separator ("point") and not insert pauses regardless of the number of decimal digits?
1
0
258
Jun ’25
Product Page Optimization regression: App Icon tab no longer available
I’m setting up a Product Page Optimization test, but there’s no App Icon tab to pick a different icon for each treatment. I ran a test like this a few months ago and had the App Icon tab, so I’m not sure why it’s missing now. All alternate icons work in my app (can switch between them) and are listed in the Catalog Compiler - Options › Alternate App Icon Sets build setting. Apple engineers: What are the requirements for the App Icon tab to display when creating a test? Everyone else: Could someone with an app with alternate icons start to create a Product Page Optimization test and tell me if you see the App Icon tab? I'd appreciate knowing if others are seeing this. 🙏 Here’s a screenshot from Apple’s Product Optimization Test doc showing the tab I’m missing:
2
0
111
Jun ’25
Is this log noise? "CoreSVG: Error: NULL ref passed to getObjectCoreSVG: Error: NULL ref passed to getObject"
Before I waste time creating an Apple Developer Support ticket, I’m hoping an Apple DTS engineer can confirm if this is just log noise. Here’s the code: import SwiftUI struct ContentView: View { @State private var editMode: EditMode = .inactive @State private var items = ["Item 1", "Item 2", "Item 3"] var body: some View { NavigationStack { List { ForEach(items, id: \.self) { item in Text(item) } .onDelete { indexSet in items.remove(atOffsets: indexSet) } } .environment(\.editMode, $editMode) .toolbar { ToolbarItem(placement: .topBarTrailing) { EditButton() .environment(\.editMode, $editMode) } } } } } #Preview { ContentView() } When you run this code and tap Edit, you’ll initially get: CoreSVG has logged an error. Set environment variabe [sic] "CORESVG_VERBOSE" to learn more. After setting CORESVG_VERBOSE = YES, you’ll see: CoreSVG: Error: NULL ref passed to getObjectCoreSVG: Error: NULL ref passed to getObject This error only appears the first time Edit is tapped after a build and run. It won't happen again, even after force-quitting and reopening the app. The issue also only happens on iOS 18.0 and 18.1—I can’t reproduce it on iOS 17.5. Fortunately, it doesn’t seem to cause any negative side effects. Is this just log noise?
Topic: UI Frameworks SubTopic: SwiftUI
3
5
1.7k
Apr ’25
Simple SwiftData app exhibits excessive & persistent memory growth as items are added
[Submitted as FB14860454, but posting here since I rarely get responses in Feedback Assistant] In a simple SwiftData app that adds items to a list, memory usage drastically increases as items are added. After a few hundred items, the UI lags and becomes unusable. In comparison, a similar app built with CoreData shows only a slight memory increase in the same scenario and does NOT lag, even past 1,000 items. In the SwiftData version, as each batch is added, memory spikes the same amount…or even increases! In the CoreData version, the increase with each batch gets smaller and smaller, so the memory curve levels off. My Question Are there any ways to improve the performance of adding items in SwiftData, or is it just not ready for prime time? Example Projects Here are the test projects on GitHub if you want to check it out yourself: PerfSwiftData PerfCoreData
2
0
898
Nov ’24
How to build a top/bottom split view with a dynamically-sized divider?
Is there a way to structure three views vertically with a top, middle divider, and bottom view, where the… Middle divider view “hugs” its contents vertically (grows and shrinks based on height of child views) Top and bottom views fill the space available above and below the divider Divider can be dragged all the way up (or down), to completely hide the top view (or bottom view) I’ve been working on this for a while and still can’t get it quite right. The code below is close, but the parent view’s bottom edge shifts when the divider resizes. As a result, the bottom view shifts upward when the divider shrinks, whereas I want it to continue to fill the space to the bottom of the screen. import SwiftUI struct ContentView: View { @State private var topRatio: CGFloat = 0.5 @State private var dividerHeight: CGFloat = 44 var body: some View { GeometryReader { geometry in let topInset = geometry.safeAreaInsets.top let bottomInset = geometry.safeAreaInsets.bottom let totalHeight = geometry.size.height let availableHeight = max(totalHeight - bottomInset - dividerHeight, 0) VStack(spacing: 0) { TopView() .frame(height: max(availableHeight * topRatio - topInset, 0)) .frame(maxWidth: .infinity) .background(Color.red.opacity(0.3)) DividerView() .background(GeometryReader { proxy in Color.clear.preference(key: DividerHeightKey.self, value: proxy.size.height) }) .onPreferenceChange(DividerHeightKey.self) { height in dividerHeight = height } .gesture( DragGesture() .onChanged { value in let maxDragDistance = availableHeight + dividerHeight let translation = value.translation.height / max(maxDragDistance, 1) let newTopRatio = topRatio + translation topRatio = min(max(newTopRatio, 0), 1) } ) .zIndex(1) BottomView() .frame(height: max(availableHeight * (1 - topRatio), 0)) .frame(maxWidth: .infinity) .background(Color.green.opacity(0.3)) } } } } struct DividerHeightKey: PreferenceKey { static var defaultValue: CGFloat = 44 static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { value = nextValue() } } struct DividerView: View { @State private var showExtraText = true var body: some View { VStack(spacing: 0) { Text(showExtraText ? "Tap to hide 'More'" : "Tap to show 'More'") .frame(height: 44) if showExtraText { Text("More") .frame(height: 44) } } .frame(maxWidth: .infinity) .background(Color.gray) .onTapGesture { showExtraText.toggle() } } } struct TopView: View { var body: some View { VStack { Spacer() Text("Top") } .padding(0) } } struct BottomView: View { var body: some View { VStack { Text("Bottom") Spacer() } .padding(0) } } #Preview { ContentView() }
2
0
439
Oct ’24
How to avoid Swift 6 concurrency warning from UIAccessibility.post()
I have the following var in an @Observable class: var displayResult: String { if let currentResult = currentResult, let decimalResult = Decimal(string: currentResult) { let result = decimalResult.formatForDisplay() UIAccessibility.post(notification: .announcement, argument: "Current result \(result)") return result } else { return "0" } } The UIAccessiblity.post gives me this warning: Reference to static property 'announcement' is not concurrency-safe because it involves shared mutable state; this is an error in Swift 6 How can I avoid this?
3
0
2.3k
Jun ’24