I am having an issue with the code that I posted below. I capture voice in my CarPlay app, then allow the user to have it read back to them using AVSpeechUtterance.
This works fine on some cars, but many of my beta testers report no audio being played. I have also experienced this in a rental car where the audio was either too quiet or the audio didn't play.
Does anyone see any issue with the code that I posted? This is for CarPlay specifically.
class CarPlayTextToSpeechService: NSObject, ObservableObject, AVSpeechSynthesizerDelegate {
private var speechSynthesizer = AVSpeechSynthesizer()
static let shared = CarPlayTextToSpeechService()
/// Completion callback
private var completionCallback: (() -> Void)?
override init() {
super.init()
speechSynthesizer.delegate = self
}
func configureAudioSession() {
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .voicePrompt, options: [.duckOthers, .interruptSpokenAudioAndMixWithOthers, .allowBluetoothHFP])
} catch {
print("Failed to set audio session category: \(error.localizedDescription)")
}
}
public func speak(_ text: String, completion: (() -> Void)? = nil) {
self.configureAudioSession()
// Store the completion callback
self.completionCallback = completion
Task(priority: .high) {
let speechUtterance = AVSpeechUtterance(string: text)
let langCode = Locale.preferredLocalLanguageCountryCode
if langCode == "en-US" {
speechUtterance.voice = AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex)
} else {
speechUtterance.voice = AVSpeechSynthesisVoice(language: langCode)
}
try AVAudioSession.sharedInstance().setActive(true, options: .notifyOthersOnDeactivation)
speechSynthesizer.speak(speechUtterance)
}
}
func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) {
Task {
stopSpeech()
try AVAudioSession.sharedInstance().setActive(false)
}
// Call completion callback if available
self.completionCallback?()
self.completionCallback = nil
}
func stopSpeech() {
speechSynthesizer.stopSpeaking(at: .immediate)
}
}
Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
When tap the Button quickly in List, the ButtonStyleConfiguration’s isPressed property don't change properly, always false. When using Button in ScrollView, the same error doesn't exist.
I'm adapting for iOS 26, and I found that when pressing and slowly swiping the screen, the section header near the bottom of the navigation bar in the tableview flickers frequently. How can I fix this issue?
Please view the video in the github project: issue.mp4
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 44, 44);
[backBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(gotoBack) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
// backItem.hidesSharedBackground = YES;
// backItem.tintColor = [UIColor redColor];
self.navigationItem.leftBarButtonItem = backItem;
I am using Xcode 26, which is compatible with iOS 26.
After I set up the back button of the navigation bar, why are the background colors of the back buttons on some pages gray? When I pushed the new page, after popping back to the current page, the buttons with the gray background turned back to the white background.
This issue will also affect the rightBarButtonItem.
Topic:
UI Frameworks
SubTopic:
UIKit
The latest iPhone model is unable to retrieve the Wi-Fi information it has connected to. The phone's operating system is iOS 26.1, and location permission has also been granted.
"Access Wi-Fi Information" is also configured in the same way
The following is the code I used to obtain Wi-Fi information:
func getCurrentWiFiInfo() -> String? {
guard let interfaces = CNCopySupportedInterfaces() as? [String] else {
return nil
}
for interface in interfaces {
guard let info = CNCopyCurrentNetworkInfo(interface as CFString) as? [String: Any] else {
continue
}
if let ssid = info[kCNNetworkInfoKeySSID as String] as? String,
!ssid.isEmpty {
return ssid
}
}
return nil
}
My app uses SwiftUI Map and draws Markers, MapPolyline and MapPolygons over it. These all work on actual devices. On the iOS 26.0.1 Simulator running on macOS 26.0.1 Polylines and Polygons do now show.
Do others see the same thing?
When I use the .zoom transition in a navigation stack, I get a glitch when interrupting the animation by swiping back before it completes.
When doing this, the source view disappears. I can still tap it to trigger the navigation again, but its not visible on screen.
This seems to be a regression in iOS 26, as it works as expected when testing on iOS 18.
Has someone else seen this issue and found a workaround? Is it possible to disable interrupting the transition?
Filed a feedback on the issue FB19601591
Screen recording:
https://share.icloud.com/photos/04cio3fEcbR6u64PAgxuS2CLQ
Example code
@State var showDetail = false
@Namespace var namespace
var body: some View {
NavigationStack {
ScrollView {
showDetailButton
}
.navigationTitle("Title")
.navigationBarTitleDisplayMode(.inline)
.navigationDestination(isPresented: $showDetail) {
Text("Detail")
.navigationTransition(.zoom(sourceID: "zoom", in: namespace))
}
}
}
var showDetailButton: some View {
Button {
showDetail = true
} label: {
Text("Show detail")
.padding()
.background(.green)
.matchedTransitionSource(id: "zoom", in: namespace)
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Hi
I have a NSTextView set as the document of a NSScrollView
scrollView.documentView = textView
I want to programatically scroll to a specific offset in the scrollView. I use the following function and it jumps to the right location:
scrollView.documentOffset = offset
However I would like to animate the scrolling. Any suggestions?
Also to mention, I have not flipped the coordinates of the NSTextView
Thanks
Reza
Topic:
UI Frameworks
SubTopic:
AppKit
Since iOS 26.0, the Control Center layout consistently resets in landscape orientation after certain system events.
This issue is still present in the official public release of iOS 26.2.
The reset occurs without a visible reboot and appears to be triggered by a background SpringBoard termination (jetsam) during charging idle maintenance windows (typically overnight while the device is plugged in).
After SpringBoard relaunches:
• The portrait Control Center layout is restored correctly
• The landscape Control Center layout is reinitialized using the default order
This indicates a state restoration failure rather than a user configuration or sync issue.
⸻
Steps to Reproduce:
Use an iPhone 15 Pro running iOS 26.0, 26.1, or 26.2
Manually reorder Control Center controls
Leave the device plugged in and idle overnight
During charging idle, SpringBoard is terminated in the background due to memory pressure (no visible reboot)
Open Control Center the next day:
• Portrait layout is preserved
• Landscape layout has reverted to default
⸻
Expected Result:
Both portrait and landscape Control Center layouts should persist across SpringBoard restarts caused by jetsam or memory pressure, including during charging idle maintenance.
⸻
Actual Result:
After SpringBoard relaunch:
• Portrait layout is restored correctly
• Landscape layout is lost and recreated using the default configuration
⸻
Analytics / Logs (relevant excerpt):
Process: SpringBoard
Case Type: MemoryResourceException
Subtype: MREExceptionFatalLimitActive
This occurs during charging idle and does not require a user-initiated reboot.
⸻
Additional Observations:
• Issue does not occur when the device is idle overnight without charging
• Manual reordering works correctly until the next SpringBoard jetsam
• Resetting settings, disabling iCloud sync, or reinstalling iOS does not resolve the issue
• This behavior has persisted across multiple major and minor releases, indicating a regression or unresolved bug
⸻
Suspected Root Cause:
Incomplete state restoration in ControlCenterKit after SpringBoard relaunch following jetsam during charging idle.
Portrait state is restored; landscape state falls back to default.
Topic:
UI Frameworks
SubTopic:
UIKit
I need the user to input an emoji but not other characters. I'd like to be able to use an emoji keyboard similar to the one in the Reminders app. How can I do this?
.popover(isPresented: modifier doesn't work on Mac Catalyst when attached to the item in the toolbar. The app crashes on button click, when trying to present the popover.
iOS 26 RC (macOS 26 RC)
Feedback ID - FB20145491
import SwiftUI
struct ContentView: View {
@State private var isPresented: Bool = false
var body: some View {
NavigationStack {
Text("Hello, world!")
.toolbar {
ToolbarItem(placement: .automatic) {
Button(action: {
self.isPresented.toggle()
}) {
Text("Toggle popover")
}
.popover(isPresented: $isPresented) {
Text("Hello, world!")
}
}
}
}
}
}
#Preview {
ContentView()
}
Hello everybody!
TLDR: Issues with visibleItemsInvalidationHandler. Minimal code to reproduce available.
I've been working with Compositional Layout for a while now and recently I've found myself needing to implement custom animation based on scroll position of UI elements. Once I found visibleItemsInvalidationHandler it felt like the exact solution that I needed. Once I implement I've found out it doesn't quite behave as you'd expect.
To put it simply, it seems like the animations only work if your whole layout does not use .estimated nor .uniformAcrossSiblings. As soon as you use them then the animations will stop working, I've debugged it deeper and it seems like the invalidation context generated by it does not include the indexPath of the cells, which is always included in the version in which it works.
Feel free to swap the line 51 with its comment to flip between the working and failing version of it.
Playground Example
My final question therefore is... Is this the expected behavior? The documentation doesn't give any clues about such behavior and although I've tried relentlessly to find a workaround for this specific hiccup I was not successful with it.
My app doesn't respond on iPhone Air iOS 26.1.
After startup, my app shows the main view with a tab bar controller containing 4 navigation controllers. However, when a second-level view controller is pushed onto any navigation controller, the UI freezes and becomes unresponsive. The iPhone simulator running iOS 26.1 exhibits the same problem.
The debug profile shows CPU usage at 100%.
However, other devices and simulators do not have this problem.
I'm developing a rhythm game for iOS which has four buttons spanning the width of the screen in portrait. I noticed that my testers were having some missed inputs on the buttons on the left and right due to the fact that iOS, by default, tries to ignore accidental touches on the edges of the screen. So I enabled "Defer System Gestures" on the left and right edges, but then quickly started to notice a new, very specific, issue.
Description of the issue
If you have finger #1 touching and holding anywhere in the middle of the screen, and finger #2 touches on the far right or left edge of the screen just below the horizontal position of finger #1, those touches are inconsistently not recognized. If finger #1 is not present, this issue does not occur. If finger #2 is above or well below finger #1, this issue also does not occur. A dead zone is created on the right and left edges of the screen just below the horizontal position of the first touch.
Here is a rough representative example of where touches #1 and #2 need to be for this issue to manifest, in case the text above is not clear.
|				|
|				|
|				|
|				|
|	 1		|
|			 2|
|				|
It just so happens that this issue is causing major usability problems with my game, as it results in what the user sees as sporadic and inconsistent response when the game calls for two notes to be played at the same time.
Steps to recreate the issue
Here are the steps if you want to recreate the problem yourself using the "Create New Gesture" pane in "Assistive Touch" (Note that this problem is not specific to the Settings app, but rather is an issue across the system—however this panel defers system gestures and shows where touches are being read, so it is a great place to demonstrate):
(1) Go to Settings > Accessibility > Touch > Assistive Touch > Create New Gesture...;
(2) With one finger, touch the middle of the screen and hold it through step 3;
(3) With a second finger, tap 4 times along the right (or left) edge of the screen in the following places:
(a) well above the vertical position of the first touch,
(b) just above the vertical position of the first touch,
(c) just below the vertical position of the first touch, and
(d) well below the vertical position of the first touch;
(4) Notice how, more than half the time, touch (c) does not register. I have found that this problem is more replicatable when the first touch is on the lower half of the screen, but I have been able to replicate it when the finger is higher as well, just not as consistently.
Here are the four positions described in the steps above:
Position a: both touches register
|				|
|				|
|				|
|			 2|
|	 1		|
|				|
|				|
Position b: both touches usually register
|				|
|				|
|				|
|				|
|	 1	 2|
|				|
|				|
Position c: only touch 1 registers
|				|
|				|
|				|
|				|
|	 1		|
|			 2|
|				|
Position d: both touches register
|				|
|				|
|				|
|				|
|	 1		|
|				|
|			 2|
Is there anything I can do to resolve this behavior? My app requires gesture deferment to be on for the expected experience by the user, and this bug is causing other issues for my testers that kind of need to be resolved before I can confidently release the game.
Issue: The search functionality in FamilyActivityPicker has disappeared on iPadOS 26.0+. This feature was working in previous versions but is now missing.
Framework: FamilyControls
Expected: Search bar should be available in FamilyActivityPicker to help users find apps quickly.
Actual: Search functionality is completely missing.
Impact: Makes app selection difficult for users with many installed apps.
Is this a known issue? If it's a bug, please address it in an upcoming update. If intentional, guidance on alternatives would be appreciated.
Thank you.
We're using XCode 26.1.1
We do not have resource to adopt Liquid Glass design. Hence, we are using the following workaround
<key>UIDesignRequiresCompatibility</key>
<true/>
This is our Storyboard.
Pre XCode 26
Before XCode 26.1.1, the bottom toolbar looks great.
In XCode 26
However, in XCode 26.1.1, the bottom toolbar buttons seems to "Squish together".
Do anyone have any idea, how I can make UIToolbar works by enabling UIDesignRequiresCompatibility?
Thanks.
I have a borderless NSWindow with transparent background floating at Dock level and with collectionBehavior set to NSWindowCollectionBehaviorCanJoinAllSpaces.
To render its background I was using an NSVisualEffectView, but, with the introduction of Liquid Glass, I decided to replace it with a NSGlassEffectView on Tahoe.
On macOS 26.0 and 26.1 all works fine: my window's background is correctly rendered and updated.
On macOS 26.2 this is not so: the background seems cached and doesn't update if I move my window or if I drag some other window underneath it.
My window's movable property is set to NO (and I need this to be so): dragging is implemented by handling mouseDown, mouseDragged, and mouseUp events.
Just to experiment, I tried setting movable and movableByWindowBackground both to YES. In this case, the NSGlassEffectView is correctly updated if I move the window itself, but doesn't change if I move other windows underneath it.
Has anybody experienced a similar problem on maOS 26.2? If so, is there a way to solve it?
Thanks, Marco
Topic:
UI Frameworks
SubTopic:
AppKit
Hello! What UIKit API enables you to add a view below the navigation bar and extend the scroll edge effect below it in iOS 26? safeAreaBar is how you do it in SwiftUI but I need to achieve this design in my UIKit app (which has a collection view in a view controller in a navigation controller).
struct ContentView: View {
let segments = ["First", "Second", "Third"]
@State private var selectedSegment = "First"
var body: some View {
NavigationStack {
List(0..<50, id: \.self) { i in
Text("Row \(i + 1)")
}
.safeAreaBar(edge: .top) {
Picker("Segment", selection: $selectedSegment) {
ForEach(segments, id: \.self) {
Text($0)
}
}
.pickerStyle(.segmented)
.padding(.horizontal)
.padding(.bottom, 8)
}
.navigationTitle("Title")
.navigationBarTitleDisplayMode(.inline)
}
}
}
Filed in Feedback as FB20772137
Zoom transition originating from inside tabViewBottomAccessory, when the binding passed to fullScreenCover's item is a Binding other than a "$-synthesized" binding, the animation fails with the following error (and crucially fails to perform the desired animation):
Starting a zoom transition from a nil view will trigger a fallback transition. To get the best possible teansition, be sure to provide a view that's visible and in a window.
What I want to do is pass a binding to a property inside an ObservableObject (or @Observable, but it doesn't matter) to hold the item representing the presentation. But this stopped working as of 26.1b4. It worked in 26.1b3 and in 26.0 (and 26.0.1)
Here's the gist of code that will reproduce the issue (I've omitted irrelevant details in the interest of brevity):
struct ContentView: View {
@Binding var presentation: PresentationDestination?
@Namespace private var animation
var body: some View {
// Omitted TabView stuff…
.tabViewBottomAccessory {
miniPlayer
.matchedTransitionSource(
id: "player",
in: animation
)
}
.fullScreenCover(
item: $presentation,
content: { _ in
fullScreenPlayer
.navigationTransition(
.zoom(
sourceID: "player",
in: animation
)
)
})
}
As you can see, ContentView takes a Binding to the presentation, but it matters how this binding is constructed.
This works:
@State private var presentation: PresentationDestination
…
ContentView(presentation: $presentation)
This fails (as does ObservableObject with @Published):
@Observable
class Router2 {
var presentation: PresentationDestination?
}
…
@State private var router2 = Router2()
…
ContentView(presentation: $router2.presentation)
Also, this fails:
@State private var presentation: PresentationDestination
…
ContentView(
presentation: .init(get: {
presentation
}, set: { newValue in
presentation = newValue
})
)
These differences are unexpected, of course. I consider this a regression in 26.1b4
I should add that if I move the source of the transition to somewhere outside tabViewBottomAccessory things seem to work fine.
"Use location, address and addressRepresentations instead"
Is it possible to know what kind of "Address" a MapItem is representing (State, County, Neighborhood etc) after a MKGeocodingRequest?
Is it possible to find out the CLRegion or similar of an map item. (Now when we cannot read it from the Placemark)