I am struggling to change the tint of the back button in an UINavigationItem. In iOS 18.6 it looks like this
while on iOS 26 the same looks like this
I can live without the Dictionary but I'd like to get the blue color back.
In viewDidLoad() I have tried
navigationItem.backBarButtonItem?.tintColor = .link
but this did not work since navigationItem.backBarButtonItem is nil. My second attempt was
navigationController?.navigationBar.tintColor = .link
but this didn't work either.
I have even set the Global Tint to Link Color
but this had no effect either.
Does anyone have an idea how to change the tint of the back button in an UINavigationItem on iOS 26?
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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Hello,
I'm trying to make a white-Label sort of thing for my app, that is: a script runs before the app launches, sets a certain LaunchAgent command that sets and environment variable, and based on that variable's value tha main app's icon changes to a certain logo (change only happens in the dock because changing the icon on disk breaks the signature)
When the app launches it takes a noticeable time until the dock icon changes to what I want, so I worked around that by setting the app's plist property to hide the dock icon and then when the app is launched I call an objc++ function to display the icon in the dock again (this time it displays as the new icon)
The showing happens through [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
The problem happens when I try to close the app, it returns back to the old logo before closing which is what I want to prevent. I tried hiding the app dock icon before closing but even the hiding itself changes the icon before hiding
The hiding happens through [NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
My goal is that the main app icon doesn't appear to the user through the dock, and that the icon that is only visible is the other one that changes during runtime
The reason for this is that I have an app that should be visible differently depending on an environment variable that I set using an installer app. The app is the same for all users with very minor UI adjustments depending on that env variable's value. So instead of creating different versions of the app I'd like to have just 1 version that adjusts differently depending on the env variable's value. Somehow this is the only step left to have a smooth experience
Feel free to ask more clarification questions I'd be happy to help
Thank you
I'm working on a watchOS app using SwiftUI that updates its UI based on regular, time-driven logic. On a real Apple Watch, after the app has been running for ~1 minute, the device enters Always-On / power-saving display mode (screen dimmed, wrist down). From that point on, SwiftUI UI updates become noticeably delayed. The underlying logic continues to run correctly, but the UI only redraws sporadically and often "catches up" once the screen becomes fully active again. The app is running in workout mode, which keeps it alive and maintains WatchConnectivity, but this does not prevent UI redraw throttling. Below is a minimal reproducible example that demonstrates the issue.
PlaybackModel.swift
import SwiftUI
@MainActor
final class PlaybackModel: ObservableObject {
@Published var beat: Int = 0
private var timer: Timer?
func start() {
timer?.invalidate()
timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { _ in
Task { @MainActor in
self.beat += 1
}
}
}
func stop() {
timer?.invalidate()
}
}
ContentView.swift (watchOS)
import SwiftUI
struct ContentView: View {
@StateObject private var model = PlaybackModel()
var body: some View {
VStack {
Text("Beat: \(model.beat)")
.font(.largeTitle)
}
.onAppear {
model.start()
}
.onDisappear {
model.stop()
}
}
}
Observed Behavior
• The beat value continues to increase reliably.
• After the watch enters Always-On / power-saving mode, SwiftUI redraws are delayed or skipped.
• When the screen becomes fully active again, the UI catches up.
Questions:
• Is this UI redraw throttling in Always-On / power-saving mode an unavoidable system limitation on watchOS?
• Is there any supported way to keep consistent SwiftUI update frequency while the app is visible but dimmed?
Are there tools to inspect why a drag-and-drop drop is not triggering in a SwiftUI app?
I've declared .draggable on the dragging view, and .dropDestination on the receiving TabContent Tab view.
This combination of modifiers is working on a smaller demo app that I have, but not on my more complex one.
Is there a means to debug this in SwiftUI? I'd like to see if the drag-and-drop pasteboard actually has what I think it should have on it.
Notably: "TabContent" has a far more restricted list of modifiers that can be used on it.
I was wondering what the recommended way is to persist user settings with SwiftData?
It seems the SwiftData API is focused around querying for multiple objects, but what if you just want one UserSettings object that is persisted across devices say for example to store the user's age or sorting preferences.
Do we just create one object and then query for it or is there a better way of doing this?
Right now I am just creating:
import SwiftData
@Model
final class UserSettings {
var age: Int = 0
var sortAtoZ: Bool = true
init(age: Int = 0, sortAtoZ: Bool = true) {
self.age = age
self.sortAtoZ = sortAtoZ
}
}
In my view I am doing as follows:
import SwiftUI
import SwiftData
struct SettingsView: View {
@Environment(\.modelContext) var context
@Query var settings: [UserSettings]
var body: some View {
ForEach(settings) { setting in
let bSetting = Bindable(setting)
Toggle("Sort A-Z", isOn: bSetting.sortAtoZ)
TextField("Age", value: bSetting.age, format: .number)
}
.onAppear {
if settings.isEmpty {
context.insert(UserSettings(age: 0, sortAtoZ: true))
}
}
}
}
Unfortunately, there are two issues with this approach:
I am having to fetch multiple items when I only ever want one.
Sometimes when running on a new device it will create a second UserSettings while it is waiting for the original one to sync from CloudKit.
AppStorage is not an option here as I am looking to persist for the user across devices and use CloudKit syncing.
When I have a TextField or TextEditor, tapping into it produces these two console entries about 18 times each:
CHHapticPattern.mm:487 +[CHHapticPattern patternForKey:error:]: Failed to read pattern library data: Error Domain=NSCocoaErrorDomain Code=260 "The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSUnderlyingError=0x600000ca1b30 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
<_UIKBFeedbackGenerator: 0x600003505290>: Error creating CHHapticPattern: Error Domain=NSCocoaErrorDomain Code=260 "The file “hapticpatternlibrary.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSURL=file:///Library/Audio/Tunings/Generic/Haptics/Library/hapticpatternlibrary.plist, NSUnderlyingError=0x600000ca1b30 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
My app does not use haptics.
This doesn't appear to cause any issues, although entering text can feel a bit sluggish (even on device), but I am unable to determine relatedness. None-the-less, it definitely is a lot of log noise.
Code to reproduce in simulator (xcode 26.2; ios 26 or 18, with iPhone 16 Pro or iPhone 17 Pro):
import SwiftUI
struct ContentView: View {
@State private var textEntered: String = ""
@State private var textEntered2: String = ""
@State private var textEntered3: String = ""
var body: some View {
VStack {
Spacer()
TextField("Tap Here", text: $textEntered)
TextField("Tap Here Too", text: $textEntered2)
TextEditor(text: $textEntered3)
.overlay(RoundedRectangle(cornerRadius: 8).strokeBorder(.primary, lineWidth: 1))
.frame(height: 100)
Spacer()
}
}
}
#Preview {
ContentView()
}
Tapping back and forth in these fields generates the errors each time.
Thanks,
Steve
The new .searchToolbarBehavior(.minimized) modifier leads to a choppy animation both on device and SwiftUI canvas (iOS 26.2):
I assume this is not the intended behaviour (reported under FB21572657), but since I almost never receive any feedback to my reports, I wanted to see also here, whether you experience the same, or perhaps I use the modifier incorrectly?
struct SwiftUIView: View {
@State var isSearchPresented: Bool = false
@State var searchQuery: String = ""
var body: some View {
TabView {
Tab {
NavigationStack {
ScrollView {
Text(isSearchPresented.description)
}
.navigationTitle("Test")
}
.searchable(text: $searchQuery, isPresented: $isSearchPresented)
.searchToolbarBehavior(.minimize) // **Choppy animation comes from here?**
} label: {
Label("Test", systemImage: "calendar")
}
Tab {
Text("123")
} label: {
Label("123", systemImage: "globe")
}
}
}
}
#Preview {
if #available(iOS 26, *) {
SwiftUIView()
} else {
// Fallback on earlier versions
}
}
Since I moved to Xcode 26.1 and Xcode 26.2 then, my UI tests all fail only for iOS 26+, for both simulator and real device.
Everything worked perfectly with Xcode 26.0, and the code base of the application under test and the test cases are the same. With Xcode 26.0, the tests pass for iOS 26+ and iOS < 26, for both simulator and real device.
In addition, even the Accessibility Inspector tool fails to display the view hierarchy for iOS 26+ with Xcode 26.2. With Xcode 26.0, whatever are the devices and the OS versions, the tool was able to display the view hierarchy. Otherwise the tool is empty even if the device and app are selected.
This failing tests issue occurs both on my local environment and on GitHub Actions runners, excluding the hypothesis I have troubles with my own side.
The error message for failing tests explains the element cannot be found anymore.
Given for example the test case:
@MainActor
func testMakeScreenshotsForDocumentation_Button() {
let app = launchApp()
goToComponentsSheet(app)
waitForButtonToAppear(withWording: "app_components_button_label", app)
tapButton(withWording: "app_components_button_label", app)
tapButton(withWording: "Strong", app)
takeScreenshot(named: "component_button_", ACDC.buttonX, ACDC.buttonY, ACDC.buttonWidth, ACDC.buttonHeight, app)
}
the goToComponentSheet(app) line shows the error:
ActionsDocumentationScreenshots.testMakeScreenshotsForDocumentation_Button()
In details the function:
/// Opens the page of the components, i.e. tap on the 2nd of the tab bar
@MainActor func goToComponentsSheet(_ app: XCUIApplication) {
app.tabBars.buttons.element(boundBy: 1).tap()
}
with the following error on the app.tabBars line:
.../AppTestCase.swift:157 testMakeScreenshotsForDocumentation_Button(): Failed to tap Button (Element at index 1): No matches found for Descendants matching type TabBar from input {(Application, pid: 1883)}
I have the feeling with Xcode 26.2 (and Xcode 26.1) the view hierarchy is not accessible anymore for both XCUITest framework and Accessibility Inspector tool.
Note I have on my side macOS Tahoe 26.1 (25B78) and my GitHub Actions runner are on macOS 26.0.1 (25A362). When I used Xcode 26.0 I was on macOS Tahoe 26.1 (25B78) .
Any ideas? 🙂
When I call this method on a thread that isn`t thread. And chose main thread check on target, The Console show the world :
Main Thread Checker: UI API called on a background thread: -[UIApplication canOpenURL:]
PID: 8818, TID: 10191278, Thread name: (none), Queue name: com.myqueue.canopen, QoS: 0
Backtrace:
4 TestDemo 0x0000000102f6c068 __39-[AppTools isExists:]_block_invoke_3 + 892
5 CoreFoundation 0x000000019e22995c 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 1042780
6 CoreFoundation 0x000000019e12ec98 7519E999-1053-3367-B9D5-8844F6D3BDC6 + 15512
7 TestDemo 0x0000000102f6bba0 __39-[AppTools isExists:]_block_invoke_2 + 424
8 libdispatch.dylib 0x0000000103a4d7fc _dispatch_call_block_and_release + 24
9 libdispatch.dylib 0x0000000103a4ebd8 _dispatch_client_callout + 16
10 libdispatch.dylib 0x0000000103a55b48 _dispatch_lane_serial_drain + 744
11 libdispatch.dylib 0x0000000103a566e4 _dispatch_lane_invoke + 448
12 libdispatch.dylib 0x0000000103a61adc _dispatch_workloop_worker_thread + 1324
13 libsystem_pthread.dylib 0x000000019df72b88 _pthread_wqthread + 276
14 libsystem_pthread.dylib 0x000000019df75760 start_wqthread + 8
Hello everyone,
I have an app that is used in the education sector for high stakes assessment testing. I reviewed a lot of the WWDC2025 information in June, however, it seems we missed something critical in the What's new in UIKIt presentation. That would be the deprecation of UIRequiresFullScreen.
We currently use this in our app and have been using it since iOS/iPad OS 9 when our app was written. The deprecation of this property has caused some major issues in our layout. Keep in mind we are a hybrid app so our mobile app is self-hosting a fullscreen version of WKWebView under the hood. This is common across assessment developers in the education sector.
I removed the property and went through the migration guide (https://developer.apple.com/documentation/technotes/tn3192-migrating-your-app-from-the-deprecated-uirequiresfullscreen-key) and it doesn't appear to be straight forward on how to lock the orientation in landscape. I tried several different approaches:
Requesting the screen orientation lock we had issues where if a user launched it in portrait it would be locked to portrait but we would want to update the display to shift it to landscape as a business requirement supporting both landscape right and landscape left.
We also tried overriding the method supportedInterfaceOrientations and utilizing the .landscape enum with no success. It fires just fine but nothing takes effect.
Backwards compatibility support there is no guidance on backwards compatibility support and Xcode wants us to do an availability check when using some of the new methods for updating geometry. What is the guidance in this case because we support back to iPadOS 16.0 as a business requirement.
Can anyone give us some insight as we are current trying to get ahead of this while 26.3 is still in beta as this would affect our customers deeply because of the UI jank we get as a result of this deprecation.
I am trying to use the UIButtonConfiguration to set the UI state for the button.isEnabled status. I do see the ConfigurationUpdateHandler code below being executed but when the button.isEnabled is set to false, the UI does not reflect the updated backgroundColor. Instead it is a very light gray but the foregroundColor/text is being updated. It seems that the default disabled button treatment is being used despite being set to a different color. Is there a better way to suppress the default UIButton disabled state so I can customize?
[newButton setConfigurationUpdateHandler:^(__kindof UIButton * _Nonnull button) {
UIButtonConfiguration *updatedConfiguration;
if (newButton.configuration != nil) {
updatedConfiguration = newButton.configuration;
if (button.isEnabled) {
updatedConfiguration.baseBackgroundColor = [UIColor darkGrayColor];
updatedConfiguration.baseForegroundColor = [UIColor whiteColor];
} else {
updatedConfiguration.baseBackgroundColor = [UIColor greenColor];
updatedConfiguration.baseForegroundColor = [UIColor blackColor];
}
}
button.configuration = updatedConfiguration;
}];
Topic:
UI Frameworks
SubTopic:
UIKit
Hi there. I am trying to figure out how to make a macOS Tahoe app in SwiftUI with a sidebar. The problem I’m having is that the icons are the wrong size.
If you visually compare the resulting sidebar with any built-in macOS app (Finder, Notes, Mail, Music, etc.) the built-in apps all have larger icons and the spacing is different from my SwiftUI app, which has too small icons and (I think) wrong spacing.
I am trying to figure out what SwiftUI code I need to write to get a sidebar that looks the same as the other built-in macOS Tahoe apps.
It’s also important to note that Tahoe sidebars have larger icons at the top level, and in cases where the items have a disclosure triangle with additional items nested within, the nested icons have smaller icons. I have not figured out how to properly replicate this effect either.
I have spent quite a lot of time on trial-and-error with various combinations of .frame() and .font() modifiers. However, none of the results look quite right to me, and besides that, I think it is fundamentally the wrong approach; the UI or OS should be handling the sizing and spacing automatically, I shouldn’t have to specify it manually, as this is likely to break in past and future OS versions (and it never really looks exactly right in the first place).
I am hoping there is some missing modifier that I am unaware of, which would solve this; or perhaps, some fundamental aspect of making lists in sidebars that I have missed. I would very much appreciate any advice.
If you drop my code below into a new Xcode project, and compare it to a Finder window, you should be able to easily see the problem.
import SwiftUI
struct ContentView: View {
var body: some View {
splitView
}
@ViewBuilder
var splitView: some View {
NavigationSplitView {
sidebar
} detail: {
helloWorld
}
}
@ViewBuilder
var sidebar: some View {
List {
NavigationLink {
helloWorld
} label: {
Label("Test", systemImage: "book")
}
NavigationLink {
helloWorld
} label: {
Label("Test 2", systemImage: "folder")
}
NavigationLink {
helloWorld
} label: {
Label("Test 3", systemImage: "house")
}
DisclosureGroup(
content: {
NavigationLink {
helloWorld
} label: {
Label("Test", systemImage: "book")
}
NavigationLink {
helloWorld
} label: {
Label("Test 2", systemImage: "folder")
}
NavigationLink {
helloWorld
} label: {
Label("Test 3", systemImage: "house")
}
},
label: {
Label("Test 4", systemImage: "document")
}
)
}
}
@ViewBuilder
var helloWorld: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
}
}
#Preview {
ContentView()
}
We can get informed on object changes through conforming to ObservableObject or having the @Observable macro attached to the type’s definition. How do you handle imported code that assumes the other observation technique?
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
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)
}
}
}
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?
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
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
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
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.