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

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
2
0
76
3w
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
73
3w
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
59
3w
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
149
3w
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
472
3w
iOS 18 hit testing functionality differs from iOS 17
I created a Radar for this FB14766095, but thought I would add it here for extra visibility, or if anyone else had any thoughts on the issue. Basic Information Please provide a descriptive title for your feedback: iOS 18 hit testing functionality differs from iOS 17 What type of feedback are you reporting? Incorrect/Unexpected Behavior Description: Please describe the issue and what steps we can take to reproduce it: We have an issue in iOS 18 Beta 6 where hit testing functionality differs from the expected functionality in iOS 17.5.1 and previous versions of iOS. iOS 17: When a sheet is presented, the hit-testing logic considers subviews of the root view, meaning the rootView itself is rarely the hit view. iOS 18: When a sheet is presented, the hit-testing logic changes, sometimes considering the rootView itself as the hit view. Code: import SwiftUI struct ContentView: View { @State var isPresentingView: Bool = false var body: some View { VStack { Text("View One") Button { isPresentingView.toggle() } label: { Text("Present View Two") } } .padding() .sheet(isPresented: $isPresentingView) { ContentViewTwo() } } } #Preview { ContentView() } struct ContentViewTwo: View { @State var isPresentingView: Bool = false var body: some View { VStack { Text("View Two") } .padding() } } extension UIWindow { public override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { /// Get view from superclass. guard let hitView = super.hitTest(point, with: event) else { return nil } print("RPTEST rootViewController = ", rootViewController.hashValue) print("RPTEST rootViewController?.view = ", rootViewController?.view.hashValue) print("RPTEST hitView = ", hitView.hashValue) if let rootView = rootViewController?.view { print("RPTEST rootViewController's view memory address: \(Unmanaged.passUnretained(rootView).toOpaque())") print("RPTEST hitView memory address: \(Unmanaged.passUnretained(hitView).toOpaque())") print("RPTEST Are they equal? \(rootView == hitView)") } /// If the returned view is the `UIHostingController`'s view, ignore. print("MTEST: hitTest rootViewController?.view == hitView", rootViewController?.view == hitView) print("MTEST: -") return hitView } } Looking at the print statements from the provided sample project:
 iOS 17 presenting a sheet from a button tap on the ContentView(): RPTEST rootViewController's view memory address: 0x0000000120009200 RPTEST hitView memory address: 0x000000011fd25000 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false RPTEST rootViewController's view memory address: 0x0000000120009200 RPTEST hitView memory address: 0x000000011fd25000 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false iOS 17 dismiss from presented view: RPTEST rootViewController's view memory address: 0x0000000120009200 RPTEST hitView memory address: 0x000000011fe04080 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false RPTEST rootViewController's view memory address: 0x0000000120009200 RPTEST hitView memory address: 0x000000011fe04080 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false iOS 18 presenting a sheet from a button tap on the ContentView(): RPTEST rootViewController's view memory address: 0x000000010333e3c0 RPTEST hitView memory address: 0x0000000103342080 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false RPTEST rootViewController's view memory address: 0x000000010333e3c0 RPTEST hitView memory address: 0x000000010333e3c0 RPTEST Are they equal? true MTEST: hitTest rootViewController?.view == hitView true You can see here ☝️ that in iOS 18 the views have the same memory address on the second call and are evaluated to be the same. This differs from iOS 17. iOS 18 dismiss RPTEST rootViewController's view memory address: 0x000000010333e3c0 RPTEST hitView memory address: 0x0000000103e80000 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false RPTEST rootViewController's view memory address: 0x000000010333e3c0 RPTEST hitView memory address: 0x0000000103e80000 RPTEST Are they equal? false MTEST: hitTest rootViewController?.view == hitView false The question I want to ask: Is this an intended change, meaning the current functionality in iOS 18 is expected? Or is this a bug and it's something that needs to be fixed? As a user, I would expect that the hit testing functionality would remain the same from iOS 17 to iOS 18. Thank you for your time.
12
12
3.9k
3w
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
37
3w
CIContext sporadically crashes on macOS 15.4/15.5, iOS 18.4/18.5
We have some rather old code that worked for many years, but recently started to crash sporadically here: The crash looks like this: or Our code is called from many threads concurrently, but as said it worked without any issues until recently. I've found the apparently same crash on iOS at this Reddit post: https://www.reddit.com/r/iOSProgramming/comments/1kle4h4/ios_185_doesnt_fix_cicontext_rendering_crash/ Recap: we believe it started on macOS 18.4 and is still on macOS 18.5. But maybe it was already on macOS 18.3. This matches the observation in the Reddit post well. Should we create a feedback with sysdiagnose? Thanks! :)
13
4
285
3w
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
52
3w
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
97
3w
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
48
3w
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
57
4w
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
46
4w
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
51
4w
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
33
Jun ’25
StoreKit not returning products after IAP localization was re-approved (Adapty: noProductIDsFound)
🔹 Description of the issue: My app uses Adapty to fetch and display in-app subscription products on a paywall. The system has worked perfectly until recently. After I edited the localizations of the subscriptions in App Store Connect, they were temporarily rejected. Since that moment, the products no longer show in the app. Even though I re-submitted the localizations and they were approved, StoreKit still does not return any products, and Adapty returns the error: less CopyEdit AdaptyError(code: 1000, message: "No products were found for provided product ids") 🔹 Error Message: noProductIDsFound — from Adapty SDK when attempting to load paywall products. 🔹 Steps to Reproduce: Open the Aida Nena app (App ID: 6737695739). Sign in with a test account or create a new one. Go to Profile → Subscription. The paywall will show but no products will appear. Logs show Adapty attempting to fetch product IDs but none are found in StoreKit. 🔹 What I’ve Tried: Re-activating the Adapty SDK. Forcing a cache reset via app reinstall. Re-checking App Store Connect: all subscriptions and localizations now show Approved (green). Waiting several hours in case of propagation. Verifying correct product identifiers are in use — they haven’t changed. 🔹 My Hypothesis: The StoreKit product metadata is still not properly refreshed after the rejection and re-approval of the localizations. This is preventing Adapty (and StoreKit) from returning the product data even though the products are live and approved. 🔹 Additional Info: SDK: @adapty/react-native + Adapty iOS SDK under the hood. This seems to be a known edge case among developers after a product's metadata/localization is changed and re-approved. Thanks, I appreciate any help.
1
0
86
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
33
Jun ’25
Some sharing extensions disabled when running iOS app with Mac Catalyst
When I run my iOS app on a Mac using Mac Catalyst, several sharing options that show up on an iOS device in a share sheet are absent on the Mac. Clicking on Edit Extensions, I see Mail, Message and AirDrop, their switches are on and disabled. All three items show up when I share from Safari or Notes. How can I make Mail, Message and AirDrop available? For example, when sharing data, no share extensions are shown. For text, only Simulator, Shortcuts and Copy are shown.
0
0
42
Jun ’25