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

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
111
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
58
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
55
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
65
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
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
105
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
43
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
51
Jun ’25
Please bring back Slide Over & Split View multitasking to standard iPad view
With the latest iPadOS 26 changes, the traditional multitasking experience using Slide Over and Split View has been removed in favor of Stage Manager. While Stage Manager is a great option for some, the old multitasking UI was more intuitive, stable, and ideal for quick productivity. Please consider restoring the classic multitasking gestures as an optional feature or toggle alongside Stage Manager. Many users like myself rely on the traditional layout for studying, work, and multitasking efficiency.
1
0
71
Jun ’25
About CarPlay entitlement of EV
I'm developing a CarPlay version of my app, with the CarPlay EV Charging App entitlement (com.apple.developer.carplay-charging). However, I would like to use the Search template to searching for charging stations — but it seems this template is only available for Navigation Apps(maps). In this case, what is the recommended approach? Is it possible to apply both entitlements simultaneously and use the Search template only?
0
0
34
Jun ’25
App Clip links encoded as a QR Code do not load when scanned on an iPhone camera
Using an App Clip link encoded into a QR Code shows an error when scanning the encoded QR Code on an iPhone or iPad. After being scanned, the App Clip's banner is visible, but a message says: "App Clip Unavailable". Accessing the same App Clip URL via Safari works as expected. I've filed a feedback with more details and screenshots of the issue here: FB17891015 Thanks!
2
4
183
Jun ’25
chartXAxis AxisMark consisting of Month:Year
I have a Chart displaying Counts per Date over 2-3 years. I'd like to have the XAxis mark consist of MM-yy or even MM/nyy. Is this possible? OK, just saw AxisValueLabel(format: .dateTime.month().year()) which gives e.g. Mar 2024. This is good. Better might be Mar 24 (maybe a Y3K problem ;-) or even better Mar. OR Mar 24. 2024 Or best increment the year when it changes. Are any of these alternate formats possible? Thanks, David PS, my current .chartXAxis code .chartXAxis { AxisMarks(values: .stride(by: .month, count: 3)) { value in if value.as(Date.self) != nil { AxisValueLabel(format: .dateTime.month().year()) AxisGridLine() AxisTick() } } }
1
0
80
Jun ’25
openURL:options:completionHandler: Not Opening tel:// Link on iPad with Cellular Data
We are using openURL:options:completionHandler: to open a tel:// number in the dialer to place a call. This works on iPhones and WiFi-only iPads (tested with a iPad Mini 6th Gen), but it is failing to open on an iPad 8th Gen (WiFi + Cellular) running iPadOS 18.5 being used by a customer. Prior to updating the iPad to iPadOS 18, the call worked on iPadOS 15.2 and opened the call in FaceTime as expected. Despite not opening the dialer in iPadOS 18, the completionHandler returns the success parameter as true. canOpenUrl also returns true. We created a small test application that reproduces the issue using the code snippet below in a new application, with the tel schema added to the info.plist Queried URL Schemes. We are currently using Xcode 16.3. Test Steps: Create a new blank application and replace ContentView.swift with the code snippet below Run the test app on a physical iPad 8th Gen (WiFi + Cellular) Tap the "place a test call" button Expected Results: The user is prompted to call the number and is taken to FaceTime to attempt the call. The user may then receive an alert telling them an iPhone must be paired if not already. Alternatively: return success = false in the completionHandler. Actual Results: No action occurs that is visible to the user, and the completionHandler returns success = true. Separately, we should be able to have some method of checking if the device can actually complete a call, i.e. if an iPhone is paired, so that we can correctly show or hide a phone icon in the app based on if the user can place a call. canOpenUrl returns true even if there is not a device paired and the call cannot actually be placed, and there doesn't seem to be a proper method for making that check. Code Snippet: import SwiftUI struct ContentView: View { @State private var showAlert = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Button("Place a test call") { if let url = URL(string: "tel://5555554567") { UIApplication.shared.open(url) { success in if success { print("Call initiated successfully.") } else { showAlert = true } } } } } .padding() .alert("Call Failed", isPresented: $showAlert) { Button("OK") { showAlert = false } } message: { Text("The call could not be initiated.") } } } #Preview { ContentView() }
0
1
119
Jun ’25
CATiledLayer flashes and re-draws entirely when re-drawing a single tile
I have filed a bug report for this (FB17734946), but I'm posting it here verbatim in case others have the same issue and in hopes of getting attention from an Apple engineer sooner. When calling setNeedsDisplayInRect on a CATiledLayer - or a UIView whose backing layer is CATiledLayer - one would expect to re-draw only a region identified by the rect passed to the method. This is even written in the documentation for the class: "Regions of the layer may be invalidated using the setNeedsDisplayInRect: method however the update will be asynchronous. While the next display update will most likely not contain the updated content, a future update will." However, upon calling this method, CATiledLayer redraws whole contents instead of just the tile at the specified rect, and it flashes when doing so. It behaves exactly the same as if one had called setNeedsDisplay without passing any rect; all contents are cleared and re-drawn again. I'm 100% sure I've passed in the correct rect of the exact tile that I need to redraw. I have even tried passing much smaller rects, but still the same. (And yes, the rect I've passed accounts for the current level of detail.) I have found this GitHub repo https://github.com/frankus/NetPhotoScroller, which based on discussion from here https://forums.macrumors.com/threads/catiledlayer-blanks-out-tiles-when-redrawing.1333948/ aims at solving these issues by using two private methods on CATiledLayer class: (void)setNeedsDisplayInRect:(CGRect)r levelOfDetail:(int)level; (BOOL)canDrawRect:(CGRect)rect levelOfDetail:(int)level; I have explored the repo in detail, however I wasn't able to test exactly this code from the GitHub repo. I have tried using those two private methods myself (through an Objective-C class that defines the methods in the header file and then a swift class which inherits it), but I couldn't solve the issue; the flashing and the full re-draw is still there. After doing a lot of research, the conclusion seems to be that one cannot use CATiledLayer with contents that are downloaded remotely, on demand, as tiles are being requested. I have, however, found one interesting thing which seems to work so far: before calling setNeedsDisplayInRect (or just setNeedsDisplay, as they behave the same for CATiledLayer in my testing), cache the current layer's contents, and after calling setNeedsDisplay (or setNeedsDisplayInRect), restore the contents back to the layer. This prevents flashing and preserves any tiles that were drawn at the time of the re-draw. let c = tiledLayer.contents tiledLayer.setNeedsDisplay(tileRect) tiledLayer.contents = c However! Docs clearly state the warning: Do not attempt to directly modify the contents property of a CATiledLayer object. Doing so disables the ability of a tiled layer to asynchronously provide tiled content, effectively turning the layer into a regular CALayer object. I believe this message implies modifying the contents property with some raw content, like image data, and that it may be safe to re-apply the existing contents (which are in my testing of type CAImageProvider) -- but I can't rely on an implementation detail in my production app. I have tested this and confirmed that the bug appears on: iPhone 14 Pro, iOS 18.5 iPhone 13 Pro, iOS 17.5.1 iPhone 5s, iOS 15.8.3 iPad Pro 1st gen, iPadOS 18.4.1 a couple simulator versions I can also confirm that the fix (to re-apply contents property) is also working properly on all these versions. Is this expected behavior, that tiled layer redraws itself entirely instead of redrawing specific tiles? Is it safe to modify contents of a CATiledLayer by re-applying the existing contents? If not, is there an alternative to avoid flashing?
3
0
100
May ’25