Post

Replies

Boosts

Views

Activity

Xcode 26.0 beta 3: Clicking current branch in Source Control navigator doesn't show commit history
[Also submitted as FB18858239] In Xcode 26.0 beta 3 (17A5276g), clicking the current branch (e.g. "main") in the Source Control navigator no longer displays the commit history. Instead, the editor area remains stuck on the previously viewed file. REPRO STEPS Create a new iOS Swift UI app. Name it "Test" and check the Create Git repository on my Mac checkbox. In the Navigator select Source Control navigator. In Source Control, select Repositories. Expand "Test" then "Branches" the select "main (current)" CURRENT RESULTS The main view remains on the ContentView.swift file. EXPECTED RESULTS The main view changes to show the commit history. SCREENSHOTS Xcode 26.0 beta 3 Xcode 16.4
1
0
157
5d
Implicit list row animations broken in Form container on iOS 26 beta 3
[Submitted as FB18870294, but posting here for visibility.] In iOS 26 beta 3 (23A5287g), implicit animations no longer work when conditionally showing or hiding rows in a Form. Rows with Text or other views inside a Section appear and disappear abruptly, even when wrapped in withAnimation or using .animation() modifiers. This is a regression from iOS 18.5, where the row item animates in and out correctly with the same code. Repro Steps Create a new iOS App › SwiftUI project. Replace its ContentView struct with the code below Build and run on an iOS 18 device. Tap the Show Middle Row toggle and note how the Middle Row animates. Build and run on an iOS 26 beta 3 device. Tap the Show Middle Row toggle. Expected Middle Row item should smoothly animate in and out as it does on iOS 18. Actual Middle Row item appears and disappears abruptly, without any animation. Code struct ContentView: View { @State private var showingMiddleRow = false var body: some View { Form { Section { Toggle( "Show **Middle Row**", isOn: $showingMiddleRow.animation() ) if showingMiddleRow { Text("Middle Row") } Text("Last Row") } } } }
1
3
131
1w
Programmatically force VoiceOver to read parentheses for math expressions
How can I force VoiceOver to read parentheses for math expressions like this: Text("(2+3)×4") // VoiceOver: Two plus three, times four I’m looking for a way to have VoiceOver announce parentheses (e.g. “left paren”, “right paren”) without relying on NumberFormatter.Style.spellOut or .speechAlwaysIncludesPunctuation(), as both have drawbacks. Using .spellOut breaks braille output and Rotor › Characters menu by turning numbers and symbols into words. And .speechAlwaysIncludesPunctuation() makes VoiceOver overly verbose—for example, it reads “21” as “twenty hyphen one.” Is there a better way to selectively announce specific punctuation like parentheses while keeping numbers and symbols intact for braille and Rotor use?
2
0
322
3w
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
225
3w
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
238
3w
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
88
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.6k
Oct ’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
387
Oct ’24
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
843
Aug ’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.2k
Jun ’24