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

Created

StoreKit does not return any subscriptions on any device (approved IAPs, production app)
Hello, I’m reaching out after several days of investigation, as I’ve exhausted all standard troubleshooting steps and would truly appreciate guidance from Apple engineers or experienced developers. I am experiencing a persistent issue where StoreKit does not return any subscription products on any device, despite all subscriptions being fully approved and correctly configured in App Store Connect. What is happening • Auto-renewable subscriptions exist and are approved in App Store Connect • The app is installed from the production App Store (not TestFlight, not sandbox) • initConnection / StoreKit initialization succeeds • Requests for products/subscriptions return an empty result (no errors, no IDs) • In the UI, prices are shown as “Unavailable” • This behavior is 100% reproducible on every device, every Apple ID, every network Important detail This issue is not device-specific, account-specific, or environment-specific: • Tested on multiple iPhones • Tested with different Apple IDs • Tested on different networks • Same result every time — no subscriptions returned Why I believe this is not a code issue The exact same symptoms previously occurred on Google Play, where the root cause turned out to be a store-side configuration flag blocking billing visibility, not an application bug. Because: • StoreKit initializes correctly • No runtime errors occur • The issue is global across devices and users …I strongly suspect there may be an App Store Connect / StoreKit configuration, availability, storefront, agreement, or propagation-related factor that is preventing StoreKit from returning the products at runtime. Is there any known App Store Connect or StoreKit condition where: • subscriptions are approved and visible in App Store Connect • but StoreKit returns an empty result set in production? If so, I would be extremely grateful for guidance on where exactly to verify or correct this. Thank you very much for your time and support — any insight would be hugely appreciated. Kind regards, Mateusz
Topic: UI Frameworks SubTopic: General
4
0
128
4w
How to correctly move a TextField selection cursor when inserting UTF16 text
I'm trying to implement a feature whereby a user can tap a button to insert a character at the cursor in a TextField - the cursor then needs to be moved forward to be in front of the insert character. I'm having trouble with characters such as π which are UTF16 encoded. In the following sample app, enter the following sequence: Enter 9 by keyboard tap + Enter 9 by keyboard tap π Enter 9 via keyboard tap + he TextField will show '9+9π+9' (i.e. the final + is inserted before 9 rather than after it. Any insight into what I am doing wrong? import SwiftUI @main struct TextInsertApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State private var text: String = "" @State private var selection: TextSelection? = nil var body: some View { TextField("", text: $text, selection: $selection) .background(.gray.opacity(0.4)) Button("+") { insert("+") } Button("π") { insert("π") } } func insert(_ insertString: String) { if let selection { if case let .selection(range) = selection.indices { if selection.isInsertion { text.insert(contentsOf: insertString, at: range.lowerBound) } else { text.replaceSubrange(range, with: insertString) } let cursor = text.utf16.index(range.upperBound, offsetBy: insertString.count) self.selection = .init(insertionPoint: cursor) } } else { text += insertString selection = .init(range: text.utf16.endIndex..<text.utf16.endIndex) } } }
1
0
164
4w
NSPathControl -setURL: crash on macOS Tahoe
I received the following crash: Thread 0 Crashed: libsystem_kernel.dylib __pthread_kill + 8 libsystem_pthread.dylib pthread_kill + 296 (pthread.c:1721) libsystem_c.dylib abort + 124 (abort.c:122) libc++abi.dylib __abort_message + 132 (abort_message.cpp:66) libc++abi.dylib demangling_terminate_handler() + 304 (cxa_default_handlers.cpp:76) libobjc.A.dylib _objc_terminate() + 156 (objc-exception.mm:496) libc++abi.dylib std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59) libc++abi.dylib __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88 (cxa_exception.cpp:152) libc++abi.dylib __cxa_throw + 92 (cxa_exception.cpp:299) libobjc.A.dylib objc_exception_throw + 448 (objc-exception.mm:385) Foundation -[NSConcreteMutableAttributedString initWithString:] + 268 (NSAttributedString.m:1049) CloudDocs -[BRCloudPathComponentDisplayMetadata initWithDisplayName:suffix:url:icon:] + 180 (BRCloudPathComponentDisplayMetadata.m:75) CloudDocs -[NSURL(BRCloudPathComponent) br_pathComponentDisplayMetadataWithOptions:]_block_invoke + 516 (BRCloudPathComponentDisplayMetadata.m:292) CloudDocs -[NSArray(BRAdditions) br_transform:keepNull:] + 228 (NSArray+BRAdditions.m:20) CloudDocs -[NSURL(BRCloudPathComponent) br_pathComponentDisplayMetadataWithOptions:] + 76 (BRCloudPathComponentDisplayMetadata.m:276) AppKit -[NSPathCell _autoUpdateCellContents] + 2080 (NSPathCell.m:442) AppKit -[NSPathCell setURL:] + 76 (NSPathCell.m:599) AppKit -[NSPathControl setURL:] + 64 (NSPathControl.m:366) I tried reproducing on my end by passing various URLs in iCloud Drive to an NSPathControl, file reference urls, attempting to evict a URL from iCloud Drive then settings the URL property without luck. Setting the URL to nil does not crash (the property is nullable). I have no idea how to trigger that code path. Anyone else run into this and have a workaround?
2
0
55
4w
Navigation title is not visible in root of navigation stack of UITabBarController using UITab layout on iPad
Description Title of the view controller is not displayed for the 1st view controller in navigation stack. Is there a way to show it? Main problem is that selected tab is a UITabGroup and there's no way to understand which child of it is currently selected without opening the sidebar or guessing by the content. Human Interface Guidelines In the guidelines there are examples with title visible on the iPad in similar case: https://developer.apple.com/design/human-interface-guidelines/tab-bars Code import UIKit import SwiftUI struct TestView: View { var tab: UITab? let id = UUID() var body: some View { ScrollView { HStack { Spacer() VStack { Text(tab?.title ?? id.uuidString) } Spacer() } .frame(height: 1000) .background(.red) .onTapGesture { tab?.viewController?.navigationController?.pushViewController( TestViewController(nil), animated: true ) } } } } class TestViewController: UIHostingController<TestView> { let _tab: UITab? init(_ tab: UITab?) { self._tab = tab super.init(rootView: TestView(tab: _tab)) } @MainActor @preconcurrency required dynamic init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() navigationItem.title = _tab?.title ?? "tab-nil" } } class ViewController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() mode = .tabSidebar let provider: (UITab) -> UIViewController = { tab in print(tab) return TestViewController(tab) } let tab1 = UITabGroup( title: "Tab 1", image: UIImage(systemName: "1.square.fill"), identifier: "tab1", children: [ UITab(title: "Sub 1", image: UIImage(systemName: "1.circle"), identifier: "First Tab", viewControllerProvider: provider), UITab(title: "Sub 2", image: UIImage(systemName: "2.circle"), identifier: "Second Tab", viewControllerProvider: provider) ]) tab1.selectedChild = tab1.children[0] tab1.managingNavigationController = UINavigationController() let tab2 = UITabGroup( title: "Tab 2", image: UIImage(systemName: "2.square.fill"), identifier: "Section one", children: [ UITab( title: "Sub 1", image: UIImage(systemName: "a.circle"), identifier: "Section 1, item A", viewControllerProvider: provider), UITabGroup(title: "Sub Group", image: nil, identifier: "q", children: [ UITab( title: "Item 1", image: UIImage(systemName: "b.circle"), identifier: "c1", viewControllerProvider: provider), UITab( title: "Item 2", image: UIImage(systemName: "b.circle"), identifier: "c2", viewControllerProvider: provider) ], viewControllerProvider: provider ), ] ) tab2.selectedChild = tab2.children[0] tab2.managingNavigationController = UINavigationController() tabs = [ tab1, tab2, ] selectedTab = tab1 } }
Topic: UI Frameworks SubTopic: UIKit
4
0
261
4w
CGContextDrawShading broken on MacOS Tahoe for apps built with MacOS SDK older than 14.5
On MacOS Tahoe (26.0 26.1 or 26.2), when loading an application that was built with an SDK older than version SDK 14.5, all CGContextDrawShading calls to draw onto the screen (inside of NSView drawRect:) fail silently, filling the path with a single color instead of a gradient. If rendering into a local CGBitmapContext instead of the NSView context on Tahoe, CGShading works as expected. On MacOS 15 and earlier, CGShading works as expected too. If the app is built with SDK version 14.5 or newer, CGShading works normally on MacOS Tahoe. For recent applications, they can of course be rebuilt with a more recent version of the SDK, which fixes the problem. However for Audio Units or any other type of plug-in, even if they are built with the "appropriate" SDK, if they are loaded inside of a legacy application that was built with an older SDK, the problem arises, which customers complain about and do not understand. I have noticed that there had been a few changes in MacOS Tahoe regarding the CGShading APIs, could this problem be related? If this issue cannot be fixed in an upcoming MacOS update, is there maybe a "defaults" value that can be changed? (since this behaviour is specific to a sdk version, I guess that it is triggered by a version check in the Frameworks and that there is a "defaults" value that can be changed to avoid this specific behaviour, as it is usually the case via a DefaultValueFunction)? I have already opened a feedback regarding this issue, but maybe someone already has a solution for this problem?
Topic: UI Frameworks SubTopic: AppKit
1
1
114
4w
Setting alternate app icon fails with "Ressource temporarily not available"
Switching alternative app icons previously worked in my app and I did not notice when it broke. However now the completion handler consistently returns this error if feeding with either an existing app icon name or a fictional one. Is this a regression I should file a bug report for or am I doing something wrong here? Include all app icon assets is enabled in the target Below you can see the error, the .icon files placed in the project navigator, my code and the top of the Info.plist Thank you Button("Update icon") { UIApplication.shared.setAlternateIconName("appIcon_Heart") { error in if let error { print(error) } } } Error Domain=NSPOSIXErrorDomain Code=35 "Resource temporarily unavailable" UserInfo={_LSFile=LSIconAlertManager.m, _LSLine=113, _LSFunction=-[LSIconAlertManager iconChangeAlertTokenForIdentity:error:]} Xcode seems to create the correct Info.plist entries. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>BGTaskSchedulerPermittedIdentifiers</key> <array> <string>newReleasesBackgroundTask</string> </array> <key>BuildMachineOSBuild</key> <string>24G90</string> <key>CFBundleDevelopmentRegion</key> <string>de</string> <key>CFBundleDisplayName</key> <string>Hörspielzentrale</string> <key>CFBundleExecutable</key> <string>Hoerspielzentrale</string> <key>CFBundleIcons</key> <dict> <key>CFBundleAlternateIcons</key> <dict> <key>appIcon_Heart</key> <dict> <key>CFBundleIconName</key> <string>appIcon_Heart</string> </dict> <key>appIcon_RedNoCircle</key> <dict> <key>CFBundleIconName</key> <string>appIcon_RedNoCircle</string> </dict> <key>appIcon_WhiteNoCircle</key> <dict> <key>CFBundleIconName</key> <string>appIcon_WhiteNoCircle</string> </dict> </dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <string>AppIcon60x60</string> </array> <key>CFBundleIconName</key> <string>AppIcon</string> </dict> </dict> <key>CFBundleIcons~ipad</key> <dict> <key>CFBundleAlternateIcons</key> <dict> <key>appIcon_Heart</key> <dict> <key>CFBundleIconName</key> <string>appIcon_Heart</string> </dict> <key>appIcon_RedNoCircle</key> <dict> <key>CFBundleIconName</key> <string>appIcon_RedNoCircle</string> </dict> <key>appIcon_WhiteNoCircle</key> <dict> <key>CFBundleIconName</key> <string>appIcon_WhiteNoCircle</string> </dict> </dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <string>AppIcon60x60</string> <string>AppIcon76x76</string> </array> <key>CFBundleIconName</key> <string>AppIcon</string> </dict> </dict>
Topic: UI Frameworks SubTopic: UIKit
2
1
240
4w
SwiftUI using Mac Catalyst destination the destination but provided destination is iPhone 17 Pro
Using SwiftIUI with CommandGroup for iPad app on Xcode Version 26.2 (17C52). I tried to test on Mac Catalyst. Output view is iPad size but my SwiftUI view is small on the left. I tried to override the frame size used but none of the suggested ways compiled. Used both "Scaled for iPad" and "Optimized for Mac" in deployment Info with same results.
1
0
65
4w
NSHostingView stops receiving mouse events when layered above another NSHostingView (macOS Tahoe 26.2)
I’m running into a problem with SwiftUI/AppKit event handling on macOS Tahoe 26.2. I have a layered view setup: Bottom: AppKit NSView (NSViewRepresentable) Middle: SwiftUI view in an NSHostingView with drag/tap gestures Top: Another SwiftUI view in an NSHostingView On macOS 26.2, the middle NSHostingView no longer receives mouse or drag events when the top NSHostingView is present. Events pass through to the AppKit view below. Removing the top layer immediately restores interaction. Everything works correctly on macOS Sequoia. I’ve posted a full reproducible example and detailed explanation on Stack Overflow, including a single-file demo: Stack Overflow post: https://stackoverflow.com/q/79862332 I also found a related older discussion here, but couldn’t get the suggested workaround to apply: https://developer.apple.com/forums/thread/759081 Any guidance would be appreciated. Thanks!
4
0
333
4w
BUG: Toolbar Rendering Bug -- ToolbarItem Duplication when Back Button Hidden
To whom it may concern that deals with bugs in SwiftUI for iOS 26: Inadvertently discovered a bug which duplicates ToolbarItem in any placement in the toolbar when navigationBarBackButtonHidden is set to true. .toolbar{ ToolbarItem(placement: .confirmationAction) { Button("Stop", systemImage: "stop.fill"){ //some action } } } .navigationBarBackButtonHidden(true) Expected Behavior Show the ToolbarItem Actual Behavior Duplicates items in the placement position. Thank you.
1
0
145
4w
Alternative Methods to Display App Icon in Core Spotlight Search Results Besides CFBundleDocumentTypes
I'm developing an iOS app that handles custom file types (e.g., .k files), and I want to ensure my app's icon appears in Core Spotlight search results, similar to how 两步路户外助手's icon shows up for associated files (as shown in the attached screenshot from iOS search). I know one standard way is to configure CFBundleDocumentTypes in the Info.plist to declare supported document types, which allows the system to associate files with my app and display the icon in search. However, I'm looking for alternative approaches or additional configurations that could achieve this without relying solely on CFBundleDocumentTypes, or perhaps in combination with it for better integration. For context: This is for iOS 26+ (or latest versions). The goal is to have the app icon visible directly in Spotlight/Core Spotlight results when searching for files or content indexed by my app. I've tried basic NSUserActivity and CSSearchableItem indexing, but the icon doesn't always appear as expected for file associations. Has anyone implemented this through other means, like exported UTIs, Launch Services, or custom searchable attributes? Any code snippets, documentation links, or best practices would be appreciated! (Attach your Figure 2 screenshot here to illustrate the desired behavior, e.g., the .k file with the app icon in search results.)
1
0
168
4w
NavigationStack back button ignores tint when presented in sheet
[Also submitted as FB21536505] When presenting a NavigationStack inside a .sheet, applying .tint(Color) does not affect the system back button on pushed destinations. The sheet’s close button adopts the tint, but the back chevron remains the default system color. REPRO Create a new iOS project and replace ContentView.swift with the code below. —or— Present a .sheet containing a NavigationStack. Apply .tint(.red) to the NavigationStack or sheet content. Push a destination using NavigationLink. EXPECTED The back button chevron adopts the provided tint color, consistent with other toolbar buttons and UIKit navigation behavior. ACTUAL The back button chevron remains the default system color. NOTES Reproduces consistently on: iOS 26.2 (23C54) iOS 26.3 (23D5089e) SCREEN RECORDING SAMPLE CODE import SwiftUI struct ContentView: View { @State private var isSheetPresented = false var body: some View { Button("Open Settings Sheet") { isSheetPresented = true } .sheet(isPresented: $isSheetPresented) { NavigationStack { List { NavigationLink("Push Detail") { DetailView() } } .navigationTitle("Settings") .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .automatic) { Button("Close", systemImage: "xmark") { isSheetPresented = false } } } } .tint(.red) } } } private struct DetailView: View { var body: some View { List { Text("Detail View") } .navigationTitle("Detail") .navigationBarTitleDisplayMode(.inline) } }
3
1
131
Jan ’26
Crash in swift::_getWitnessTable when passing UITraitBridgedEnvironmentKey
When using UITraitBridgedEnvironmentKey to pass a trait value to the swift environment, it causes a crash when trying to access the value from the environment. The issue seems to be related to how swift uses the UITraitBridgedEnvironmentKey protocol since the crash occurs in swift::_getWitnessTable () from lazy protocol witness table accessor…. It can occur when calling any function that is generic using the UITraitBridgedEnvironmentKey type. I originally encountered the issue when trying to use a UITraitBridgedEnvironmentKey in SwiftUI, but have been able to reproduce the issue with any function with a similar signature. https://developer.apple.com/documentation/swiftui/environmentvalues/subscript(_:)-9zku Steps to Reproduce Requirements for the issue to occur Project with a minimum iOS version of iOS 16 Build the project with Xcode 26 Run on iOS 18 Add the following code to a project and call foo(key: MyCustomTraitKey.self) from anywhere. @available(iOS 17.0, *) func foo<K>(key: K.Type) where K: UITraitBridgedEnvironmentKey { // Crashes before this is called } @available(iOS 17.0, *) public enum MyCustomTraitKey: UITraitBridgedEnvironmentKey { public static let defaultValue: Bool = false public static func read(from traitCollection: UITraitCollection) -> Bool { false } public static func write(to mutableTraits: inout UIMutableTraits, value: Bool) {} } // The crash will occur when calling this. It can be added to a project anywhere // The sample project calls it from scene(_:willConnectTo:options:) foo(key: MyCustomTraitKey.self) For example, I added it to the SceneDelegate in a UIKit Project class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { if #available(iOS 17, *) { // The following line of code can be placed anywhere in a project, `SceneDelegate` is just a convenient place to put it to reproduce the issue. foo(key: MyCustomTraitKey.self) // ^ CRASH: Thread 1: EXC_BAD_ACCESS (code=1, address=0x10) } } } Actual Behaviour The app crashes with the stack trace showing the place calling foo but before foo is actually called. (ie, a breakpoint or print in foo is never hit) #0 0x000000019595fbc4 in swift::_getWitnessTable () #1 0x0000000104954128 in lazy protocol witness table accessor for type MyCustomTraitKey and conformance MyCustomTraitKey () #2 0x0000000104953bc4 in SceneDelegate.scene(_:willConnectTo:options:) at .../SceneDelegate.swift:20 The app does not crash when run on iOS 17, or 26 or when the minimum ios version is raised to iOS 17 or higher. It also doesn't crash on iOS 16 since it's not calling foo since UITraitBridgedEnvironmentKey was added in iOS 17. Expected behaviour The app should not crash. It should call foo on iOS 17, 18, and 26.
4
1
131
Jan ’26
macOS Tahoe WKWebView - NSPrintOperation EXC_BREAKPOINT with Lots of Error Logging
Running print operation on WKWebView I hit EXC_BREAKPOINT and there is all kinds of console spew that looks concerning: ERROR: The NSPrintOperation view's frame was not initialized properly before knowsPageRange: returned. (WKPrintingView) ** CGContextClipToRect: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.** WebContent[7743] networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception. CRASHSTRING: XPC_ERROR_CONNECTION_INVALID from launchservicesd CRASHSTRING: rdar://problem/28724618 Process unable to create connection because the sandbox denied the right to lookup com.apple.coreservices.launchservicesd and so this process cannot talk to launchservicesd. WebContent[7921] The sandbox in this process does not allow access to RunningBoard. Safe to ignore all this?
4
0
211
Jan ’26
SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue
I built this very simple example to demonstrate the issue im facing on iOS 26 when trying to use custom ToolbarItem element for .largeTitle. Code: struct ContentView: View { var body: some View { NavigationStack { Screen() .navigationTitle("First") .toolbar { ToolbarItem(placement: .largeTitle) { Text("First") .font(.largeTitle) .border(Color.black) } } .navigationDestination(for: Int.self) { integer in DestinationScreen(integer: integer) } } } } struct Screen: View { var body: some View { List { ForEach(1..<50) { index in NavigationLink(value: index) { Text(index.description) .font(.largeTitle) } } } } } struct DestinationScreen: View { let integer: Int var body: some View { HStack { Text(integer.description) .font(.largeTitle) Spacer() } .padding() .navigationTitle(integer.description) .toolbar { ToolbarItem(placement: .largeTitle) { Text(integer.description) .font(.largeTitle) .border(Color.black) } } } } As shown on the gif, when navigating between pages, titles are going to overlap for a short while. Other questions: Why is it required for .navigationTitle() to exist (empty string wouldn't work!) so that the ToolbarItem .largeTitle can render at all? If none is added, this ToolbarItem simply won't appear Why isn't the large title naturally aligning to the leading side? Apple doc. doesn't mention any of this behaviour as far as I know but in general these placement should replicate known established behaviours, and .largeTitle should be leading aligned. Another issue is shown on the image below. When using both .largeTitle and .title (to simulate the same behaviour of transition between large and inline title when scrolling), both will appear at the same time. The large title will disappear as you scroll down which is fine.
Topic: UI Frameworks SubTopic: SwiftUI
1
0
104
Jan ’26
Modify the default gradient background of toolbar in iOS26
In the new iOS 26 design, the navigation bar and tab bar will have a dark gradient background. We found that the color of this gradient depends on the background color of the page. For example, in the following page, our background color is green, so the navigation bar and tab bar will change the gradient to green. Is there any way to change this gradient color? I tried .toolbarBackground(.hidden, for: .navigationBar), but does not work。 I tried .toolbarBackground(LinearGradient(colors: [.black.opacity(0.4), .black.opacity(0)], startPoint: .top, endPoint: .bottom), for: .navigationBar), but it looks like the default gradient is the superposition of the gradient I defined, not a replacement.
Topic: UI Frameworks SubTopic: SwiftUI
1
0
123
Jan ’26
Using @Environment with TabView
Let me ask the general question first, then explain the context... Each Tab of a TabView defines a separate View hierarchy. (I'm assuming that the root view of each Tab defines its own NavigationStack.) Since an @Environment is supposed to serve data to the child views in its view hierarchy, does this mean that it is possible to define Environments in each tab's root view with the same name (i.e. key) but different values? (I.e., I want a subview to access an environment value for the current view hierarchy without requiring that the subview have any knowledge of which hierarchy it is being called from.) The actual use case has to do with using @Environment in a tabbed application to inject a router in subviews. (Each Tab has its own NavigationStack and its own NavigationPath.) I have an @Observable router class which manages a NavigationPath.. The root view of each Tab in the application has its own instance of that router object (and hence, it's own NavigationPath). I want to inject that router into all of the subviews in each Tab's view hierarchy, so that I can use path-based navigation. My current implementation injects the router throughout the view hierarchies via constructor injection. This works, but is a real pain and includes a bunch of duplicate code. I would like to use @Environment injection instead, but this can only work if @Environment stores its EnvironmentValues on a per view-hierarchy (rather than a per-application) basis. So, can this approach work? what experience can you share concerting router-based navigation in a TabView-based app? Thanks.
2
0
174
Jan ’26
DisplayRepresentation.Image(systemName:tintColor:) ignores or misapplies tintColor since iOS 18
DisplayRepresentation.Image(systemName:tintColor:symbolConfiguration:) no longer applies the provided tintColor reliably since iOS 18. Observed behavior by OS version: iOS 17: SF Symbol tint is applied consistently as expected. iOS 18: SF Symbol tint is inconsistent and sometimes appears with incorrect or seemingly random colors instead of the provided tintColor. iOS 26: SF Symbol is rendered without any tint (default monochrome), completely ignoring the provided tintColor. This appears to be a regression in how App Intents renders DisplayRepresentation.Image with tinting across OS versions. iOS17.5: iOS 18.6: iOS26: Code: import AppIntents import UIKit struct CategoryEntity: AppEntity, Hashable { var id: Category.ID var name: String var icon: Int? var color: Int? var parentCategoryName: String? init(from category: Category) { self.id = category.id self.name = category.name self.icon = category.icon self.color = category.parent?.color ?? category.color self.parentCategoryName = category.parent?.name } var displayRepresentation: DisplayRepresentation { DisplayRepresentation( title: "\(name)", subtitle: parentCategoryName.map { "\($0)" }, image: .init( systemName: Icon.sfSymbolName(from: icon), tintColor: ColorTag.from(color) ) ) } static let typeDisplayRepresentation: TypeDisplayRepresentation = "Category" static let defaultQuery = CategoryQuery() } [Documentation API] (https://developer.apple.com/documentation/appintents/displayrepresentation/image-swift.struct/init(systemname:tintcolor:symbolconfiguration:)-3snvy?changes=_5)
1
0
292
Jan ’26
Task cancellation behavior
Hi everyone, I believe this should be a simple and expected default behavior in a real-world app, but I’m unable to make it work: I have a View (a screen/page in this case) that calls an endpoint using async/await. If the endpoint hasn’t finished, but I navigate forward to a DetailView, I want the endpoint to continue fetching data (i.e., inside the @StateObject ViewModel that the View owns). This way, when I go back, the View will have refreshed with the fetched data once it completes. If the endpoint hasn’t finished and I navigate back to the previous screen, I want it to be canceled, and the @StateObject ViewModel should be deinitialized. I can achieve 1 and 3 using the .task modifier, since it automatically cancels the asynchronous task when the view disappears: view .task { await vm.getData() } I can achieve 1 and 2 using a structured Task in the View (or in the ViewModel, its the same behavior), for example: .onFirstAppearOnly { Task { away vm.getData() } } onFirstAppearOnly is a custom modifier that I have for calling onAppear only once in view lifecycle. Just to clarify, I dont think that part is important for the purpose of the example My question is: How can I achieve all three behaviors? My minimum deployment target is iOS 15, and I’m using NavigationView + NavigationLink. However, I have also tried using NavigationStack + NavigationPath and still couldn’t get it to work. Any help would be much appreciated. Thank you!
0
0
153
Jan ’26
Keyboard does not appear in SFSafariViewController on iPad (App supports iPhone only)
Hello, I am experiencing an issue related to SFSafariViewController during App Store review, and I would like to ask whether this could be an OS-level behavior or a known issue. App context Our app supports iPhone only During App Review, the reviewer tested the app on an iPad The app was rejected because the keyboard did not appear Issue description The problematic screen presents a sign-up web page using SFSafariViewController When tapping the nickname input field: The keyboard area appears (the layout shifts as if the keyboard will be shown) However, the actual keyboard does not appear Reproducibility We tested this issue on our own physical devices and on iPad simulators with the same app configuration However, we are unable to reproduce the issue in either environment What we have checked The web page uses a standard HTML There is no custom keyboard handling or keyboard-related logic in the app The app simply presents SFSafariViewController with a URL Locale-related question The URL includes a locale parameter (e.g. LOCALE=US) Could the app’s locale, system language, or region settings affect keyboard behavior in SFSafariViewController? Is it possible that a specific locale or language configuration on iPad could cause the keyboard to fail to appear? Questions Is there any known issue or OS-level behavior where the keyboard may fail to appear in SFSafariViewController on iPad? Could this be related to: Locale / language / region settings iPad multitasking or keyboard modes External keyboard state Specific iPadOS versions Are there any recommended workarounds or defensive implementations for this scenario? Any insights or similar experiences would be greatly appreciated. Thank you.
Topic: UI Frameworks SubTopic: General
0
0
144
Jan ’26