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.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Created

.glasseffect with multiple date pickers
Hello, I'm having a problem with the .glasseffect modifier in a view of a SwiftUI application. I have a list that starts with a static element, followed by several dynamic entries, and then another static element. I've applied the .glasseffect modifier to all the elements, and it works fine except for the first static element. I think I've figured out what's causing it. This element contains two date pickers, and if I comment one out, it works. As soon as both are present, I get a BAD_ACCESS_ERROR. Oddly enough, this only happens on the tablet. Everything runs normally in the simulator. If I remove the .glassmodifier and use a normal background, it still works. Is this a bug, or is it against Liquid Glass to have two date pickers in a stack and then use the .glasseffect modifier?
1
0
102
3w
How to Constrain a TableView Cell Similarly to Apple's Settings App
Hello! I'm creating a settings page for my app and I want it to look as native as possible. I want to know if it's possible to add constraints that make the second label go to the bottom when the text size gets really large (see Picture1) instead of having to force it to be on the right (see Picture 2). I've left my constraint code for this cell down below, too. I'm still learning constraints and best practices, so if there's any feedback, I'd love to hear it. Thank you! Picture 1 Picture 2 - (void) setConstraints { [NSLayoutConstraint activateConstraints:@[ // Cell Title Label [self.themeColorLabel.leadingAnchor constraintEqualToAnchor:self.contentView.layoutMarginsGuide.leadingAnchor], [self.themeColorLabel.trailingAnchor constraintEqualToAnchor:self.contentView.layoutMarginsGuide.trailingAnchor], [self.themeColorLabel.topAnchor constraintEqualToAnchor: self.contentView.layoutMarginsGuide.topAnchor], [self.themeColorLabel.bottomAnchor constraintEqualToAnchor: self.contentView.layoutMarginsGuide.bottomAnchor], // Selected Theme Color Label [self.selectedColorLabel.trailingAnchor constraintEqualToAnchor: self.contentView.layoutMarginsGuide.trailingAnchor], [self.selectedColorLabel.topAnchor constraintEqualToAnchor: self.contentView.layoutMarginsGuide.topAnchor], [self.selectedColorLabel.bottomAnchor constraintEqualToAnchor: self.contentView.layoutMarginsGuide.bottomAnchor], ]]; }
3
0
126
3w
AlarmKit only triggers a short vibration when the screen is on — bug or expected behavior?
I'm building an alarm app using the new AlarmKit introduced in iOS 26. The alarm works correctly when the device is locked, but when the screen is already on and unlocked, it only gives a single short vibration. I tested another app that also uses AlarmKit just to confirm, and it behaves the same way—only one short vibration if the display is awake, and the developer added a push notification as a workaround. The default iOS Clock app works properly in both situations (though when the screen is on, it uses the Dynamic Island interface). So I'm wondering: is this behavior a bug in AlarmKit, or is it intentional?
Topic: UI Frameworks SubTopic: General
0
0
36
3w
How to place scrollable header content above a Table in SwiftUI?
Hi everyone, I’m trying to reproduce the layout Apple Music uses for playlists, where there is header content above the table (artwork, title, buttons), and when you scroll, everything scrolls together—the header and table rows move as a single scrollable region. Here’s an example of what I’m trying to achieve: I’m using SwiftUI’s Table view and I haven’t found a clean way to place custom content above the table while keeping everything inside the same scroll view. Is there currently a recommended way to achieve Apple Music–style scrollable header + table content using SwiftUI? Thanks!
1
0
145
3w
Severe Delay When Tapping TextField/Searchable on iOS 18 (Real Device) — XPC “Reporter Disconnected” Loop Until Keyboard Appears
I’m running Xcode 26.1.1 (17B100) with deployment target iOS 18.0+, and I’m seeing a consistent and reproducible issue on real devices (iPhone 13 Pro, iPhone 15 Pro): Problem The first time the user taps into a TextField or a SwiftUI .searchable field after app launch, the app freezes for 30–45 seconds before the keyboard appears. During the freeze, the device console floods with: XPC connection interrupted Reporter disconnected. { function=sendMessage, reporterID=XXXXXXXXXXXX } -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard customInfoType = UIEmojiSearchOperations After the keyboard finally appears once, the issue never happens again until the app is force-quit. This occurs on device Reproduction Steps Minimal reproducible setup: Create a new SwiftUI app. Add a single TextField or .searchable modifier. Install Firebase (Firestore or Analytics is enough). Build and run on device. Tap the text field immediately after the home screen appears. Result: App freezes for 30–45 seconds before keyboard appears, with continuous XPC/RTIInputSystem errors in the logs. If Firebase is removed, the issue occurs less often, but still happens occasionally. Even If Firebase initialization is delayed by ~0.5 seconds, the issue is still there. Question Is this a known issue with iOS 18 / RTIInputSystem / Xcode 26.1.1, and is there a recommended workaround? Delaying Firebase initialization avoids the freeze, but this isn’t ideal for production apps with startup authentication requirements. Any guidance or confirmation would be appreciated.
Topic: UI Frameworks SubTopic: SwiftUI
1
0
91
3w
Problem with buildMenuWithBuilder and scenes
Bonjour, I have an (old) app. written in Objective-C which works fine under iPadOS 26 with custom menus and contextual menus but without scenedelegate. To be able to have multi-windows, I added scenedelegate but "buildMenuWithBuilder" is no more called. I asked AI Claude and tried many solutions but none worked. Has anyone else had and solved this problem? Thanks.
Topic: UI Frameworks SubTopic: General
0
0
124
3w
Switching to custom keyboard size glitches
I've created a custom keyboard and implemented the: class KeyboardViewController: UIInputViewController The imlementation looks like this: override func viewDidLoad() { super.viewDidLoad() var stack = UIStackView() stack.axis = .vertical stack.spacing = 8 stack.translatesAutoresizingMaskIntoConstraints = false stack.distribution = .fill stack.heightAnchor.constraint(equalToConstant: 200).isActive = true .... view.addSubview(stack) NSLayoutConstraint.activate([ stack.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20), stack.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20), stack.topAnchor.constraint(equalTo: view.topAnchor, constant: 10), stack.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -10) ]) The problem is that the keyboard seems to start showing in the size (I've printed the parent frame): Optional(<UIView: 0x101008480; frame = (0 0; 390 844); autoresize = W+H; layer = <CALayer: 0x600000207b80>>) and than resizes to my given height. But it's not fast enough so that I can see some glitches whenever I switch from another keyboard to my custom keyboard. Is there a way to prevent this resizing or start the keyboard in a given size? This is just not the best user experience.
Topic: UI Frameworks SubTopic: UIKit
0
0
136
3w
NSTextField behaviour out of control....
In a modal dialog, when tabbing to next NSTextField, or programmatically selecting a NSTextField, the NSTextfField that is loosing focus (aka resigning FirstResponder) appears empty in Tahoe 26 ( aka not displaying its content) . The same thing works oK in all systems before Tahoe. Found no workaround this issue which looks to be a Tahoe problem. i have a small app that demonstrate the issue.. but cannot be posted here due to zip format not accepted... i appreciate any help or apple engineer attention to that issue also posted with Evaluation Assistant under #FB21102969 ThX
0
0
73
3w
How to implement NFC Reader in SwiftUI?
Hi, does anyone know how to enable creating or configuring Near NFC Reader in SwiftUI? I've already added the capability, the permissions in info.plist, the entitlement, and the SwiftUI code, but without success. Here's the example code: class PaymentT2PViewModel: NSObject, ObservableObject { @Published var paymentT2PUIState: PaymentT2PUIState // MARK: - NFC Properties @Published var nfcMessage: String = .empty @Published var isNFCReading: Bool = false private var nfcSession: NFCTagReaderSession? init(paymentT2PUIState: PaymentT2PUIState) { self.paymentT2PUIState = paymentT2PUIState super.init() ) } func startNFCReading() { print("INICIO: startNFCReading llamado") guard NFCTagReaderSession.readingAvailable else { print("ERROR: NFC NO disponible en este dispositivo") Task { @MainActor in self.nfcMessage = "NFC no disponible en este dispositivo" } return } print("NFC disponible, creando sesión...") nfcSession = NFCTagReaderSession( pollingOption: [.iso14443, .iso15693, .iso18092], delegate: self, queue: nil ) print("Sesión creada, configurando mensaje...") nfcSession?.alertMessage = "Acerca la tarjeta al iPhone" nfcSession?.begin() print("Sesión NFC INICIADA - debería aparecer popup") Task { @MainActor in self.isNFCReading = true } } func stopNFCReading() { nfcSession?.invalidate() Task { @MainActor in self.isNFCReading = false } } extension PaymentT2PViewModel: NFCTagReaderSessionDelegate { func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error) { print("SESIÓN INVALIDADA") print("Error: (error.localizedDescription)") if let readerError = error as? NFCReaderError { print("Código de error: \(readerError.code.rawValue)") print("¿Es cancelación del usuario?: \(readerError.code == .readerSessionInvalidationErrorUserCanceled)") } Task { @MainActor in if let readerError = error as? NFCReaderError { if readerError.code != .readerSessionInvalidationErrorUserCanceled { self.nfcMessage = "Error: \(readerError.localizedDescription)" } } self.isNFCReading = false } } func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) { print("NFC Session activa") } func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { guard let firstTag = tags.first else { return } session.connect(to: firstTag) { [weak self] error in if let error = error { session.invalidate(errorMessage: "Error al conectar: \(error.localizedDescription)") return } Task { @MainActor [weak self] in await self?.handleTag(firstTag, session: session) } } } private func handleTag(_ tag: NFCTag, session: NFCTagReaderSession) async { switch tag { case .iso7816(let tag): await handleISO7816Tag(tag, session: session) case .miFare(let tag): await handleMiFareTag(tag, session: session) case .iso15693(let tag): await handleISO15693Tag(tag, session: session) case .feliCa(let tag): await handleFeliCaTag(tag, session: session) @unknown default: session.invalidate(errorMessage: "Tipo de tag no soportado") } } private func handleISO7816Tag(_ tag: NFCISO7816Tag, session: NFCTagReaderSession) async { let uid = tag.identifier.map { String(format: "%02X", $0) }.joined() nfcMessage = """ ISO7816 Tag detectado UID: \(uid) Historical Bytes: \(tag.historicalBytes?.map { String(format: "%02X", $0) }.joined() ?? "N/A") """ session.alertMessage = "Tag leído exitosamente" session.invalidate() } private func handleMiFareTag(_ tag: NFCMiFareTag, session: NFCTagReaderSession) async { let uid = tag.identifier.map { String(format: "%02X", $0) }.joined() nfcMessage = """ MiFare Tag detectado UID: \(uid) Tipo: \(tag.mifareFamily.description) """ session.alertMessage = "Tag leído exitosamente" session.invalidate() } private func handleISO15693Tag(_ tag: NFCISO15693Tag, session: NFCTagReaderSession) async { let uid = tag.identifier.map { String(format: "%02X", $0) }.joined() nfcMessage = """ ISO15693 Tag detectado UID: \(uid) IC Manufacturer: \(tag.icManufacturerCode) """ session.alertMessage = "Tag leído exitosamente" session.invalidate() } private func handleFeliCaTag(_ tag: NFCFeliCaTag, session: NFCTagReaderSession) async { let idm = tag.currentIDm.map { String(format: "%02X", $0) }.joined() let pmm = tag.currentSystemCode.map { String(format: "%02X", $0) }.joined() nfcMessage = """ FeliCa Tag detectado IDm: \(idm) System Code: \(pmm) """ session.alertMessage = "Tag leído exitosamente" session.invalidate() } } // MARK: - Helper Extension extension NFCMiFareFamily { var description: String { switch self { case .unknown: return "Desconocido" case .ultralight: return "Ultralight" case .plus: return "Plus" case .desfire: return "DESFire" @unknown default: return "Otro" } } } struct PaymentT2PView: View { @ObservedObject var paymentT2PViewModel: PaymentT2PViewModel var body: some View { ZStack { if paymentT2PViewModel.paymentT2PUIState.showingResult { print("Navigate") } else { print("False") } } .onAppear { paymentT2PViewModel.startNFCReading() } .onDisappear { paymentT2PViewModel.stopNFCReading() } }} However, I'm getting code error messages, and I'm testing this on an iPhone 11. What am I doing wrong?
0
0
238
3w
Unwanted animations appear on UIButton (iOS 26)
After the iOS 26 update, unwanted animations appear on UIButton. I'm using the attributedTitle property of UIButton.Configuration to change the button's text, and an animation appears after iOS 26. (It's unclear whether it's after iOS 26.0 or iOS 26.1, but it likely started with 26.1.) The peculiar thing is that the animation only starts appearing on buttons that have been pressed once. I tried using UIView.performWithoutAnimation and CATransaction's begin(), setDisableActions(true), commit(), but it didn't work. How should I solve this? Below is the code for changing the button's text. func updateTitle() { let keys = type.keys if keys.count == 1 { guard let key = keys.first else { return } if key.count == 1 { if Character(key).isLowercase { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 24, weight: .regular), .foregroundColor: UIColor.label])) } else if Character(key).isUppercase { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 22, weight: .regular), .foregroundColor: UIColor.label])) } else { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 22, weight: .regular), .foregroundColor: UIColor.label])) } } else { self.configuration?.attributedTitle = AttributedString(key, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 18, weight: .regular), .foregroundColor: UIColor.label])) } } else { let joined = keys.joined(separator: "") self.configuration?.attributedTitle = AttributedString(joined, attributes: AttributeContainer([.font: UIFont.systemFont(ofSize: 22, weight: .regular), .foregroundColor: UIColor.label])) } }
1
0
166
3w
Erratic numberPad keyboard behaviour on iPadOS26
Number keys on iPadOS 26 register incorrect/random characters, making numeric input unreliable across all applications. Affected Versions iPadOS 26.0 through 26.1 (build 23B85) Platform-specific: Only iPadOS (iPhone doesn't present the full on-screen keyboard) Reproduction Steps Open any app with a numeric text field (For example, Apple's Contacts) Tap numeric text field - a small number-only pad appears Dismiss this small numpad (tap outside or hit return) Tap the field again - full keyboard with numbers appears Type numbers on this full keyboard Result: Numbers register as random/incorrect characters Scope Affects numeric keyboard types (.numberPad, .decimalPad ) Reproducible in Apple's native apps (Contacts or any apps that has numeric TextField) Impact Critical: Users cannot reliably enter phone numbers, passwords, financial data, or any numeric input. Other findings Keyboard starts to register correct keys when switch from the full on-screen keyboard to alphabetic page, and then back to the page with numeric keys
1
1
164
3w
Tahoe/NSTextField ignores some properties
On Tahoe NSTextField (and NSTextFieldCell) appears to ignore backgroundColor, drawsBackground, isBezeled, bezelStyle and isBordered properties. Those worked on prior macOS, but not Tahoe. Is there a way to make those properties effective while targeting Tahoe? Note: a slight erratum: backgroundColor has an effect while the text field has first responder status, but the background area is an inset rectangle and I suspect that is a remnant feature and not by design.
Topic: UI Frameworks SubTopic: AppKit
1
0
80
3w
UIKit flip animation bugged in 26.1
Hello. I have an 12 year old app that still has some objective-c code in it. I have a place where i have a flip animation between 2 view controllers that looks like this: [UIView transitionFromView:origView toView:newViewController.view duration:0.5 options:UIViewAnimationOptionTransitionFlipFromRight completion:nil]; It has looked like this since 2012 at least. In our production release, it works prior to 26.1, but in 26.1 and 26.2, the flip is off-center and looks weird. it's like both edges flip the same way. It's a little bit hard to explain. If seen at least 2 other app store apps that i have installed behave this way too, from 26.1 and onwards. Anyone else seen this? Is there anything that can be done about it? Thankful for thoughts.
14
3
578
3w
UIKit Crash During Navigation Transition After Changing UIView.appearance().semanticContentAttribute (Arabic RTL) — iOS 17.2.1
Device: iPhone 11 iOS Version: 17.2.1 Frameworks: UIKit, Auto Layout App Behavior: App supports Arabic (RTL). User can switch language in-app. When language is switched, the app sets UIView.appearance().semanticContentAttribute and fully rebuilds the window’s rootViewController. Problem Summary I update the global semantic direction only when the user explicitly switches language inside the app — e.g.: // Only run when user switches language inside the app UIView.appearance().semanticContentAttribute = .forceRightToLeft // or .forceLeftToRight // then rebuild the window's rootViewController I do not change UIView.appearance().semanticContentAttribute during navigation transitions. Despite that, after switching the language (and rebuilding the root), the app sometimes crashes during a subsequent UINavigationController push/pop animation. The crash appears to be caused by UIKit’s Auto Layout engine removing or updating directional constraints while a navigation transition is running. Crash Log (most relevant portion) Crashed: com.apple.main-thread 0 CoreAutoLayout 0x1372c -[NSISEngine positiveErrorVarForBrokenConstraintWithMarker:errorVar:] + 212 1 CoreAutoLayout 0x121d4 -[NSISEngine removeConstraintWithMarker:] + 1028 2 CoreAutoLayout 0x11d78 -[NSLayoutConstraint _removeFromEngine:] + 148 3 UIKitCore 0x124ba9c __58-[UIView _updateDirectionalConstraintsIfNeededWasFlipped:]_block_invoke_2 + 56 4 UIKitCore 0x484d4 ___UIViewEnumerateLayoutConstraintsAndAdjustForSelectedLayoutVariables_block_invoke + 296 5 UIKitCore 0x4801c -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 112 6 UIKitCore 0x60830 -[UIView _updateDirectionalConstraintsIfNeededWasFlipped:] + 356 7 UIKitCore 0x60494 -[UIView setSemanticContentAttribute:] + 148 8 CoreFoundation 0x31794 __invoking___ + 148 9 CoreFoundation 0xe6360 -[NSInvocation invokeUsingIMP:] + 332 10 UIKitCore 0x1d93ec __workaround10030904InvokeWithTarget_block_invoke + 68 11 UIKitCore 0x250ec +[UIView _performSystemAppearanceModifications:] + 72 12 UIKitCore 0x3f008 applyInvocationsToTarget + 1004 13 UIKitCore 0x3dcd4 +[_UIAppearance _applyInvocationsTo:window:matchingSelector:onlySystemInvocations:] + 1180 14 UIKitCore 0x3d744 __88-[UIView(Internal) _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:]_block_invoke + 68 15 UIKitCore 0x3d6c4 -[UIView _performUpdatesForPossibleChangesOfIdiom:orScreen:traverseHierarchy:] + 216 16 UIKitCore 0x3d5a0 -[UIView _didChangeFromIdiomOnScreen:traverseHierarchy:] + 112 17 UIKitCore 0x11644 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1220 18 UIKitCore 0x1142c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684 19 UIKitCore 0x1142c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684 20 UIKitCore 0x1142c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684 21 UIKitCore 0x10eb4 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 124 22 CoreAutoLayout 0xa514 -[NSISEngine withBehaviors:performModifications:] + 84 23 UIKitCore 0x10ddc -[UIView _postMovedFromSuperview:] + 504 24 UIKitCore 0xfa24 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2200 25 UIKitCore 0x7a63b8 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke_2 + 1252 26 UIKitCore 0x41a70 +[UIView(Animation) performWithoutAnimation:] + 76 27 UIKitCore 0x7a5e84 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 240 28 UIKitCore 0x12749c +[UIView _performBlockDelayingTriggeringResponderEvents:forScene:] + 176 29 UIKitCore 0x7a5990 -[_UINavigationParallaxTransition animateTransition:] + 952 30 UIKitCore 0x291098 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_3 + 52 31 UIKitCore 0x29100c +[UIKeyboardSceneDelegate _pinInputViewsForKeyboardSceneDelegate:onBehalfOfResponder:duringBlock:] + 96 32 UIKitCore 0x290f70 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2 + 196 33 UIKitCore 0x1d8c8c +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:] + 180 34 UIKitCore 0x1d851c _UIViewControllerTransitioningRunCustomTransition + 484 35 UIKitCore 0x6f5a84 -[UINavigationController _startCustomTransition:] + 3292 36 UIKitCore 0x1182a8 -[UINavigationController _startDeferredTransitionIfNeeded:] + 496 37 UIKitCore 0x1179a0 -[UINavigationController __viewWillLayoutSubviews] + 96 38 UIKitCore 0x117904 -[UILayoutContainerView layoutSubviews] + 172 39 UIKitCore 0x3297c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1528 40 QuartzCore 0x66aa8 CA::Layer::layout_if_needed(CA::Transaction*) + 500 41 QuartzCore 0x66630 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144 42 QuartzCore 0x6cb60 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464 43 QuartzCore 0x65e3c CA::Transaction::commit() + 648 44 QuartzCore 0x65ae4 CA::Transaction::flush_as_runloop_observer(bool) + 88 45 CoreFoundation 0x3583c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 46 CoreFoundation 0x34244 __CFRunLoopDoObservers + 548 47 CoreFoundation 0x33960 __CFRunLoopRun + 1028 48 CoreFoundation 0x33478 CFRunLoopRunSpecific + 608 49 GraphicsServices 0x34f8 GSEventRunModal + 164 50 UIKitCore 0x22c62c -[UIApplication _run] + 888 51 UIKitCore 0x22bc68 UIApplicationMain + 340 52 MyApp 0x46a040 main + 44 (AppDelegate.swift:44) 53 ??? 0x1c8d52dcc (缺少) Questions / Requests Recommended patterns for in-app language switching (LTR ⇄ RTL) to avoid direction/constraint races during animations? For example: Should semantic direction be applied to the window/root view controller only? Should we avoid rebuilding root during an active transition? Any suggested synchronization (e.g., wait for transitions to finish) or APIs to call after rebuilding?
0
0
45
3w
crash when call keyboardAppearance of UITextDocumentProxy
In third-party keyboard app, the app is crashed when call [[UIInputViewController textDocumentProxy] keyboardAppearance]. Environment) iOS 26 crash dump call stack Thread 0 Crashed: 0 libobjc.A.dylib 0x0000000198433008 objc_msgSend + 8 1 UIKitCore 0x00000001a1cea570 -[_UITextDocumentInterface _controllerState] + 68 2 UIKitCore 0x00000001a1ceaef0 -[_UITextDocumentInterface documentIdentifier] + 20 3 ThirtPartyKeyboardApp 0x0000000104aad190 -[NKBKeyboardViewController _updateThemeCenterAppearanceModeIfNeeds] + 56 (NKBKeyboardViewController.m:164)
0
0
59
3w
UIToolbar + liquid glass = autolayout warnings?
I have an app where I create UIToolbars and add them to UIViews programatically. I've never used autolayout for anything, I've never assigned any constraints to anything, etc. This worked fine pre-iOS 26. Now I'm trying to build for iOS 26 (liquid glass) and my toolbars are spamming my debug pane with hundreds of lines of autolayout warnings. Here are some key phrases from the warnings: Unable to simultaneously satisfy constraints. Will attempt to recover by breaking constraint Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) Does anybody know what happened and how I can get it to stop? The way things are, I can't use the debug pane for anything because of this spam.
2
0
201
3w
.glassEffect is different when used within NavigationStack
Noticed when using .glassEffect within NavigationStack gives different result when interacting with view. When it is not in NavigationStack, when view pressed, glassEffect is within Capsule, clipped. But when used with NavigationStack, pressing view gives additional background effect in rectangle form. In image can see this effect, it is subtle but in other scenarios its much more visible. Is there a way how to use glassEffect without rectangle appearing in NavigationStack? Here is full code for this example. struct ExampleGlass: View { var body: some View { GlassObject() .padding() .background(.blue) } } struct ExampleGlassNavStack: View { var body: some View { NavigationStack { GlassObject() .padding() .background(.blue) } } } struct GlassObject: View { var body: some View { Capsule() .frame(height: 150) .glassEffect(.clear.interactive()) } } #Preview { ExampleGlass() ExampleGlassNavStack() }
0
0
56
3w
ScreenCaptureKit sample initially omits application with NSWindowSharingType NSWindowSharingNone
The ScreenCaptureKit sample application (https://developer.apple.com/documentation/screencapturekit/capturing-screen-content-in-macos) uses a filter initially set to capture content from the selected display, excluding only the sample application, and excepting no windows: private var contentFilter: SCContentFilter { var filter: SCContentFilter switch captureType { case .display: guard let display = selectedDisplay else { fatalError("No display selected.") } var excludedApps = [SCRunningApplication]() // If a user chooses to exclude the app from the stream, // exclude it by matching its bundle identifier. if isAppExcluded { excludedApps = availableApps.filter { app in Bundle.main.bundleIdentifier == app.bundleIdentifier } } // Create a content filter with excluded apps. filter = SCContentFilter(display: display, excludingApplications: excludedApps, exceptingWindows: []) ....... return filter However, if another application uses the legacy NSWindowSharingType NSWindowSharingNone attribute, that application is initially not included in the captured stream. Only by toggling either the "Capture Type" or "Exclude sample from stream" checkbox does the initially hidden application become visible. Additionally, if the "Stop Capture" button is used followed by "Start Capture", the application using the legacy NSWindowSharingType NSWindowSharingNone attribute is once again hidden from the stream, and is only made visible by toggling either the "Capture Type" or "Exclude sample from stream" checkbox. Does some additional filter element or other SCStream configuration need to be included to verify that all applications, regardless of NSWindowSharingType, are captured using ScreenCaptureKit without requiring manual user interaction/filter refreshing? It seems odd that QuickTime screen recording (using ScreenCaptureKit) immediately captures an application using the NSWindowSharingNone attribute while the ScreenCaptureKit sample application linked above does not. See images below showing the stream preview before and after toggling the "Capture Type" or "Exclude sample from stream" checkbox. Images were taken from a QuickTime screen recording during testing.
2
0
102
3w
Mac Catalyst Getting Unacceptable Window Resizing Performance on macOS Tahoe With Liquid Glass Design
When I run my Mac Catalyst app I'm getting unacceptable performance when resizing the window. Window resizing is very unresponsive/laggy. Configuration: The root view controller is a UISplitViewController (three pane split using UISplitViewControllerStyleTripleColumn). Sidebar is configured. It's using a UICollectionView sidebar style (so it looks like NSOutlineView in AppKit). On initial launch there is no selection and the second and third view controllers in the split have empty placeholder view controllers. At this point window resizing is fine. Now I make a selection in the sidebar. This populates the supplementary view controller with a view controller that uses a UITableView. Now resizing the window performance is awful. Basically this is unusable. When resizing the window a bunch what looks to be Core Animation related logs flood the console during window resize: cannot add handler to 3 from 1 - dropping Library: QuartzCore | Subsystem: com.apple.coreanimation Now if I go to my app's Info.plist and add: UIDesignRequiresCompatibility entry with a value of TRUE and follow the same steps described above window resizing works as expected and I do not experience performance issues. Also with UIDesignRequiresCompatibility there is no "cannot add handlers" error logs flooding the console on window resize.
1
0
61
3w
Getting crashes when using QLPreviewPanel on AddressBook items
My app (FindAnyFile) provides a Finder-like interface in which it also offers a QuickLook preview command, which invokes [[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil]; Now, if it shows .abcdp files, it often, but not always, crashes. This has been happening for many macOS versions, at least since 10.15, up to 26.1. Also, it does not seem to matter which SDK/Xcode I build with, as I used several and all versions lead to the crash. The issue rather appears to be inside the QLplugin for the AB file (ABCardCollectionView etc.). I am able to trace this crash in Xcode. There are a LOT of errors and warnings coming up, and eventually the qlplugin throws an ObjC exception which in turn brings down my entire app (and here I thought that the XPC system was designed to expressly avoid such crashes). Possibly significant errors are: CNAccountCollectionUpdateWatcher 0x6000025cf800: Update event received, but store registration failed. This event will be handled, but the behavior is undefined. Error using remote object proxy when fetchAnonymousXPCEndpoint: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.telephonyutilities.callservicesdaemon.callstatecontroller" UserInfo={NSDebugDescription=connection to service named com.apple.telephonyutilities.callservicesdaemon.callstatecontroller} connection to service named com.apple.coreduetd.people … CNPropertyNotFetchedException: A property was not requested when contact was fetched. I've attached the (mostly) complete console output from such a debug run. I have also an open bug report regarding this kind of crash (back then I was not able to reproduce it myself): FB15553847 Also, when I "Quick Look" the same file in Finder, I get a "Preview not permitted" for the same items that crash in my app. If I copy the same items to the Desktop, then Finder can QL them and my app doesn't crash when viewing the item on the Desktop. So, the crash only happens with the items inside ~/Library/Application Support/AddressBook/Sources/…/Metadata/. Now, here is the weirdest part: You might think: So, if the Finder shows "Preview not permitted", then my app trying to view those items is the result of that condition (even if that's not supposed to crash). However: I have a clean 26.1 install (in an Apple ARM VM) where Finder also says "Preview not permitted" for these items in the user's Library/AB/Metadata folder, but my app can QL those items without crashing! Also, I have one user who uses 26.1 and gets the crash with files in the same location. So, the "Preview not permitted" is probably not the cause of this crash, though it's suspicious that a user gets this at all - why can't a user QL the abcdp files in the Metadata folder but when copied to the Desktop, QL works? You'd think that Finder has the necessary entitlements to access the AB, or doesn't it? Of course, my app has permission enabled under Privacy & Security / Contacts (if it's disabled, then the app can't show anything but will also not crash). And it has the "Address Book" entitlement. Would be nice if this could be looked into and eventually be fixed. Alternatively, I'd welcome any suggestions on how to prevent my app from crashing if the qlplugin throws. But if you look at the stack trace you'll see that there's no method of my own app involved where I could insert an exception catcher. I added code to my previewItemURL delegate method to make sure the NSURL item is readable, and it is, even Of course, apart from the issue with .abcdp files, the QL operation in my app works flawlessly, i.e. I have never received any other crash reports relating to any other QL plugins. QuickLook for AddressBook crash messages
0
0
61
3w