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

Activity

A Summary of the WWDC25 Group Lab - UI Frameworks
At WWDC25 we launched a new type of Lab event for the developer community - Group Labs. A Group Lab is a panel Q&A designed for a large audience of developers. Group Labs are a unique opportunity for the community to submit questions directly to a panel of Apple engineers and designers. Here are the highlights from the WWDC25 Group Lab for UI Frameworks. How would you recommend developers start adopting the new design? Start by focusing on the foundational structural elements of your application, working from the "top down" or "bottom up" based on your application's hierarchy. These structural changes, like edge-to-edge content and updated navigation and controls, often require corresponding code modifications. As a first step, recompile your application with the new SDK to see what updates are automatically applied, especially if you've been using standard controls. Then, carefully analyze where the new design elements can be applied to your UI, paying particular attention to custom controls or UI that could benefit from a refresh. Address the large structural items first then focus on smaller details is recommended. Will we need to migrate our UI code to Swift and SwiftUI to adopt the new design? No, you will not need to migrate your UI code to Swift and SwiftUI to adopt the new design. The UI frameworks fully support the new design, allowing you to migrate your app with as little effort as possible, especially if you've been using standard controls. The goal is to make it easy to adopt the new design, regardless of your current UI framework, to achieve a cohesive look across the operating system. What was the reason for choosing Liquid Glass over frosted glass, as used in visionOS? The choice of Liquid Glass was driven by the desire to bring content to life. The see-through nature of Liquid Glass enhances this effect. The appearance of Liquid Glass adapts based on its size; larger glass elements look more frosted, which aligns with the design of visionOS, where everything feels larger and benefits from the frosted look. What are best practices for apps that use customized navigation bars? The new design emphasizes behavior and transitions as much as static appearance. Consider whether you truly need a custom navigation bar, or if the system-provided controls can meet your needs. Explore new APIs for subtitles and custom views in navigation bars, designed to support common use cases. If you still require a custom solution, ensure you're respecting safe areas using APIs like SwiftUI's safeAreaInset. When working with Liquid Glass, group related buttons in shared containers to maintain design consistency. Finally, mark glass containers as interactive. For branding, instead of coloring the navigation bar directly, consider incorporating branding colors into the content area behind the Liquid Glass controls. This creates a dynamic effect where the color is visible through the glass and moves with the content as the user scrolls. I want to know why new UI Framework APIs aren’t backward compatible, specifically in SwiftUI? It leads to code with lots of if-else statements. Existing APIs have been updated to work with the new design where possible, ensuring that apps using those APIs will adopt the new design and function on both older and newer operating systems. However, new APIs often depend on deep integration across the framework and graphics stack, making backward compatibility impractical. When using these new APIs, it's important to consider how they fit within the context of the latest OS. The use of if-else statements allows you to maintain compatibility with older systems while taking full advantage of the new APIs and design features on newer systems. If you are using new APIs, it likely means you are implementing something very specific to the new design language. Using conditional code allows you to intentionally create different code paths for the new design versus older operating systems. Prefer to use if #available where appropriate to intentionally adopt new design elements. Are there any Liquid Glass materials in iOS or macOS that are only available as part of dedicated components? Or are all those materials available through new UIKit and AppKit views? Yes, some variations of the Liquid Glass material are exclusively available through dedicated components like sliders, segmented controls, and tab bars. However, the "regular" and "clear" glass materials should satisfy most application requirements. If you encounter situations where these options are insufficient, please file feedback. If I were to create an app today, how should I design it to make it future proof using Liquid Glass? The best approach to future-proof your app is to utilize standard system controls and design your UI to align with the standard system look and feel. Using the framework-provided declarative API generally leads to easier adoption of future design changes, as you're expressing intent rather than specifying pixel-perfect visuals. Pay close attention to the design sessions offered this year, which cover the design motivation behind the Liquid Glass material and best practices for its use. Is it possible to implement your own sidebar on macOS without NSSplitViewController, but still provide the Liquid Glass appearance? While technically possible to create a custom sidebar that approximates the Liquid Glass appearance without using NSSplitViewController, it is not recommended. The system implementation of the sidebar involves significant unseen complexity, including interlayering with scroll edge effects and fullscreen behaviors. NSSplitViewController provides the necessary level of abstraction for the framework to handle these details correctly. Regarding the SceneDelagate and scene based life-cycle, I would like to confirm that AppDelegate is not going away. Also if the above is a correct understanding, is there any advice as to what should, and should not, be moved to the SceneDelegate? UIApplicationDelegate is not going away and still serves a purpose for application-level interactions with the system and managing scenes at a higher level. Move code related to your app's scene or UI into the UISceneDelegate. Remember that adopting scenes doesn't necessarily mean supporting multiple scenes; an app can be scene-based but still support only one scene. Refer to the tech note Migrating to the UIKit scene-based life cycle and the Make your UIKit app more flexible WWDC25 session for more information.
Topic: UI Frameworks SubTopic: General
0
0
731
Jun ’25
screenshot on iOS26
I had take screenshots by following code let scenes = UIApplication.shared.connectedScenes let windowScene = scenes.first as? UIWindowScene let window = windowScene?.windows.first self.uiImage = window?.rootViewController?.view!.getImage(rect: rect) View has two views. One is ImageView contains some image and overlay of image detection results with .overlay. another view is InfoView contains several info and button which above code fired. on iOS 17, I can take screenshots as I saw, but on iOS26, missing on image of ImageView. Overlay(detected rectangle) in Imageview and InfView can be taken. How can I take screenshots as I saw on iOS26?(iPad)
8
0
385
12h
WidgetKit + AppIntent widget never sees shared snapshots (Flutter host app)
Environment iOS 17.2, Xcode 16.2, physical iPhone (12 Pro) Main app in Flutter WidgetKit extension written in Swift (Swift‑PM package) Shared App Group: group.cool.glance.shared Widget uses an AppIntent (FeedSelectionIntent) + custom entity (FeedAppEntity) Flutter bridge writes JSON snapshots for the widget Observed behaviour Flutter prints the snapshot payload and writes /…/AppGroup/<uuid>/Library/Caches/feed_snapshots.json. Widget gallery only shows the plain grey system placeholder (my sample placeholder never appears). Console log every time WidgetKit runs: chronod: Unable to resolve default intent (appintent:FeedSelectionIntent) for extension cool.glance.app.widget Error Domain=LNMetadataProviderErrorDomain Code=9000 LinkMetadata.BundleMetadataExtractionError.aggregateMetadataIsEmpty Added os_log in the widget + bridge (WidgetsBridgePlugin, FeedSnapshotStore, FeedEntityQuery, FeedSummaryTimeline), but none of them ever appear. That suggests the widget bundle can’t see the compiled AppIntent metadata or the snapshot file even though it’s there. Code (trimmed to essentials) FeedSelectionIntent.swift struct FeedSelectionIntent: AppIntent, WidgetConfigurationIntent { static var title: LocalizedStringResource = "Feed" static var description = IntentDescription("Choose which feed should appear in the widget.") @Parameter(title: "Feed", requestValueDialog: IntentDialog("Select which feed to display.")) var feed: FeedAppEntity? static var parameterSummary: some ParameterSummary { Summary("Show \(\.$feed)") } init() { feed = FeedAppEntity.sample } init(feed: FeedAppEntity?) { self.feed = feed } static var defaultValue: FeedSelectionIntent { FeedSelectionIntent(feed: .sample) } func perform() async throws -> some IntentResult { .result() } } FeedSnapshotStore.loadSnapshots() guard let containerURL = fileManager.containerURL( forSecurityApplicationGroupIdentifier: appGroupIdentifier) else { os_log("FeedSnapshotStore: missing app group container %{public}s", log: Self.log, type: .error, appGroupIdentifier) return [] } let fileURL = SharedConstants.feedSnapshotRelativePath.reduce(containerURL) { url, component in url.appendingPathComponent(component, isDirectory: component != SharedConstants.feedSnapshotFileName) } guard let data = try? Data(contentsOf: fileURL), !data.isEmpty else { os_log("FeedSnapshotStore: no snapshot data found at %{public}s", log: Self.log, type: .info, fileURL.path) return [] } // decode FeedSnapshotEnvelope… WidgetsBridgePlugin.writeSnapshots (Flutter → widget) guard let containerURL = fileManager.containerURL( forSecurityApplicationGroupIdentifier: SharedConstants.appGroupIdentifier) else { result(FlutterError(code: "container-unavailable", message: "Unable to locate shared app group container.", details: nil)) return } let targetDir = SharedConstants.feedSnapshotRelativePath.dropLast().reduce(containerURL) { $0.appendingPathComponent($1, isDirectory: true) } try fileManager.createDirectory(at: targetDir, withIntermediateDirectories: true) let targetURL = targetDir.appendingPathComponent(SharedConstants.feedSnapshotFileName, isDirectory: false) try data.write(to: targetURL, options: .atomic) WidgetCenter.shared.reloadTimelines(ofKind: "GlanceSummaryWidget") os_log("WidgetsBridgePlugin: wrote snapshots for %{public}d feeds at %{public}s", log: WidgetsBridgePlugin.log, type: .info, envelope.feeds.count, targetURL.path) Info.plist for the widget contains only: <key>NSExtensionPointIdentifier</key> <string>com.apple.widgetkit-extension</string> <key>NSExtensionAttributes</key> <dict> <key>WKAppBundleIdentifier</key> <string>cool.glance.app</string> </dict> (If I add NSExtensionPrincipalClass, the install fails with “principal class not allowed for com.apple.widgetkit-extension”, so it stays out.) What I’ve double‑checked App Group entitlement present on Runner.app and the widget extension. Snapshot file definitely exists under Library/Caches/feed_snapshots.json (size updates when Flutter writes). Code matches Apple’s “Making a configurable widget” sample (custom WidgetConfigurationIntent, entity, and timeline provider). Cleaned build folders (Flutter + Xcode), reinstalled app from scratch, but I still don’t see any of the os_log messages from the widget extension-only the LinkMetadata error above. Placeholder entry (SampleSnapshots.recentSummary) is wired up; yet the system never uses it and always drops to the generic grey preview. Questions Does LinkMetadata.BundleMetadataExtractionError.aggregateMetadataIsEmpty mean WidgetKit can’t see the compiled AppIntent metadata? If so, what could cause that when the extension is built via Swift Package Manager inside a Flutter project? Are there extra build settings or plist keys required so the AppIntent metadata gets embedded in the widget bundle? Any reason the widget would never reach my FeedSnapshotStore logs even though the file is written and the App Group is configured? Any help connecting the dots would be hugely appreciated.
0
0
156
1d
ASAuthorizationAccountCreationProvider does not work with 3rd party apps
hello im using the new IOS 26 api for passkey creation ASAuthorizationAccountCreationProvider however it only seems to work with apple's Passwords app. Selecting 3rd party password apps (1Password, google chrome, etc) does not create the passkey. The sign up sheet gives me the option to save in 3rd party apps, but when I select a 3rd party app, I just get the ASAuthorizationError cancelled error? So I dont even know what the problem is? When selecting "Save in Passwords(apple's app)" during the sign up it works fine Has anyone else run into this issue? Is there something I need to do enable 3rd party apps?
4
0
279
1d
In SwiftUI on macOS, using instancing in RealityKit, how can I set individual colours per instance?
I have written this function: @available(macOS 26.0, *) func instancing() async -> Entity { let entity = Entity() do { // 1. Create a CustomMaterial let library = offscreenRenderer.pointRenderer!.device.makeDefaultLibrary()! let surfaceShader = CustomMaterial.SurfaceShader( named: "surfaceShaderWithCustomUniforms", // This must match the function name in Metal in: library ) let instanceCount = 10 // No idea how to actually use this... // let bufferSize = instanceCount * MemoryLayout<UInt32>.stride // // // Create the descriptor // var descriptor = LowLevelBuffer.Descriptor(capacity: bufferSize, sizeMultiple: MemoryLayout<UInt32>.stride) // // // Initialize the buffer // let lowLevelBuffer = try LowLevelBuffer(descriptor: descriptor) // lowLevelBuffer.withUnsafeMutableBytes { rawBytes in // // Bind the raw memory to the UInt32 type // let pointer = rawBytes.bindMemory(to: UInt32.self) // pointer[1] = 0xff_0000 // pointer[0] = 0x00_ff00 // pointer[2] = 0x00_00ff // pointer[3] = 0xff_ff00 // pointer[4] = 0xff_00ff // pointer[5] = 0x00_ffff // pointer[6] = 0xff_ffff // pointer[7] = 0x7f_0000 // pointer[8] = 0x00_7f00 // pointer[9] = 0x00_007f // } var material = try CustomMaterial(surfaceShader: surfaceShader, lightingModel: .lit) material.withMutableUniforms(ofType: SurfaceCustomUniforms.self, stage: .surfaceShader) { params, resources in params.argb = 0xff_0000 } // 2. Create the ModelComponent (provides the MESH and MATERIAL) let mesh = MeshResource.generateSphere(radius: 0.5) let modelComponent = ModelComponent(mesh: mesh, materials: [material]) // 3. Create the MeshInstancesComponent (provides the INSTANCE TRANSFORMS) let instanceData = try LowLevelInstanceData(instanceCount: instanceCount) instanceData.withMutableTransforms { transforms in for i in 0..<instanceCount { let instanceAngle = 2 * .pi * Float(i) / Float(instanceCount) let radialTranslation: SIMD3<Float> = [-sin(instanceAngle), cos(instanceAngle), 0] * 4 // Position each sphere around a circle. let transform = Transform( scale: .one, rotation: simd_quatf(angle: instanceAngle, axis: [0, 0, 1]), translation: radialTranslation ) transforms[i] = transform.matrix } } let instancesComponent = try MeshInstancesComponent(mesh: mesh, instances: instanceData) // 4. Attach BOTH to the same entity entity.components.set(modelComponent) entity.components.set(instancesComponent) } catch { print("Failed to create mesh instances: \(error)") } return entity } and this is the corresponding Metal shader typedef struct { uint32_t argb; } SurfaceCustomUniforms; [[stitchable]] void surfaceShaderWithCustomUniforms(realitykit::surface_parameters params, constant SurfaceCustomUniforms &customParams) { half3 color = { static_cast<half>((customParams.argb >> 16) & 0xff), static_cast<half>((customParams.argb >> 8) & 0xff), static_cast<half>(customParams.argb & 0xff) }; params.surface().set_base_color(color); } which works well and generates 10 red spheres. While listening to the WWDC25 presentation on what's new in RealityKit I am positive to hear the presenter saying that it is possible to customise each instance using a LowLevelBuffer, but so far all my attempts have failed. Is it possible, and if so how ? Thanks for reading and for your help. Kind regards, Christian
1
1
183
1d
.bottomBar menu button briefly disappears after menu dismissal on iOS 26.1 Seed 2 (23B5059e)
[Also submitted as FB20636175] In iOS 26.1 Seed 2 (23B5059e), ToolbarItem menus with .bottomBar placement cause the toolbar item to disappear and rebuild after the menu is dismissed, instead of smoothly morphing back. The bottom toolbar can take 1–2 seconds to reappear. This also seems to coincide with this console error: Adding 'UIKitToolbar' as a subview of UIHostingController.view is not supported and may result in a broken view hierarchy. Add your view above UIHostingController.view in a common superview or insert it into your SwiftUI content in a UIViewRepresentable instead. This occurs both on device and in a simulator. Sample Project This sample ContentView includes two menu buttons—one in the bottom bar and one in the top bar. Dismissing the bottom bar menu causes a short delay before the button reappears, while the top bar menu behaves normally. struct ContentView: View { var body: some View { NavigationStack { Text("Tap and dismiss both menu buttons and note the difference.") .navigationTitle("BottomBar Menu Issue") .navigationSubtitle("Reproduces on iOS 26.1 Seed 2 (23B5059e)") .toolbar { // Control: top bar trailing menu animates back smoothly ToolbarItem(placement: .topBarTrailing) { Menu { Button("Dismiss", role: .cancel) { } Button("Do Nothing") { } } label: { Label("More", systemImage: "ellipsis.circle") .font(.title3) } } // Repro: delay before menu button reappears after menu dismissal ToolbarItem(placement: .bottomBar) { Menu { Button("Dismiss", role: .cancel) { } Button("Do Nothing") { } } label: { Label("Actions", systemImage: "ellipsis.circle") .font(.title2) } } } } } } Passwords App This can also be seen in iOS 26.1 Seed 2 (23B5059e)'s Passwords app ("All" or "Passcodes" views):
1
2
258
1d
Inserting an NSView (Cocoa) in NSWindowController Views hierarchy
I have an NSWindowController with several IBOutlets created in storyboard. I want to add an NSView and fill it with some color. I need to place it at a specific position in views hierarchy. I have tried 2 ways, no one succeeds. First. include a custom view in storyboard connect to an IBOutlet in an init of controller, set the layer for the view Result: crash Second build programmatically Result: I do not find where to put this code in the controller code That's basic Cocoa, but way more painful than iOS.
3
0
155
1d
NSTextLineFragment crash - how to debug
We have crash reports as shown below that we haven't yet been able to repro and could use some help deubgging. My guess is that the app is giving a label or text view an attributed string with an invalid attribute range, but attributed strings are used in many places throughout the app, and I don't know an efficient way to track this down. I'm posting the stack trace here in hopes that someone more familiar with the internals of the system frameworks mentioned will be able to provide a clue to help narrow where I should look. Fatal Exception: NSRangeException NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds 0 CoreFoundation 0x2d5fc __exceptionPreprocess 1 libobjc.A.dylib 0x31244 objc_exception_throw 2 Foundation 0x47130 blockForLocation 3 UIFoundation 0x2589c -[NSTextLineFragment _defaultRenderingAttributesAtCharacterIndex:effectiveRange:] 4 UIFoundation 0x25778 __53-[NSTextLineFragment initWithAttributedString:range:]_block_invoke 5 CoreText 0x58964 TLine::DrawGlyphsWithAttributeOverrides(TLineDrawContext const&, __CFDictionary const* (long, CFRange*) block_pointer, TDecoratorObserver*) const 6 CoreText 0x58400 CTLineDrawWithAttributeOverrides 7 UIFoundation 0x25320 _NSCoreTypesetterRenderLine 8 UIFoundation 0x24b10 -[NSTextLineFragment drawAtPoint:graphicsContext:] 9 UIFoundation 0x3e634 -[NSTextLineFragment drawAtPoint:inContext:] 10 UIFoundation 0x3e450 -[NSTextLayoutFragment drawAtPoint:inContext:] 11 UIKitCore 0x3e3098 __38-[_UITextLayoutFragmentView drawRect:]_block_invoke 12 UIKitCore 0x3e31cc _UITextCanvasDrawWithFadedEdgesInContext 13 UIKitCore 0x3e3040 -[_UITextLayoutFragmentView drawRect:] 14 UIKitCore 0xd7a98 -[UIView(CALayerDelegate) drawLayer:inContext:] 15 QuartzCore 0x109340 CABackingStoreUpdate_ 16 QuartzCore 0x109224 invocation function for block in CA::Layer::display_() 17 QuartzCore 0x917f0 -[CALayer _display] 18 QuartzCore 0x90130 CA::Layer::layout_and_display_if_needed(CA::Transaction*) 19 QuartzCore 0xe50c4 CA::Context::commit_transaction(CA::Transaction*, double, double*) 20 QuartzCore 0x5bd8c CA::Transaction::commit() 21 UIKitCore 0x9f3f0 _UIApplicationFlushCATransaction 22 UIKitCore 0x9c89c __setupUpdateSequence_block_invoke_2 23 UIKitCore 0x9c710 _UIUpdateSequenceRun 24 UIKitCore 0x9f040 schedulerStepScheduledMainSection 25 UIKitCore 0x9cc5c runloopSourceCallback 26 CoreFoundation 0x73f4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 27 CoreFoundation 0x73ee0 __CFRunLoopDoSource0 28 CoreFoundation 0x76b40 __CFRunLoopDoSources0 29 CoreFoundation 0x75d3c __CFRunLoopRun 30 CoreFoundation 0xc8284 CFRunLoopRunSpecific 31 GraphicsServices 0x14c0 GSEventRunModal 32 UIKitCore 0x3ee674 -[UIApplication _run] 33 UIKitCore 0x14e88 UIApplicationMain also filed as FB16905066
6
1
450
1d
SwiftUI view state resetting after alert is shown
Seeing an issue in iOS 26.2 iPhone 17 simulator (haven't been able to reproduce on device or other simulators), where a view's state is reset after an alert is shown. In this example the first LibraryView has the issue when alert is shown, the second LibraryView maintains state as expected. struct ContentView: View { var body: some View { NavigationStack { List { VStack { LibraryView(title: "Show view (Loss of state)") } LibraryView(title: "Show view (Works as expected)") } } } } /// This view is from a package dependency and wants to control the presentation of the sheet internally public struct LibraryView: View { @State private var isPresented: Bool = false let title: String public init(title: String) { self.title = title } public var body: some View { Button(self.title) { self.isPresented = true } .sheet(isPresented: self.$isPresented) { ViewWithAlert() } } } private struct ViewWithAlert: View { @State private var isPresented: Bool = false @State private var presentedCount = 0 var body: some View { Button("Show Alert, count: \(presentedCount)") { isPresented = true presentedCount += 1 } .alert("Hello", isPresented: self.$isPresented) { Button("OK") { } } } } Any ideas? The issue can be corrected by moving the .sheet to a higher level within the layout (i.e. on the NavigationStack). However, the library wants to control that presentation and not require the integration to present the sheet.
Topic: UI Frameworks SubTopic: SwiftUI
10
1
347
2d
Horrible weird Window Server killing bug
OS 26.s, Xcode 26.2 TLDR: My pure SwiftUI app freezes the window server, is this a known problem? My app is pure SwiftUI, no low level calls, no networking, no tricksy pointer use. Somehow, something in my code is terminally confusing the Window Server. As in, I run the app, and before I ever seen a window, the Window Server locks up, and is killed by the OS for being unresponsive. Using debugging shows that I get to the end of a Canvas, and it simply freezes upon exiting. I'm about to do the old comment out everything, and bring it back a bit at a time, but I'm wondering if anyone is experiencing this sort of thing? The reaction is so extreme. And it's not Xcode in particular, I built the program with xcodebuild, Xcode itself not running, and ran my app, and it did the same thing.
Topic: UI Frameworks SubTopic: SwiftUI
2
0
65
2d
.contactAccessPicker shows blank sheet on iOS 26.2.1 on device
Calling contactAccessPicker results in a blank sheet and a jetsam error, rather than the expected contact picker, using Apple’s sample code, only on device with iOS 26.2.1. This is happening on a iPhone 17 Pro Max running 26.2.1, and not on a simulator. I’m running Apple's sample project Accessing a person’s contact data using Contacts and ContactsUI Steps: Run the sample app on device running iOS 26.2.1. Use the flow to authorize .limited access with 1 contact: Tap request access, Continue, Select Contacts. Select a contact, Continue, Allow Selected Contact. This all works as expected. Tap the add contact button in the toolbar to add a second contact. Expected: This should show the Contact Access Picker UI. Actual: Sheet is shown with no contents. See screenshot of actual results on iOS device running 26.2.1. Reported as FB21812568 I see a similar (same?) error reported for 26.1. It seems strange that the feature is completely broken for multiple point releases. Is anyone else seeing this or are the two of us running into the same rare edge case? Expected Outcome, seen on simulator running 26.2 Actual outcome, seen on device running 26.2.1
1
0
45
2d
iOS 26 WKWebView STScreenTimeConfigurationObserver KVO Crash
Fatal Exception: NSInternalInconsistencyException Cannot remove an observer <WKWebView 0x135137800> for the key path "configuration.enforcesChildRestrictions" from <STScreenTimeConfigurationObserver 0x13c6d7460>, most likely because the value for the key "configuration" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the STScreenTimeConfigurationObserver [class.] I noticed that on iOS 26, WKWebView registers STScreenTimeConfigurationObserver, Is this an iOS 26 system issue? What should I do?
Topic: UI Frameworks SubTopic: UIKit Tags:
11
16
970
2d
HLS (m3u8) time segments not cached for loop
Our use case requires short looping videos on the app’s front screen. These videos include subtitles for accessibility, so they are delivered as HLS (m3u8) rather than MP4, allowing subtitles to be natively rendered instead of burned into the video. Since moving from MP4 to HLS, we’ve observed that video time segments (.ts / .m4s) are not fully cached between loops. When the video reaches the end and restarts, the same time segments are re-requested from the network instead of being served from cache. This behavior occurs even though: The playlist and segments are identical between loops The content is short and fully downloaded during the first playback No explicit cache-busting headers are present We have investigated available caching options in AVFoundation but have not found a way to persistently cache HLS segments for looping playback without implementing a full offline download using AVAssetDownloadURLSession, which feels disproportionate for this use case. Using Proxyman, I can clearly see repeated network requests for the same HLS time segments on every loop, resulting in unnecessary network usage and reduced efficiency. I would like to understand: Whether this is expected behavior for HLS playback? Whether there is a supported way to cache HLS segments across loops? Or whether there is a recommended alternative approach for looping accessible video with subtitles without re-requesting time segments?
2
0
230
2d
Issues with ScrollView and nested (Lazy)VStack
Hello, We're having massive issues when we nest LazyVStacks inside a ScrollView. Our app relies heavily on custom views that are sometimes nested two or three levels deep. While the app does work fine overall, we see a massive spike in CPU usage in Instruments when accessibility features like VoiceOver are enabled. Those spikes never recover, so the app basically freezes and stays that way until force quit. We are in talks with a third-party service that uses accessibility features we want to use. Fortunately they have created a GitHub repository which recreates the issue we're facing. It would be greatly appreciated if someone could have a look at the code and tell us what the issue is, or if there's some kind of workaround. Here's the link to the repo: https://github.com/pendo-io/SwiftUI_Hang_Reproduction. Just to be clear, the issue is not directly related to the third-party SDK, but to the accessibility features used in conjunction with SwiftUI. As you can see in the repo the issue is reproducible without having the SDK included in the project. Thanks in advance
0
0
56
2d
NavigationBar iOS 26
Hi all, When navigating between two screens where the first uses .inline and the second .large title display mode, the NavigationBar shows visible resizing glitches during the push animation. This is especially noticeable when using a custom background color (e.g. yellow) via UINavigationBarAppearance or .toolbarBackground(Color.yellow, for: .navigationBar). I’m already using the same appearance for standard, scrollEdge, and compact, with configureWithOpaqueBackground(), but the issue remains. Is this a known UIKit or SwiftUI issue? Any recommended workaround? Thanks.
Topic: UI Frameworks SubTopic: SwiftUI
1
0
87
2d
List rows partially obscured by navigation bar briefly render fully opaque when switching tabs (iOS 26)
Overview In iOS 26, a List embedded in a NavigationStack inside a TabView exhibits a visual glitch when switching tabs. When the list is scrolled such that some rows are partially obscured by the navigation bar, the system correctly applies a fade/opacity effect to those rows. However, if the user switches to another tab while rows are in this partially obscured (faded) state, those rows briefly flash at full opacity during the tab transition before disappearing. This flash is visually distracting and appears to be inconsistent with the intended scroll-edge opacity behavior. The issue occurs only for rows partially obscured by the navigation bar. Rows partially obscured by the tab bar do not exhibit this flashing behavior. Steps to Reproduce: Run the attached minimal reproduction on iOS 26. Open the first tab. Scroll the list so that some rows are partially hidden behind the navigation bar (showing the native faded appearance). While rows are in this partially faded state, switch to the second tab. Observe that the faded rows briefly render fully opaque during the tab switch. Expected Behavior: Rows that are partially obscured by the navigation bar should maintain consistent opacity behavior during tab transitions, without flashing to full opacity. import SwiftUI @main struct NavBarReproApp: App { /// Minimal repro for iOS 26: /// - TabView with two tabs /// - First tab: NavigationStack + List /// - Scroll so some rows are partially behind the nav bar (faded) /// - Switch tabs: those partially-faded rows briefly flash fully opaque. Partially faded rows under the tab bar do not flash private let items = Array(0..<200).map { "Row \($0)" } var body: some Scene { WindowGroup { TabView { NavigationStack { List { ForEach(items, id: \.self) { item in Text(item) } } .navigationTitle("One") .navigationBarTitleDisplayMode(.inline) } .tabItem { Label("One", systemImage: "1.circle") } NavigationStack { Text("Second tab") .navigationTitle("Two") .navigationBarTitleDisplayMode(.inline) } .tabItem { Label("Two", systemImage: "2.circle") } } } } }
6
0
89
2d
.glassEffect() renders dark on device but works on simulator - TestFlight doesn't fix it
iOS 26 SwiftUI .glassEffect() renders dark/gray on physical device - TestFlight doesn't fix it .glassEffect() renders as dark/muddy gray on my physical iPhone instead of the light frosted glass like Apple Music's tab bar. What I've confirmed: Same code works perfectly on iOS Simulator Apple Music and other Apple apps show correct Liquid Glass on same device Brand new Xcode project with just .glassEffect() also renders dark TestFlight build (App Store signing) has the SAME problem - still dark/gray This rules out developer signing vs App Store signing as the cause What I've tried: Clean build, delete derived data, reinstall app Completely reinstalled Xcode All accessibility settings correct (Reduce Transparency OFF, Liquid Glass set to Clear) Disabled Metal diagnostics Debug and Release builds Added window configuration for Extended sRGB/P3 color space Added AppDelegate with configureWindowForLiquidGlass() Tried .preferredColorScheme(nil) Tried background animation to force "live" rendering Environment: iPhone 17 Pro, iOS 26.3 Xcode 26.2 macOS 26.3 The question: Why does .glassEffect() work for Apple's apps but not third party apps, even with App Store signing via TestFlight? What am I missing?
4
0
198
2d
UIApplication.canOpenURL not working without Safari
If I delete Safari and only have another browser installed on my device, UIApplication.shared.open does not work. I think this is a bug. Why would it not work? If Safari is not the main browser, UIApplication would open the URL in my main browser. Those are valid use cases. I would expect this API to work with any browser... iOS 26.2 iPhone 14 Pro guard let url = URL(string: "https://www.apple.com") else { return } if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url) } else { print("Could not open URL") }
Topic: UI Frameworks SubTopic: UIKit
1
0
56
3d
Xcode26 build app with iOS26, UITabBarController set CustomTabBar issue
Our project using UITabBarController and set a custom tabbar using below code: let customTabBar = CustomTabBar(with: dataSource) setValue(customTabBar, forKey: "tabBar") But when using Xcode 26 build app in iOS 26, the tabbar does not show: above code works well in iOS 18: below is the demo code: AppDelegate.swift: import UIKit @main class AppDelegate: UIResponder, UIApplicationDelegate { let window: UIWindow = UIWindow() func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window.rootViewController = TabBarViewController() window.makeKeyAndVisible() return true } } CustomTabBar.swift: import UIKit class CustomTabBar: UITabBar { class TabBarModel { let title: String let icon: UIImage? init(title: String, icon: UIImage?) { self.title = title self.icon = icon } } class TabBarItemView: UIView { lazy var titleLabel: UILabel = { let titleLabel = UILabel() titleLabel.translatesAutoresizingMaskIntoConstraints = false titleLabel.font = .systemFont(ofSize: 14) titleLabel.textColor = .black titleLabel.textAlignment = .center return titleLabel }() lazy var iconView: UIImageView = { let iconView = UIImageView() iconView.translatesAutoresizingMaskIntoConstraints = false iconView.contentMode = .center return iconView }() private var model: TabBarModel init(model: TabBarModel) { self.model = model super.init(frame: .zero) setupSubViews() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupSubViews() { addSubview(iconView) iconView.topAnchor.constraint(equalTo: topAnchor).isActive = true iconView.centerXAnchor.constraint(equalTo: centerXAnchor).isActive = true iconView.widthAnchor.constraint(equalToConstant: 34).isActive = true iconView.heightAnchor.constraint(equalToConstant: 34).isActive = true iconView.image = model.icon addSubview(titleLabel) titleLabel.topAnchor.constraint(equalTo: iconView.bottomAnchor).isActive = true titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true titleLabel.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true titleLabel.heightAnchor.constraint(equalToConstant: 16).isActive = true titleLabel.text = model.title } } private var dataSource: [TabBarModel] init(with dataSource: [TabBarModel]) { self.dataSource = dataSource super.init(frame: .zero) setupTabBars() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func sizeThatFits(_ size: CGSize) -> CGSize { var sizeThatFits = super.sizeThatFits(size) let safeAreaBottomHeight: CGFloat = safeAreaInsets.bottom sizeThatFits.height = 52 + safeAreaBottomHeight return sizeThatFits } private func setupTabBars() { backgroundColor = .orange let multiplier = 1.0 / Double(dataSource.count) var lastItemView: TabBarItemView? for model in dataSource { let tabBarItemView = TabBarItemView(model: model) addSubview(tabBarItemView) tabBarItemView.translatesAutoresizingMaskIntoConstraints = false tabBarItemView.topAnchor.constraint(equalTo: topAnchor).isActive = true tabBarItemView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true if let lastItemView = lastItemView { tabBarItemView.leadingAnchor.constraint(equalTo: lastItemView.trailingAnchor).isActive = true } else { tabBarItemView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true } tabBarItemView.widthAnchor.constraint(equalTo: widthAnchor, multiplier: multiplier).isActive = true lastItemView = tabBarItemView } } } TabBarViewController.swift: import UIKit class NavigationController: UINavigationController { override func viewDidLoad() { super.viewDidLoad() } } class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .red navigationItem.title = "Home" } } class PhoneViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .purple navigationItem.title = "Phone" } } class PhotoViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .yellow navigationItem.title = "Photo" } } class SettingViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .green navigationItem.title = "Setting" } } class TabBarViewController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() let homeVC = HomeViewController() let homeNav = NavigationController(rootViewController: homeVC) let phoneVC = PhoneViewController() let phoneNav = NavigationController(rootViewController: phoneVC) let photoVC = PhotoViewController() let photoNav = NavigationController(rootViewController: photoVC) let settingVC = SettingViewController() let settingNav = NavigationController(rootViewController: settingVC) viewControllers = [homeNav, phoneNav, photoNav, settingNav] let dataSource = [ CustomTabBar.TabBarModel(title: "Home", icon: UIImage(systemName: "house")), CustomTabBar.TabBarModel(title: "Phone", icon: UIImage(systemName: "phone")), CustomTabBar.TabBarModel(title: "Photo", icon: UIImage(systemName: "photo")), CustomTabBar.TabBarModel(title: "Setting", icon: UIImage(systemName: "gear")) ] let customTabBar = CustomTabBar(with: dataSource) setValue(customTabBar, forKey: "tabBar") } } And I have post a feedback in Feedback Assistant(id: FB18141909), the demo project code can be found there. How are we going to solve this problem? Thank you.
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
617
3d
iOS 26: keyboardLayoutGuide does not give the correct constraint
In iOS 26, keyboardLayoutGuide does not provide the correct constraint when using third-party input method. A demo’s source code is attached to FB18594298 to illustrate the issue. The setup includes: An inputAccessoryView above keyboard An input box anchored to the top of the inputAccessoryView using the following constraint: [self.view.keyboardLayoutGuide.topAnchor constraintEqualToAnchor:self.inputBoxContainerView.bottomAnchor] Expected Behavior: Before iOS 26, when keyboard toggled by clicking the input box, the input box should move above the inputAccessoryView. Actual Behavior: However, on iOS 26, when switching to a third-party IME (e.g. 百度输入法baidu,搜狗输入法sogou,微信输入法wechat), then click the input box, the input box is above the keyboard instead of the inputAccessoryView, and is covered by the inputAccessoryView.
Topic: UI Frameworks SubTopic: UIKit Tags:
1
1
333
3d