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.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Create a font or font like set by choosing glyphs, transforming them, and putting the result into a structure?
My basic need is that I have unicode symbols which compose to a marked musical note. I'd like that note to be rotated upside down. Obviously, I could do this by sticking each into a View of some sort, and applying rotation effect. Indeed, I've done this for the part of my app where these notes are the labels of Buttons. However, the results of pressing the buttons need to be displayed, and on most of my app, this is a simple String. However, I can find no way to rotate individual glyphs of a String. And I'm not keen to write a compositor to layout View like glyphs in a String. Is there a way to make a font by finding individual glyphs, doing the transform, and packaging them into a new specialized font, without needed to use an external Font making application?
2
0
92
2h
App Shortcuts: Invalid parameter type. AppEntity and AppEnum are the only allowed types...
Hi! So while Date is supported for @Parameter in an App Intent, I just discovered that Xcode will not let me use use it in a parametrized App Shortcut phrase. In my case, I would like to give the option to say "today", tomorrow", or "day after tomorrow" for the date. Am I missing something? Any hints on the best way to approach this?
7
1
1.2k
1d
UI Testing for iPadOS 26 Menu Bar items
I need to validate whether specific menu items are correctly enabled/disabled. The XCUIAutomation elements for my menu items do not appear in the tree shown by displaying the XCUIApplication object in the debugger when building and testing the iPadOS version of my application. When running the application in an iPad simulator, I can make the menu bar appear by swiping down. The testing works as expected for the MacOS build and test. I did try to use the recording feature, but was not successful in creating a series of commands that worked for a test run.
0
0
211
5d
Cross-domain issue in wkwebview
Subject: Cross-Domain Access Behaviour in WKWebView – Clarification Required Description: We are facing a cross-domain issue in our iOS application where WKWebView loads content from one domain and attempts to access resources/data from another domain. Current Setup: App Platform: iOS WebView: WKWebView iOS Version: 26 Primary Domain: *.franconnectqa.net Data/Analytics Domain: analytics.franconnectdev.net SSL: Valid certificates configured ATS: Enabled Issue: When WKWebView loads content from franconnectqa.net, it attempts to access resources or analytics from analytics.franconnectdev.net, resulting in cross-domain restrictions. We would like to understand: Does WKWebView support cross-domain resource access by default? Are there any configuration settings that allow controlled cross-domain access? Are there known limitations regarding cookies, local storage, or session sharing across domains? Does WKWebView enforce additional restrictions beyond standard browser CORS policies? Are there recommended best practices for handling cross-domain scenarios in WKWebView? Expected Behavior: We want to determine whether: Cross-domain access is supported under certain configurations, OR The recommended approach is to align all resources under the same domain. Kindly provide guidance on the supported architecture and any configuration recommendations.
0
0
42
1w
Question: How to support landscape-only on iPad app after 'Support for all orientations will soon be required' warning
Dear Apple Customer Support, I’m developing a new Swift iPadOS app and I want the app to run in landscape only (portrait disabled). In Xcode, under Target > General > Deployment Info > Device Orientation, if I select only Landscape Left and Landscape Right, the app builds successfully, but during upload/validation I receive this message and the upload is blocked: “Update the Info.plist: Support for all orientations will soon be required.” Could you please advise what the correct/recommended way is to keep an iPad app locked to landscape only while complying with the current App Store upload requirements? Is there a specific Info.plist configuration (e.g., UISupportedInterfaceOrientations~ipad) or another setting that should be used? Thank you,
6
2
526
1w
Confirmation Items Regarding the Mandatory UIScene Lifecycle Support in iOS 27
After reviewing the following Apple Technote, I have confirmed the statement below: https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle In the next major release following iOS 26, UIScene lifecycle will be required when building with the latest SDK; otherwise, your app won’t launch. While supporting multiple scenes is encouraged, only adoption of scene life-cycle is required. Based on the above, I would appreciate it if you could confirm the following points: Is my understanding correct that the term “latest SDK” refers to Xcode 27? Is it correct that an app built with the latest SDK (Xcode 27, assuming the above understanding is correct) will not launch without adopting the UIScene lifecycle, with no exceptions? Is it correct that an app built with Xcode 26 without UIScene lifecycle support will still launch without issues on an iPhone updated to iOS 27?
Topic: UI Frameworks SubTopic: General Tags:
3
0
377
1w
DataScannerViewController freezes when enabling torch using AVCaptureDevice
I am using DataScannerViewController from VisionKit to scan text in my iOS application. The scanner works correctly while running. However, I added a custom button to toggle the device torch (flashlight). To toggle the torch, I access the camera device using AVCaptureDevice and set torchMode after locking the configuration. When I turn on the torch while DataScannerViewController is actively scanning, the scanner UI freezes and the camera preview stops updating. The app becomes unresponsive until I leave the screen. This issue appears on all iOS versions. Code used to toggle the torch: guard let device = AVCaptureDevice.default(for: .video),       device.hasTorch else { return } do {     try device.lockForConfiguration()     device.torchMode = device.torchMode == .on ? .off : .on     device.unlockForConfiguration() } catch {     print(error) } Questions: Is it supported to control the torch directly via AVCaptureDevice while DataScannerViewController is running? Does DataScannerViewController internally lock or manage the camera configuration in a way that can cause this freeze? Is there a recommended way to enable/disable the torch when using DataScannerViewController? Environment: VisionKit DataScannerViewController iPhone device (not simulator) iOS versions where freeze occurs: All Any clarification about whether this behavior is expected or a limitation of VisionKit would be appreciated.
Topic: UI Frameworks SubTopic: General
0
1
65
1w
How to disable the iOS 26 navigation bar glass style
Hi dear, Our app have adapt for iOS26 ,but we don't need the navigation right and back view style. Design Team Style. Navigation item style is plain style Apple iOS 26 System Navigation Item style (back item with circle background and efffort) We don't want to redesign a new custom navigation view .We need to keep the UIDesignRequiresCompatibility to NO. Do we have any feature to disable the system style? Thank you all. ------------------------分隔符--------------------- 亲爱的,我们的应用已适配iOS26系统,但不需要iOS26导航自带的玻璃样式。 我们不想重新设计新的自定义导航视图。系统的UIDesignRequiresCompatibility配置我们需要设置为NO(其他地方的液态玻璃效果需要保留),我们是否有功能或者设置可以禁用系统样式?谢谢大家。
Topic: UI Frameworks SubTopic: General
0
0
67
1w
Not precise scroll in XCTest
I'm working on UI automation tests using XCUITest for an iOS application (iPhone). My goal is to programmatically scroll a view by a very precise number of pixels (e.g., exactly 500 points down). I understand the scroll(byDeltaX:deltaY:) method is not supported on iPhone, so I'm using the coordinate-based drag method as an alternative. Specifically, I am using XCUICoordinate.press(forDuration:thenDragTo:withVelocity:thenHoldForDuration:) to simulate a drag gesture. I calculate a start and end coordinate with a specific vertical offset in points, expecting the view to scroll by that exact amount. However, I'm observing that the resulting scroll offset is not perfectly accurate. There's a consistent error of several pixels, making the scroll amount unpredictable for precise test assertions. Is there a known limitation to the accuracy of coordinate-based dragging for simulating programmatic scrolling? Are there any alternative methods or best practices within XCUITest to achieve a more reliable and pixel-accurate scroll on iPhone, or is this level of precision simply not achievable with the current framework?
1
0
117
2w
NSTableViewRowAction do not draw the buttons background in macOS Tahoe
Hello, I developed an Open Source Apple Virtualization + QEMU VM manager for macOS, called MacMulator (GitHub repo here). In my app I have a UITableView containing a list of VMs, and I let the user delete or configure a VM through a 2 finger swipe on the corresponding table row. To do this, I added 2 NSTableViewRowActions to my NSTableView, through this code: func tableView(_: NSTableView, rowActionsForRow _: Int, edge _: NSTableView.RowActionEdge) -> [NSTableViewRowAction] { [ NSTableViewRowAction(style: NSTableViewRowAction.Style.destructive, title: NSLocalizedString("VirtualMachineListViewController.delete", comment: ""), handler: { _, index in self.deleteVirtualMachine(index) }), NSTableViewRowAction(style: NSTableViewRowAction.Style.regular, title: NSLocalizedString("VirtualMachineListViewController.edit", comment: ""), handler: { _, index in self.editVirtualMachine(index) }), ] } This actions work fine, but on macOS Tahoe the UI does not draw the background of the 2 buttons, despite the style. The same build in macOS Sequoia work fine (See pictures below). Am I missing something? I did not find and change related to this feature in Tahoe documentation. My UI is not built with SwiftUI, but with storyboards. I don't know if this is relevant. Thanks to whoever will help.
Topic: UI Frameworks SubTopic: General
1
2
106
2w
CarPlay CPListImageRowItem causes Inverted Scrolling and Side Button malfunction
In my CarPlaySceneDelegate.swift, I have two tabs: The first tab uses a CPListImageRowItem with a CPListImageRowItemRowElement. The scroll direction is inverted, and the side button does not function correctly. The second tab uses multiple CPListItem objects. There are no issues: scrolling works in the correct direction, and the side button behaves as expected. Steps To Reproduce Launch the app. Connect to CarPlay. In the first tab, scroll up and down, then use the side button to navigate. In the second tab, scroll up and down, then use the side button to navigate. As observed, the scrolling behavior is different between the two tabs. Code Example: import CarPlay import UIKit class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate { var interfaceController: CPInterfaceController? func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController ) { self.interfaceController = interfaceController downloadImageAndSetupTemplates() } func templateApplicationScene( _ templateApplicationScene: CPTemplateApplicationScene, didDisconnectInterfaceController interfaceController: CPInterfaceController ) { self.interfaceController = nil } private func downloadImageAndSetupTemplates() { let urlString = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRcYUjd1FYkF04-8Vb7PKI1mGoF2quLPHKjvnR7V4ReZR8UjW-0NJ_kC7q13eISZGoTCLHaDPVbOthhH9QNq-YA0uuSUjfAoB3PPs1aXQ&s=10" guard let url = URL(string: urlString) else { setupTemplates(with: UIImage(systemName: "photo")!) return } URLSession.shared.dataTask(with: url) { [weak self] data, _, _ in let image: UIImage if let data = data, let downloaded = UIImage(data: data) { image = downloaded } else { image = UIImage(systemName: "photo")! } DispatchQueue.main.async { self?.setupTemplates(with: image) } }.resume() } private func setupTemplates(with image: UIImage) { // Tab 1 : un seul CPListImageRowItem avec 12 CPListImageRowItemRowElement let elements: [CPListImageRowItemRowElement] = (1...12).map { index in CPListImageRowItemRowElement(image: image, title: "test \(index)", subtitle: nil) } let rowItem = CPListImageRowItem(text: "Images", elements: elements, allowsMultipleLines: true) rowItem.listImageRowHandler = { item, elementIndex, completion in print("tapped element \(elementIndex)") completion() } let tab1Section = CPListSection(items: [rowItem]) let tab1Template = CPListTemplate(title: "CPListImageRowItemRowElement", sections: [tab1Section]) // Tab 2 : 12 CPListItem simples let tab2Items: [CPListItem] = (1...12).map { index in let item = CPListItem(text: "Item \(index)", detailText: "Detail \(index)") item.handler = { _, completion in print("handler Tab 2") completion() } return item } let tab2Section = CPListSection(items: tab2Items) let tab2Template = CPListTemplate(title: "CPListItem", sections: [tab2Section]) // CPTabBarTemplate avec les deux tabs let tabBar = CPTabBarTemplate(templates: [tab1Template, tab2Template]) interfaceController?.setRootTemplate(tabBar, animated: true) } } Here is a quick video:
0
0
151
2w
AlarmKit SDK question
For the CountdownDuration initializer, since passing nil to both parameters of public init(preAlert: TimeInterval?, postAlert: TimeInterval?) is not considered valid, shouldn't the function signature be changed to be two separate inits, instead of a runtime error. EX: public init(preAlert: TimeInterval, postAlert: TimeInterval?) public init(preAlert: TimeInterval?, postAlert: TimeInterval)
Topic: UI Frameworks SubTopic: General
0
0
45
3w
CoreText crash on iOS 26.0 Simulator (Xcode 26.2) when rendering string with zero-width non-joiner and combining marks
Environment: Xcode 26.2 Simulator: 26.0 / iPhone 17 Summary: Assigning a specific Unicode string to a UILabel (or any UITextView / text component backed by CoreText) causes an immediate crash. The string contains a visible base character followed by a zero-width non-joiner and two combining marks. let label = UILabel() label.text = "\u{274D}\u{200C}\u{1CD7}\u{20DB}" // ^ Crash in CoreText during text layout Crash stack trace: The crash occurs inside CoreText's glyph layout/shaping pipeline. The combining marks U+1CD7 and U+20DB appear to stack on the ZWNJ (which has no visible glyph), causing CoreText to fail during run shaping or bounding box calculation. Questions: Is this a known CoreText regression in the iOS 26.0 simulator? Is there a recommended fix or a more targeted workaround beyond stripping zero-width Unicode characters? Will this be addressed in an upcoming update
Topic: UI Frameworks SubTopic: General
3
0
143
3w
Testing a locale with space as thousands separator and dot as decimal point
MacOS system settings allow the user to select one of a number of number formats. My app behaves differently depending on the format (taken from the system Locale), so I need to test every combination. Thus far I have been successful at creating Locale objects with various identifiers that map to the different formats, like: let westEuropeanLocale = Locale(identifier: "en_DE") However, I can't find a locale that maps to using . as a decimal point, and space as a thousands separator, even though it's a standard option (3rd in this list): Any suggestions on how to create a test for this number format?
1
0
215
3w
Quick Look Extension does not load MapKit map properly anymore, after macOS Sequoia
It appears that starting with macOS Sequoia, Quick Look Preview extension no longer loads MapKit maps correctly anymore. Map tiles do not appear, leaving users with a beige background. Users report that polylines do render correctly, but annotations appears black. This was previously working fine in prior macOS versions including Sonoma. STEPS TO REPRODUCE Create a macOS app project, with an associated document. Ensure project has a Quick Look preview extension, with necessary basic setups. Ensure that the extension mentioned in (2) must have a MKMapView. Any other cosmetic changes, etc, does not need to be implemented to observe the base issue. Do note that it has been reported that in addition to the map tiles not loading, annotations don't render correctly as well.
5
2
1k
3w
UIHostingConfiguration on tvOS, focus engine problem with SwiftUI and collectionView
UIHostingConfiguration on tvOS: focus permanently broken with multiple focusable SwiftUI views Hi everyone, I'm working on a tvOS app with a UICollectionView. Some cells embed SwiftUI content via UIHostingConfiguration, specifically a row of 3 buttons that should be individually focusable. The cell itself returns canBecomeFocused = false so focus passes through to the SwiftUI buttons. The problem: after navigating focus into that section once, it becomes permanently unfocusable. Focus enters briefly, then immediately exits to nil on its own, without any user input. From that point on, the focus engine completely skips the section. The exact same SwiftUI view works perfectly when embedded via UIHostingController instead. How to reproduce Press DOWN to move focus into the UIHostingConfiguration section Focus lands on a SwiftUI button for a split second Focus exits on its own and bumps to another section The section is now dead, focus skips it on every subsequent navigation What the system logs say (-UIFocusLoggingEnabled YES) Right when focus enters, the system reports the SwiftUI focus items as "disappearing": Ignoring focus update request for disappearing focus environment <UIKitFocusSectionResponderItem> Then when searching for a new focusable item: <SwiftUI._UIInheritedView> → (warning) No focusable items found. <UIHostingContentView> → (warning) No focusable items found. === unable to find focused item in context. retrying with updated request. === The views are still in the hierarchy (verified by pointer), but the UIHostingContentView no longer exposes its virtual focus items. I also see mismatched parentFocusEnvironment on those items, pointing to a _UIHostingView from a completely different cell. What I've tried I've spent a lot of time on this with my colleagues, dug through the very limited documentation available online, and even used AI agents to help brainstorm. We tested 10 different approaches, none worked: Overriding preferredFocusEnvironments to point to the UIHostingContentView setNeedsFocusUpdate() / updateFocusIfNeeded(), rescan finds nothing Forcing UIKit redraws (setNeedsLayout, setNeedsDisplay) Removing .focusSection() Removing all SwiftUI animations, identical behavior Using canFocusItemAt: delegate instead of cell subclass, identical remembersLastFocusedIndexPath = true, causes a separate focus trap configurationUpdateHandler + setNeedsUpdateConfiguration(), config is rebuilt but virtual items stay deregistered Verified the UIHostingContentView never leaves the hierarchy. It doesn't, its internal state is just corrupted My workaround I switched to UIHostingController with proper view controller containment. It works because the hosting controller is a full UIFocusEnvironment, so the focus engine can traverse it and it correctly maintains its virtual items. Has anyone encountered this? Is there a known pattern for using UIHostingConfiguration on tvOS with multiple focusable SwiftUI elements? Or should I just file a Feedback? Thanks for any help! You can find the code here : https://github.com/ThomasDutartre/focus-problem-tvos I recored the problem here : https://youtu.be/yPfM5AvU2ko
0
0
123
4w
UIHostingConfiguration focus problem on tvOS, with SwiftUI view
UIHostingConfiguration on tvOS: focus permanently broken with multiple focusable SwiftUI views Hi everyone, I'm working on a tvOS app with a UICollectionView. Some cells embed SwiftUI content via UIHostingConfiguration, specifically a row of 3 buttons that should be individually focusable. The cell itself returns canBecomeFocused = false so focus passes through to the SwiftUI buttons. The problem: after navigating focus into that section once, it becomes permanently unfocusable. Focus enters briefly, then immediately exits to nil on its own, without any user input. From that point on, the focus engine completely skips the section. The exact same SwiftUI view works perfectly when embedded via UIHostingController instead. How to reproduce Press DOWN to move focus into the UIHostingConfiguration section Focus lands on a SwiftUI button for a split second Focus exits on its own and bumps to another section The section is now dead, focus skips it on every subsequent navigation What the system logs say (-UIFocusLoggingEnabled YES) Right when focus enters, the system reports the SwiftUI focus items as "disappearing": Ignoring focus update request for disappearing focus environment <UIKitFocusSectionResponderItem> Then when searching for a new focusable item: <SwiftUI._UIInheritedView> → (warning) No focusable items found. <UIHostingContentView> → (warning) No focusable items found. === unable to find focused item in context. retrying with updated request. === The views are still in the hierarchy (verified by pointer), but the UIHostingContentView no longer exposes its virtual focus items. I also see mismatched parentFocusEnvironment on those items, pointing to a _UIHostingView from a completely different cell. What I've tried I've spent a lot of time on this with my colleagues, dug through the very limited documentation available online, and even used AI agents to help brainstorm. We tested 10 different approaches, none worked: Overriding preferredFocusEnvironments to point to the UIHostingContentView setNeedsFocusUpdate() / updateFocusIfNeeded(), rescan finds nothing Forcing UIKit redraws (setNeedsLayout, setNeedsDisplay) Removing .focusSection() Removing all SwiftUI animations, identical behavior Using canFocusItemAt: delegate instead of cell subclass, identical remembersLastFocusedIndexPath = true, causes a separate focus trap configurationUpdateHandler + setNeedsUpdateConfiguration(), config is rebuilt but virtual items stay deregistered Verified the UIHostingContentView never leaves the hierarchy. It doesn't, its internal state is just corrupted My workaround I switched to UIHostingController with proper view controller containment. It works because the hosting controller is a full UIFocusEnvironment, so the focus engine can traverse it and it correctly maintains its virtual items. Has anyone encountered this? Is there a known pattern for using UIHostingConfiguration on tvOS with multiple focusable SwiftUI elements? Or should I just file a Feedback? Thanks for any help!
1
0
112
4w
Memory leak in CarPlay when using CPListImageRowItem
Memory leak in CarPlay when using CPListImageRowItem. The following behavior was observed in the CPListTemplate class when using CPListImageRowItem: If a CPListImageRowItem cell is inserted into the screen, the screen starts to leak, even if it contains no elements (CPListImageRowItem(titleList: nil, imagesRow: [], titlesRow: []). Replacing CPListImageRowItem with CPListItem stops the leak. Using the new initializer for iOS 26 does not correct the issue; the screen still leaks. Class reference: https://developer.apple.com/documentation/carplay/cplistimagerowitem
0
0
92
Feb ’26