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

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
545
Jun ’25
Apple CarPlay Notification Custom Actions
I am setting up push notifications in CarPlay and when the user taps on notification from infotainment screen, it should open the app and a CPAlertTemplate should be presented. How can I achieve this? since I'm unable to get a trigger on the didReceiveNotificationResponse so handle some custom actions in between.
0
1
46
Jun ’25
Changes to CarPlay maps Application scene
I am looking at the demo code for CarPlay Maps app - https://developer.apple.com/documentation/carplay/integrating-carplay-with-your-navigation-app This worked in IOS 18 but now on IOS26 it doesn't work, eg the map in the CarPlay app no longer shows up. I don't see any docks to say what has changed, I wonder if anyone has any ideas?
0
0
91
Jun ’25
Creating UI instance using 'XML' like data at runtime
In windows there is a support for generating Xaml strings at runtime for the UI artefact and use it on the main thread for loading the Xaml strings with properties and creating the UI artefact. Below is a code example for it. static void createxaml(hstring & str) { str = LR"( <Button xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation Name="MyButton" Content="Click Me" Width="200" Height="60" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="18" FontFamily="Segoe UI" Foreground="White" )"; } { hstring xaml; createxaml(xaml); Button obj = XamlReader::Load(xaml).as<Button>(); } My question is, Is there similar support available in uikit to create ui instances like UIButton. Is there some native support from apple that allows us to create a button object using an XML like string?
Topic: UI Frameworks SubTopic: General Tags:
2
0
67
Jun ’25
Can `UIApplication.shared.setAlternateIconName` use .icon file?
I’m updating my app’s alternate icons using UIApplication.shared.setAlternateIconName, and I noticed that in iOS 26, Xcode now supports the new .icon file format for App Icons. Is it possible to reference .icon files directly for alternate icons? Or does setAlternateIconName still only support traditional .png assets inside the AppIcon set? I couldn’t find any documentation confirming this either way, and I want to ensure compatibility with the new format while supporting alternate icons. Any clarification or Apple documentation link would be greatly appreciated!
0
0
175
Jun ’25
App Clip Custom URL not Invoking Clip
Subject: Need Assistance with App Clip Invocation via URL Hello Developers, I’m currently facing an issue with invoking my App Clip through a URL, specifically when the link is shared via iMessage or Email. Instead of launching the App Clip, the URL redirects to the website. Here’s my current configuration: Approved App with an App Clip Universal Links functioning correctly within the App (verified through AASA file hosted on the website) Associated Domain Entitlements included for both the App and the App Clip Universal Link is expected to invoke the App Clip if the App isn’t installed Advanced Experience configured in App Store Connect The default experience URL from App Store Connect successfully triggers the App Clip, but my custom URL does not. I suspect I might be missing a crucial configuration step. Has anyone encountered a similar issue or have suggestions on what else I should verify? Thank you in advance for your help!
7
1
213
Jun ’25
iOS 26 button glitch
Im just wondering with the new iOS 26 developer beta 2 has anyone else had the button glitch? its like the buttons glitch out and its just weird. You have to hold the liquid glass and be able to move the app windows for it to happen. you also can’t see it happen on screen recording for some reason. It recently happen to me when I was on a call with apple support for a different reason and the buttons that were highlighted were the only ones glitching out.
Topic: UI Frameworks SubTopic: General
5
1
508
Jun ’25
Accessibility Permission In Sandbox For Keyboard
Hello! My question is about 1) if we can use any and or all accessibility features within a sandboxed app and 2) what steps we need to take to do so. Using accessibility permissions, my app was working fine in Xcode. It used NSEvent.addGlobalMonitorForEvents and localMoniter, along with CGEvent.tapCreate. However, after downloading the same app from the App Store, the code was not working. I believe this was due to differences in how permissions for accessibility are managed in Xcode compared to production. Is it possible for my app to get access to all accessibility features, while being distributed on the App Store though? Do I need to add / request any special entitlements like com.apple.security.accessibility? Thanks so much for the help. I have done a lot of research on this online but found some conflicting information, so wanted to post here for a clear answer.
6
0
130
Jun ’25
iOS18.1以降でのアプリレイアウト崩れに関して
iOS18.0以前では発生していなかったアプリのレイアウト崩れが発生しており、これはOS起因のバグなのか否かをご教示いただきたいです。 【事象】 iOS18.0以前では発生していなかった、右上に表示していたアイコンが真ん中に来ているといったアプリのレイアウト崩れが発生しております。 【原因調査】 ソースを確認したところ、 親要素のCSS内にあるui-btn-textのdisplayが、上記事象が発生しているOS(現在で確認できているのは18.4.1と18.5)だと 「display: block」もしくは「display: inline-block」となっていない場合横幅がない状態として判定されています。 その為「position:absolute」かつ、「right: XXpx」という指定を行った場合、iOS18.0以前では親要素の右端から「XXpx」ずれた位置に配置される形となりますが、事象が発生しているOSでは(横幅が0として判定されるため)親要素の左端から「XXpx」ずれた位置に配置される形となっております。 【質問】 これはOS起因のバグなのか仕様変更なのか確認いただきたいです。
Topic: UI Frameworks SubTopic: General
0
0
55
Jun ’25
Is configuration-style API (like UIButton.configuration) available for other UIKit or AppKit components?
In UIKit, UIButton provides a configuration property which allows us to create and customize a UIButton.Configuration instance independently (on a background thread or elsewhere) and later assign it to a UIButton instance. This separation of configuration and assignment is very useful for clean architecture and performance optimization. Questions: Is this configuration-style pattern (creating a configuration object separately and assigning it later) available or planned for other UIKit components such as UILabel, UITextField, UISlider, etc.? Similarly, in AppKit on macOS, are there any components (e.g. NSButton, NSTextField) that support a comparable configuration object mechanism that can be used the same way — constructed separately and assigned to the view later? This would help in building consistent configuration-driven UI frameworks across Apple platforms. Any insight or official guidance would be appreciated.
0
0
61
Jun ’25
Ios 26 Developer Beta 2 Bugs
Hello Apple Developers and Software enginers Developers I am hee to report two UI Bugs that I have ran in to on version 2 Beta First bug in the UI is when I press and hold the side power button and the volume up button their is a weird animation happening since I am unable to record the lock screen due to security and privacy reason The 3 options show up power off phone something else and something else and then cancel
Topic: UI Frameworks SubTopic: General
1
0
115
Jun ’25
Alternative icons with Icon Composer
Hello dear Apple Engineers and fellow developers. Today I was crafting my new App Icon with Icon Composer and I was wondering how I can support alternative App Icons. I couldn't find any documentation about it yet. Is it already supported? Will it be supported soon?
Topic: UI Frameworks SubTopic: General
3
0
151
Jun ’25
macOS UIApplication not in scope
I'm trying to disable the sleep timer when a button is pressed in my macOS app but the problem is that from the resources I've seen elsewhere the code doesn't work. The code I'm trying is UIApplication.shared.isIdleTimerDisabled = true When I try and run my app I get this error Cannot find 'UIApplication' in scope From what I've managed to search for regarding this it appears that UIApplication might be an iOS thing, but how can I adapt this for macOS? I've found some code samples from 5+ years ago but it involves lots of code. Surely, in 2025 macOS can disable sleep mode as easy as iOS, right? How can I achieve this please?
Topic: UI Frameworks SubTopic: General Tags:
1
0
70
Jun ’25
Window number too large
I'm trying to get information about my status items window. I get the window number using this call: statusItem.button?.window?.windowNumber With that number I try to determine if it visible or not. On macOS 15, this works fine, however on macOS Tahoe the window number is bigger than UInt32 or its type alias CGWindowID, causing a crash of my app (when converting from Int to UInt32). Somehow the window numbers were always in the 32-bit space. I can only guess about the reasons for increase of the window number beyond the UInt32 bounds. I don't know how the windows are numbered, but something may not be going as expected here. Anyone knows if this may be due to running in a virtual machine?
Topic: UI Frameworks SubTopic: General Tags:
1
0
56
Jun ’25
Background or Foreground
Hi Team! Has anyone found a reliable way to detect CarPlay connection without the app needing to be in the foreground? I’m exploring a concept where, for example, as someone nears home while driving, a prompt appears on the CarPlay screen asking “Would you like to turn on the lights / open garage?” triggered by proximity and CarPlay connection. Would be cool to have it work automatically, but knowing you're in the car is kind of important. From what I can see, apps can’t reliably detect CarPlay connection unless they’re actively open on the CarPlay screen. Most background detection methods (like external screen connect notifications) appear deprecated. That is, unless you're specifically approved as a "messaging" or "navigation" app that appear to get special privilages to send alerts from the background. If I send an alert (or poll Carplay periodically) it just gives silent/dead response. Is there any approach, framework, entitlement, or UI pattern that could allow a passive trigger or background detection while driving with CarPlay connected? I can't see any way to bring an app to the foreground either. Not looking to abuse any rules... just want to understand if anyone’s found a clean, approved workaround. Thanks in advance!
0
0
66
Jun ’25
SwiftData .deny deleteRule not working
I tried to use the .deny deleteRule but it seems to have no effect. The toolbar button adds an item with a relationship to a category to the context. Swiping on the category deletes the category even though an item is referencing the category. There is also no error thrown when saving the context. It is as if the deleteRule was not there. For other deleteRules like .cascade, the provided sample code works as expected. import SwiftUI import SwiftData @Model class Category { var name: String @Relationship(deleteRule: .deny) var items: [Item] = [] init(name: String) { self.name = name } } @Model class Item { var name: String var category: Category? init(name: String, category: Category) { self.name = name self.category = category } } struct DenyDeleteRule: View { @Environment(\.modelContext) private var modelContext @Query private var categories: [Category] @Query private var items: [Item] var body: some View { List { Section("Items") { ForEach(items) { item in Text(item.name) } } Section("Categories") { ForEach(categories) { category in VStack(alignment: .leading) { Text(category.name).bold() ForEach(category.items) { item in Text("• \(item.name)") } } } .onDelete(perform: deleteCategory) } } .toolbar { Button("Add Sample") { let category = Category(name: "Sample") let item = Item(name: "Test Item", category: category) modelContext.insert(item) } } } func deleteCategory(at offsets: IndexSet) { for index in offsets { let category = categories[index] modelContext.delete(category) do { try modelContext.save() } catch { print(error) } } } } #Preview { NavigationStack { DenyDeleteRule() } .modelContainer(for: [Item.self, Category.self], inMemory: true) }
1
0
61
Jun ’25
Detect when app window is being moved
Is there a way to detect when your apps (or any app I guess) is being moved by the user clicking and dragging the main window around the desktop at all? I'm trying to find out if there's a way I can find out if a window is being clicked and dragged and whether there's certain triggers to the movement a little bit like shaking an iPhone with Shake to Undo. Thanks
0
0
43
Jun ’25
How to show lanes in carplay programatically
Hello all, I'm confused about how to show lanes in CarPlay. I understand CPLaneGuidance and CPLane I don't find anywhere where to tell Carplay which icon to show for each lane. I've found some information saying we put the icon in CPManeuver, but then CPManeuver is linked to only one CPLaneGuidance, and we can put only one icon in CPManeuver. At the same time, we might have multiple lanes. Any help, tips, or examples would be highly helpful.
0
0
44
Jun ’25