After upgrading to macOS 26, I noticed that showing a Quicklook preview in my app is very slow. Showing small text files is fine, but some other files I've tried, such as a Numbers document, take about 30 seconds (during which the indeterminate loading indicator appears) before the preview is shown. When showing the preview of an app, such as Xcode, the panel opens immediately with a placeholder image for the Xcode icon, and the actual Xcode icon is shown only after about 25 seconds. During this time many logs appear:
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.2/ (/)
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.23684/ (/Users)
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248032/ (/Users/n{9}k)
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248084/ (/Users/n{9}k/Downloads)
Failed to add registration dmf.policy.monitor.app with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.}
Failed to register application policy monitor with identifier 69DDBDB4-0736-42FA-BA7A-C8D7EA049E29 for types {(
applicationcategories,
websites,
categories,
applications
)} with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.}
FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.155797561/ (~/Downloads/X{3}e.app)
It seems that Quicklook tries to access each parent directory of the previewed file, and each one fails after 5 seconds.
Why is Quicklook all of a sudden so slow? It used to be almost instant in macOS 15.
I created FB20268201.
import Cocoa
import Quartz
@main
class AppDelegate: NSObject, NSApplicationDelegate, QLPreviewPanelDataSource, QLPreviewPanelDelegate {
var url: URL?
func applicationDidFinishLaunching(_ notification: Notification) {
let openPanel = NSOpenPanel()
openPanel.runModal()
url = openPanel.urls[0]
QLPreviewPanel.shared()!.makeKeyAndOrderFront(nil)
}
override func acceptsPreviewPanelControl(_ panel: QLPreviewPanel!) -> Bool {
return true
}
override func beginPreviewPanelControl(_ panel: QLPreviewPanel!) {
panel.dataSource = self
panel.delegate = self
}
override func endPreviewPanelControl(_ panel: QLPreviewPanel!) {
panel.dataSource = nil
panel.delegate = nil
}
func numberOfPreviewItems(in panel: QLPreviewPanel!) -> Int {
return 1
}
func previewPanel(_ panel: QLPreviewPanel!, previewItemAt index: Int) -> QLPreviewItem! {
return url as? QLPreviewItem
}
}
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
Created
Hello,
I have been receiving crash reports on iOS 26 related to a view containing a UITextField. Although I have not been able to reproduce the issue locally and the exact reproduction steps are unknown, the call stack suggests the crash may be related to language or input method changes.
If anyone has encountered a similar crash on iOS 26 or has any insights regarding language/input-related issues impacting UITextField behavior, your help would be greatly appreciated. The call stack from the reports is attached below.
Exception
NSInvalidArgumentException
-[__NSPlaceholderArray initWithObjects:count:]
attempt to insert nil object from objects[1]
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0xc98c8 __exceptionPreprocess
1 libobjc.A.dylib 0x317c4 objc_exception_throw
2 CoreFoundation 0xe1d7c -[__NSPlaceholderArray initWithObjects:count:]
3 CoreFoundation 0x1485d0 +[NSArray arrayWithObjects:count:]
4 UIKitCore 0xfc4d44 -[UIInlineInputSwitcher updateInputModes:withHUD:]
5 UIKitCore 0xfc4fe0 -[UIIndicatorInputSwitcher switchMode:withHUD:withDelay:]
6 UIKitCore 0xfc31d4 -[UIInputSwitcher showsLanguageIndicator:]
7 UIKitCore 0xa16dc8 __140-[_UIKeyboardStateManager _setupDelegate:delegateSame:hardwareKeyboardStateChanged:endingInputSessionIdentifier:force:delayEndInputSession:]_block_invoke_4
8 libdispatch.dylib 0x1abc _dispatch_call_block_and_release
9 libdispatch.dylib 0x1b7cc _dispatch_client_callout
10 libdispatch.dylib 0x38af0 _dispatch_main_queue_drain.cold.5
11 libdispatch.dylib 0x10ea8 _dispatch_main_queue_drain
12 libdispatch.dylib 0x10de4 _dispatch_main_queue_callback_4CF
13 CoreFoundation 0x6b520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14 CoreFoundation 0x1dd14 __CFRunLoopRun
15 CoreFoundation 0x1cc44 _CFRunLoopRunSpecificWithOptions
16 GraphicsServices 0x1498 GSEventRunModal
17 UIKitCore 0xaa6d8 -[UIApplication _run]
18 UIKitCore 0x4ec24 UIApplicationMain
Thank you!
Does anyone know how to add a button to the right side of the bottom tab view for Liquid Glass?
[Also submitted as FB20262774. Posting here in hopes of saving someone else from burning half a day chasing this down.]
Dynamic scaling of an Image() in a Button(), incorrectly decreases when transitioning from *** Large to AX 1 accessibility text sizes, instead of continuing to grow as expected. This occurs both on device and in the simulator, in iOS 18.6 and iOS 26.
Repro Steps
Create a project with sample code below
Show the preview if not showing
In Xcode Preview, click Canvas Device Settings and change Dynamic Type from *** Large to AX 1
Sample Code
struct ContentView: View {
var body: some View {
VStack(spacing: 30) {
Text("Button Image Scaling Issue")
.font(.system(size: 24, weight: .semibold))
Text("Switch dynamic type from ***** Large** to **AX 1**. The **Button** icon shrinks while the **No Button** icon grows.")
.font(.system(size: 14, weight: .regular))
TestView(title: "No Button", isButton: false)
TestView(title: "Button", isButton: true)
}
.padding()
}
}
struct TestView: View {
let title: String
let isButton: Bool
var body: some View {
VStack {
Text(title)
.font(.system(size: 16))
.foregroundColor(.secondary)
if isButton {
Button {} label: {
Image(systemName: "divide")
.font(.system(.largeTitle))
}
.buttonStyle(.bordered)
.frame(height: 50)
} else {
Image(systemName: "divide")
.font(.system(.largeTitle))
.foregroundColor(.blue)
.frame(height: 50)
.background(Color.gray.opacity(0.2))
}
}
}
}
Expected Result
Both the button and non-button images should continue to scale up proportionally when moving to larger accessibility text sizes.
Actual Result
When going from *** Large to AX 1…
Non-button image gets larger ✅
Button image gets smaller ❌
Screen Recording
System Info
Xcode Version 26.0 (17A321)
iOS 26.0 and 18.6
I'm currently I'm working on an iOS app + custom keyboard extension, and I’m hoping to get some insight into how to best architect a workflow where the keyboard acts as a remote trigger for dictation, but the main app handles the actual microphone recording and transcription.
I know that third-party keyboards are sandboxed and can’t access the microphone directly, so the pattern I’m following is similar to what Wispr Flow appears to be doing:
What I'm Trying to Build
The user taps a mic button in the custom keyboard (installed system-wide).
This triggers the main app to open, start a recording session, and send the audio to my transcription endpoint (not using Speech.framework).
Once the transcription result is ready, it's stored in an App Group shared container.
The keyboard extension polls for or receives the transcribed text and inserts it into the current input field via textDocumentProxy.insertText(...).
Key Questions
Triggering App Dictation from Keyboard
Is there a clean system-native way to transition from the keyboard to the main app and back?
Are there best practices around?:
Preventing jarring transitions (keyboard disappearing)?
Letting the app record in the background once triggered (see below)?
Keeping the App Alive During Audio Recording
Once the main app is opened to handle the dictation:
I want it to record audio continuously (sometimes for up to a minute or 2 ), send it to an external transcription API, and return the result.
However, from what I have read, iOS aggressively suspends or kills apps that are not in the foreground or haven’t requested the correct background modes - especially if there are background tasks running for longer than 30 seconds.
Even with audio enabled in Background Modes and a live AVAudioEngine session, I find that the app is sometimes paused or killed after a few seconds; especially when the user switches back to the app where they want to type.
But apps like Wispr Flow seem to manage this well. Their flow allows the user to record voice and insert it seamlessly without the app being terminated mid-recording.
So:
✅ How do I prevent my app from being killed/suspended while it's recording, especially when the user switches back to the original app?
Do I need:
A background AVAudioSession hack?
Audio playback tricks (e.g. silent audio)?
A workaround using CallKit (some apps seem to use it for persistent audio sessions)?
Something else Apple allows but doesn’t document clearly (or I am just a bad sercher)?
Returning Text to the Keyboard Extension
I’m using UserDefaults(suiteName:) in the App Group to pass the transcription result. Is that still the recommended approach?
Would it be better to use a shared file (for larger data or richer metadata)?
Are there any timing issues I should be aware of, e.g. like race conditions, stale reads, etc.?
We have a commercial video application in App Store, using a timer to refresh incoming video (NDI) 25-60 times a second. The signal comes from PTZ cameras, so besides Joystick, Gamecontroller and Stream Deck interfaces the app supports the mouse to control pan and zoom of the camera. We are using a NSPanGestureRecognizer for such a control. Worked fine for years - until macOS 26. In Tahoe the NSPanGestureRecognizer blocks the main thread, the timer function does not get called, so the user can still move the camera, but gets no video updates while dragging the control.
I think this is heavy bug in macOS 26, but I also see no way for a workaround.
So I was quite disappointed, that Apple today released Tahoe, being aware that this bug exists (Feedback Assistent: Similar recent reports: 10, Solution: open).
Any idea what to do besides warning the user not to install Tahoe when using the mouse?
Topic:
UI Frameworks
SubTopic:
AppKit
Using the new iOS 26 SwiftUI WebView, is it possible to print (to a physical printer) like we can with WKWebView with UIPrintInteractionController? The documentation for WebView and WebPage seems to skip over printing entirely. If not, and it uses WKWebView under the hood, is there a way to access to it so we could use UIPrintInteractionController? Thanks!!
Topic:
UI Frameworks
SubTopic:
SwiftUI
create a sample XCode project using Objective-C and stroybook (xib) using latest XCode beta
open MainMenu.xib, and select Main Menu → File → Print...
remove the image like below
4. build it
5. run it on macOS 26 beta 7
6. The menu item "print.." still have "Image"
Is there any way to remove image for one menu item.
I have also tried NSMenuItem.image = nil, but still not work.
The issue I met on my own app is that I cannot remove icons for "Zoom In", "Zoom Out" and many other menu items, which makes the menu items not aligned properly.
We’ve encountered an issue while developing with SwiftUI: when using the inspector on iPadOS, if the inspector is placed inside a NavigationStack, and both the view attached to the inspector and the content inside the inspector itself are scrollable, scrolling them to the top may cause abnormal jitter.
We suspect this issue might be related to NavigationTitle. However, if we place the inspector outside the NavigationStack, tapping any NavigationLink while the inspector is expanded will cause problems with the View.matchedTransitionSource(id:in:) animation.
A reproducible project can be found here:
https://github.com/ThreeManager785/Inspetor-Issue
We’ve tried many approaches but haven’t been able to resolve it. Is there any way to fix this issue?
Hi, I wanted to know what is the best way to detect whether a part of string has an unavailable character, '□' (tofu box or last resort character). So far it seems to be that we will have to parse all the strings and individually check for each character and whether or not it is a part of the Unicode Scalar. And since we are a business application that deals with a lot of data as strings, this will be rather performance heavy. So wanted to know if there were any other better or more efficient ways to go about this?
Hello,
I'm experiencing a navigation bar positioning issue with my UIKit iPad app on iPadOS 26 (23A340) using Xcode 26 (17A321).
The navigation bar positions under the status bar initially, and after orientation changes to landscape, it positions incorrectly below its expected location. This occurs on both real device (iPad mini A17 Pro) and simulator. My app uses UIKit + Storyboard with a Root Navigation Controller.
A stack overflow post has reproduce the bug event if it's not in the same configuration: https://stackoverflow.com/questions/79752945/xcode-26-beta-6-ipados-26-statusbar-overlaps-with-navigationbar-after-presen
I have checked all safe areas and tried changing some constraints, but nothing works.
Have you encountered this bug before, or do you need additional information to investigate this issue?
Code that disables a tab bar item via UITabBarItem.isEnabled = false used to both grey out the item and block taps on iOS 18. On iOS 26, the item often remains tappable and selectable, even though isEnabled is set to false. This looks like a behavior change or regression.
func disableTabbarItems(tabbar: UITabBarController, isEnable: Bool, index: Int) {
if let tabItems = tabbar.tabBar.items, index < tabItems.count {
let tabItem = tabItems[index]
tabItem.isEnabled = isEnable
}
}
iOS 18
iOS 26
Code that disables a tab bar item via UITabBarItem.isEnabled = false used to both grey out the item and block taps on iOS 18. On iOS 26, the item often remains tappable and selectable, even though isEnabled is set to false. This looks like a behavior change or regression.
func disableTabbarItems(tabbar: UITabBarController, isEnable: Bool, index: Int) {
if let tabItems = tabbar.tabBar.items {
let tabItem = tabItems[index] tabItem.isEnabled = isEnable
}

}

Hi all,
In my AppKit app, I sometimes simulate events programmatically, for example:
func simulateKeyPress(characters: String, keyCode: UInt16) {
guard let keyDown = NSEvent.keyEvent(
with: .keyDown,
location: .zero,
modifierFlags: [],
timestamp: 0,
windowNumber: NSApp.mainWindow?.windowNumber ?? 0,
context: nil,
characters: characters,
charactersIgnoringModifiers: characters,
isARepeat: false,
keyCode: keyCode
) else { return }
NSApp.postEvent(keyDown, atStart: false)
}
At the same time, I install a local event monitor:
NSEvent.addLocalMonitorForEvents(matching: .any) { event in
// Ideally, detect whether this event came from a real user
// (mouse, keyboard, trackpad, etc.)
// or was programmatically generated via NSEvent + postEvent.
return event
}
The problem:
Events I generate with NSEvent.* factory methods and post using NSApp.postEvent look the same as real system events when received in the monitor.
My question:
Is there a supported way to tell whether an incoming NSEvent is system/user-generated vs programmatically posted?
Hi all,
I’m subclassing UITextView and overriding insertText(_:) to intercept and log input:
class TWTextView: UITextView {
override func insertText(_ text: String) {
print("insertText() : \(text)")
super.insertText(text)
}
}
This works fine, but I’ve noticed that insertText(_:) is invoked both when:
The user types something in the text view (via hardware/software keyboard).
I programmatically call myTextView.insertText("Hello") from my own code.
I’d like to be able to distinguish between these two cases — i.e., know whether the call was triggered by the user or by my own programmatic insert.
Is there any recommended way or system-provided signal to differentiate this?
Thanks in advance!
Hi everyone,
I’ve run into a strange localization issue with macOS document-based apps in SwiftUI/AppKit. I created a standard document-based macOS app in Xcode (SwiftUI template) and added a French localization to the project.
All system-generated menu bar commands (File → New, Close, Print, etc.) are correctly translated into French… except for “Save”, which remains in English.
To rule out problems in my own code, I created a fresh, unmodified document-based app project in Xcode, and immediately added French localization without touching any code. Same result: all commands are translated except “Save”.
This suggests the issue isn’t specific to my app code, but either the project template, or possibly macOS itself.
My environment
• Xcode version: 16.4
• macOS version: 15.6.1 Sequoia]
• Swift: Swift 6
Questions
1. Has anyone else seen this issue with the “Save” command not being localized?
2. Is this expected behavior (maybe “Save” is handled differently from other menu items)?
3. If it’s a bug in the template or OS, is there a known workaround?
Thanks for any insights
P.S. Please note that I'm a total beginner
I tried the new WebView api in swiftui and tried to pass webPage for this view to be able to control the navigation of the user by giving him the option to go back or forward using nav buttons but the view doesn't get's updated when the webPage.backForwardList.backList so the buttons remains disabled.
code snippet:
@available(iOS 26, *)
struct LinkWebViewFor26: View {
let url: URL
@State var webPage = WebPage()
@Environment(\.dismiss) private var dismiss
var body: some View {
WebView(webPage)
.webViewBackForwardNavigationGestures(.disabled)
.task { webPage.load(url) }
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {
dismiss()
} label: {
Image(systemName: "checkmark")
}
.buttonStyle(.glassProminent)
}
ToolbarItemGroup(placement: .topBarLeading) {
BackForwardMenu(
list: webPage.backForwardList.backList,
label: .init(text: "Backward", systemImage: "chevron.backward")
) { item in
webPage.load(item)
}
BackForwardMenu(
list: webPage.backForwardList.forwardList.reversed(),
label: .init(text: "Forward", systemImage: "chevron.forward")
) { item in
webPage.load(item)
}
}
}
.onChange(of: webPage.backForwardList) { _, _ in
print(webPage.backForwardList.backList)
}
}
}
I have a simple task, to measure the height of the overlapping area occupied by the keyboard in the current view. In the attached images, I use it to position a UITextView (red) above the keyboard, as a test.
The keyboard displays an inputAccessoryView (yellow) when editing a text view, but it’s also summoned by a UIFindInteraction, which shows a search bar above the keyboard. When measuring the keyboard, I need to account for either the accessory view or the search bar, basically, the total keyboard height including any extra views above it.
I use the usual algorithm: the keyboard frame from UIResponder.keyboardWillShowNotification (documented as being in screen coordinates) is converted to my view’s coordinates and intersected with the view’s bounds to get the overlapping height.
The first issue: in windowed mode, the keyboard frame reports a negative origin.x (e.g. -247), even though in screen coordinates it should start at 0. I display the raw frame in the navbar, as shown in the first screenshot.
I then suspected the frame might be in window coordinates on iOS 26, but repositioning the window a few times, and switching between find interaction keyboard and text editing keyboard, sometimes yields a positive origin.x instead, as if the keyboard starts from the middle of the screen!? (see the second screenshot).
And in some cases, the raw keyboard height is even 0, despite the keyboard clearly being visible and taking space (third screenshot).
Interestingly, the reported frame for the search keyboard is always consistent and in screen coordinates, but the default keyboard frame just doesn’t make sense.
I have a TabView and in one of the tabs I have a horizontal ScrollView that uses .scrollTargetBehavior(.paging) in each of those pages I have a List, but the bottom of the list around the Tab bar doesnt get blurred, if I remove the horizontal scrollview and just have a list it blurs fine. So I want to know how I can manually add the blur when using the horizontal scrollview
I currently have a SwiftUI TabView that has 5 Tab's. The first tab has a UIScrollView in a UIViewRepresentible with scrollView.scrollsToTop = false and that works fine for when the user hits the navigation bar, however if the user taps the first tab when it is already selected my UIScrollView scrolls to top.
My UIScrollView is essentially 5 views, a center view, top, bottom, right, and left view. All views except for the center are offscreen but available for the user to scroll horizontal or vertical (and the respective views get updated based on the new center view).
The issue I have is that clicking the first tab when its already selected, sets the content offset (for the y axis) to 0, which messes me up 2x, first it scrolls up but since its not really scrolling the right, left, and upper views dont exist, which makes the user think it can't be scrolled or it's broken.
For now I subclassed UIScrollView like this
class NoScrollToTopScrollView: UIScrollView {
override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) {
if contentOffset.y == .zero {
// Ignore SwiftUI’s re-tap scroll-to-top
return
}
super.setContentOffset(contentOffset, animated: animated)
}
}
which seems to work, but I'm just wondering if there is a better way to do this, or maybe a way to disable SwiftUI Tab from doing its default action which can help with a SwiftUI ScrollView as well?