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

Activity

Adapting a large UIKit/Objective-C document viewer controller for iPhone Duo on the iOS 27.1 SDK
We ship a mature document viewer (PDF) written mostly in Objective-C with UIKit. It runs on iPhone and iPad and supports multiple scenes. We're planning support for iPhone Duo and would like advice on the right architectural approach before we start. Current structure (simplified) One root viewer view controller (a UIViewController subclass, large and long-lived) owns the document view, search, bookmarks, text-to-speech, presentation mode and similar features. Most of these live in categories and helper modules. Chrome is swapped by size class. A factory picks one of two "toolbars controller" classes based on the trait collection: one for compact, one for regular. The regular one also hosts a tab strip and a sidebar built on the system sidebar UI. When the class it would pick changes, traitCollectionDidChange: tears down the current chrome controller, builds the other one, re-parents the document view into the new container, and then restores tool and presentation state. We skip this while the app isn't active, because UIKit sends trait changes during backgrounding. Geometry changes go through viewWillTransitionToSize:withTransitionCoordinator:, which forwards to the chrome controller, the document view and a zoomed handwriting helper. When the transition completes we recompute content insets and re-render the output for an external display. The document view is a custom scroll-based view (not PDFKit). It has display modes for continuous, single page, two-page spread and two-page spread with a cover page. It calculates its own insets from safe areas and whatever chrome is visible. We still use traitCollectionDidChange: and haven't moved to registerForTraitChanges:. Questions Posture changes and size-class flips. When the device folds or unfolds, should we expect a normal viewWillTransitionToSize: plus a trait change (compact ↔ regular) that our existing swap handles? Or is there a posture/display-configuration signal we should observe instead? Swapping the whole chrome hierarchy in the middle of a fold animation seems costly. Is there a recommended way to defer or coordinate that with the transition coordinator? Hinge or seam area. Is the fold region exposed through safe-area insets, layout guides or a new API? A custom scroll view that lays out two-page spreads needs to keep content out of that region, or line the spread up with it. What's the recommended way to get this geometry from Objective-C? Two-page spread tied to posture. Showing a two-page spread automatically when the device is unfolded (like an open book) seems natural. Does Apple recommend deciding this from traits/posture or from bounds, and is there a trait we can override per view controller? Trait registration. For this form factor, is it effectively required to move from traitCollectionDidChange: to registerForTraitChanges: (for example to get notified about new traits), or will the legacy callback still fire reliably? Scenes and external displays. Does iPhone Duo change anything about scene activation, window geometry or UIScreen handling that a multi-scene app with external-display output should plan for? Incremental adoption. Can we adopt this step by step in Objective-C, or do some of the APIs only exist in Swift and push us toward Swift wrappers? Any pointers to WWDC sessions, sample code or documentation for adapting existing UIKit apps would be very helpful. Thanks!
Topic: UI Frameworks SubTopic: UIKit
4
1
379
1w
How to implement correct horizontal padding for iPhone Duo
The iPhone Duo outer screen displays a vertical bar on the right edge with view contents inset. A SwiftUI Form displays an appropriate amount of leading padding but 0 padding on the trailing edge, since the vertical bar provides some visual margins already that looks nice. I have a view that looks kind of like a form, multiple stacked text fields, that should align the same way. I used scenePadding to achieve which looks correct on iPhone 18 Pro perfectly aligned with Form, but on iPhone Duo there is extra trailing padding. It doesn't align with my Edit button that remains in the horizontal axis navigation bar (and it is not inset enough on the leading edge, off by a few pixels, interestingly). Note when you unfold it and add the app on the left side in Split View, the vertical bar is on the leading edge, in which case there's too much padding on the leading edge. How can I achieve the correct layout padding/margins? iPhone 18 Pro vs iPhone Duo: My actual app: struct ContentView: View { var body: some View { TabView { NavigationStack { SystemFormView() .navigationTitle("System Form") } .tabItem { Label("System Form", systemImage: "list.bullet.rectangle") } NavigationStack { CustomFormView() .navigationTitle("Custom Form") } .tabItem { Label("Custom Form", systemImage: "rectangle.3.group") } } } } private struct SystemFormView: View { var body: some View { Form { Text("Row 1") Text("Row 2") Text("Row 3") } } } private struct CustomFormView: View { var body: some View { ScrollView { VStack(spacing: 0) { customRow("Row 1") Divider() .padding(.leading) customRow("Row 2") Divider() .padding(.leading) customRow("Row 3") } .background(.background) .scenePadding(.horizontal) } .background(Color(uiColor: .systemGroupedBackground)) } private func customRow(_ title: LocalizedStringKey) -> some View { Text(title) .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading) .padding(.horizontal) } } Note in UIKit, UITableViewController with the inset grouped style has the same layout as Form. A custom view hierarchy can achieve the exact same placement/padding/margins by following these steps: create a scroll view and a content view, set preservesSuperviewLayoutMargins = true on both views, constrain the scroll view to the root view on all edges, constrain the content view to the scrollView.contentLayoutGuide on all edges, constrain the content view width anchor to the scrollView.frameLayoutGuide.widthAnchor, then constrain subviews of the content view to the contentView.layoutMarginsGuide. So I know how to do it in UIKit, how do we in SwiftUI? Thanks!
Topic: UI Frameworks SubTopic: SwiftUI
7
1
815
1w
UISceneDelegate.sceneWillResignActive and sceneDidEnterBackground not called on iOS 27
In our UIKit app built with Xcode 27.2 / iOS 27 SDK, the foreground-to-background UISceneDelegate methods are not called when the app enters background. The matching UIApplication notifications are still posted. Environment: Device: iPhone 13 OS: iOS 27.2 Xcode: 27.2 (27B52) UIApplicationSupportsMultipleScenes: false SceneDelegate configured in Info.plist Observed: Launch: scene:willConnectToSession:options: sceneWillEnterForeground: sceneDidBecomeActive: Press Home / switch app / lock screen: (sceneWillResignActive: NOT called) (sceneDidEnterBackground: NOT called) Return to app: sceneWillEnterForeground: sceneDidBecomeActive: Evidence from file logging: [2026-11-12 11:28:05.502] sceneWillEnterForeground [2026-11-12 11:28:05.729] sceneDidBecomeActive [2026-11-12 13:25:45.077] sceneWillEnterForeground [2026-11-12 13:25:45.517] sceneDidBecomeActive No sceneWillResignActive or sceneDidEnterBackground entries. However, UIApplicationWillResignActiveNotification and UIApplicationDidEnterBackgroundNotification are delivered correctly. Expected: sceneWillResignActive: and sceneDidEnterBackground: should be called when leaving foreground. Workaround: We currently fall back to UIApplication notifications.
Topic: UI Frameworks SubTopic: UIKit
1
0
71
1w
cannot add handler to 0 from 0 - dropping
import SwiftUI struct ContentView: View { var body: some View { NavigationStack { VStack { Text("Hello, world!") } .padding() } } } This simple program gives the messages: non-launching port is incompatible with service identifier "com.apple.PointerUI.pointeruid.default-service" cannot add handler to 0 from 0 - dropping cannot add handler to 0 from 0 - dropping I'm teston on IPad (A16) ver 27.2.1 and xcode 27.2
Topic: UI Frameworks SubTopic: SwiftUI
0
0
66
1w
iPadOS 27.0.1: iPhone-only apps crash when displaying the Japanese Kana keyboard on iPad
We are seeing a crash when attempting to display the Japanese Kana keyboard (日本語-かな) in our iPhone-only app running on an iPad with iPadOS 27.0.1. The keyboard displays successfully in our app on iPadOS 26 and iPadOS 27.0. We also reproduced a similar crash in other iPhone-only apps downloaded from the App Store on the affected iPad. We have not yet confirmed whether those apps crash with the same exception. Our app logs the following exception: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 15 beyond bounds [0 .. 2]' *** First throw call stack: ( 0x19fab7190 0x19f834380 0x19fa45734 0x1aee9f5bc 0x1aee3dc14 0x1aee3cb30 0x1aee3c4d4 0x1aee3ab0c 0x1a433798c 0x1a44a4120 0x1a449bd5c 0x1a42148c8 0x1a42143fc 0x1a4239d7c 0x1a421203c 0x1a3fc1338 0x1a3d12e0c 0x1a3d11ed0 0x1a52784ec 0x1a3d11abc 0x1a4115238 0x1a3d436d4 0x1a3d43a80 0x1a44eea14 0x1aabb8ef8 0x1a517161c 0x1a5152450 0x1a5153388 0x1a41f20c4 0x1a49e3fec 0x1a426598c 0x1a42657fc 0x1a4265580 0x1a3d62b30 0x1a3d62984 0x1a95c4dac 0x1a994fb68 0x1a95c5514 0x1a95c287c 0x1a95d2608 0x1a3d6841c 0x1a3d6a298 0x1a4263874 0x1a3d60bdc 0x1a3ce8d78 0x1a3ce7b88 0x1a3ce7928 0x2d1482bc0 0x19fa78c20 0x19fa78b94 0x19fa5a268 0x19fa59384 0x19fa5a7f4 0x249e6ff24 0x1a3d381cc 0x1a9d27404 0x1a9d20b50 0x1a9d20a10 0x109042dc4 0x109042e04 0x19f8ab5b8 ) libc++abi: terminating due to uncaught exception of type NSException Steps to reproduce: Enable the Japanese – Kana keyboard in the iPad’s keyboard settings. Open an affected iPhone-only app on an iPad running iPadOS 27.0.1. Tap a text input field and attempt to display the Japanese Kana keyboard. The app crashes. We suspect this may be a regression involving iPhone compatibility mode on iPad and the Japanese Kana keyboard, but we have not yet identified the failing component in a symbolicated stack trace. We have submitted a report through Feedback Assistant: FB24985530. Has anyone else encountered this behavior? Are there any known workarounds we can apply in the app while this is being investigated?
Topic: UI Frameworks SubTopic: UIKit Tags:
8
7
2.0k
1w
macOS 27.2: external monitor on a USB-C to HDMI adapter flickers, shows as "12 inch Display" at 1280x720, all resolutions refused (empty EDID)
Since I updated from macOS 27.0.1 to 27.2 (26B123), my second monitor stopped working on a Mac mini M4 Pro. It is a Dell SE2726HG on a USB-C to HDMI adapter. My LG on the built-in HDMI port still works. Symptoms: The Dell flickers. It disconnects and reconnects about once per second. System Settings shows it as "Display", 12 inch, 1280x720 at 50 Hz. Every resolution change is refused, also for the other monitor. A restart, a replug, or a lower refresh rate on the other monitor does not help. What the logs show: macOS cannot read the monitor's EDID through the adapter. IOAVServiceCopyEDID returns 0xe00002c9 (internal error), and the framebuffer has an all-zero EDID. Without an EDID, the kernel gives the display no display pipe: "AED: validate_or_set_ex: fb 2 rejecting request, exceeds full dual-pipe allocation (w 1280 vs 0 ...)" and "skipping display with null info". In 47 minutes, the log had 379 hotplug "out" events. Workaround (no extra hardware, no paid app): I injected a normal 1920x1080 EDID at runtime with the private IOKit call IOAVServiceSetVirtualEDIDMode(service, 1, edid), then IODPDeviceSetUpdated(device, 1). The monitor then comes up with its correct name at 1920x1080, with zero disconnects. The override is lost on reboot, sleep, or replug, so a LaunchAgent re-applies it every 5 seconds when the EDID read fails. This is the same approach as these projects: https://gist.github.com/danii1/99fa5f849a4d42807418259abfbf03d5 https://github.com/owomocha/macos-360hz-unlock BetterDisplay Pro can also apply a custom EDID.
Topic: UI Frameworks SubTopic: General
3
2
438
1w
iPhone Duo: Keep app on inner display while hinge is open (like Clock)?
Hi! I'm building a night-light app for iPhone Duo. When the device is partly open in tent mode, the lamp starts on the inner display. As soon as I set the phone down on a table, the system moves my window to the outer display, even though the hinge stays open. Apple's Clock app stays on the inner display in the same pose, so it seems possible at the system level. Steps Open iPhone Duo to ~80° (tent). Launch the app on the inner display. Set the device down on a table. Observed (logged from the app) UIHinge.status stays .partiallyOpen (~80°), not .closed. UIDevice.orientation goes portraitUpsideDown → faceDown → landscapeRight. UIScreen.didDisconnectNotification fires and UIScreen.screens drops the inner screen. The window moves to the outer screen (466×678). What I've tried Restricting UISupportedInterfaceOrientations to portrait only Turning on Rotation Lock Reading UIHingeInteraction (read-only, no effect on display routing) Looking at UISceneAccessory.cameraCapture, which only applies with an active capture session and a fully open device Question Is there a supported way for a scene to prefer or stay on the inner display while the hinge isn't closed? If not, I'll file a Feedback Assistant request. iPhone Duo · iOS 27.2 · Xcode 27.2
1
0
70
1w
Is NavigationSplitView on macOS 27 broken?
On macOS 27 Beta 2, a simple NavigationSplitView example exhibits bizarre behaviour when the window is resized. The sidebar seemingly expands and collapses at random as the window is resized. The symptoms can be exacerbated with toolbar items. The sidebar appears to behave correctly when an inspector view is not present. Copy paste the code below into a new Xcode 27 project and run on macOS 27 and then resize the window: File -> New -> Project... -> App import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { var body: some View { NavigationSplitView { Text("Sidebar") } detail: { Text("Content") } .inspector(isPresented: .constant(true)) { Text("Inspector") } } } Adding .frame or .inspectorColumnWidth to any of the Text views does not appear to fix the issues. macOS: 27.0 Beta (26A5368g) Xcode: 27.0 beta 2 (27A5209h)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
6
1
767
1w
Tab grayed out, but not disabled
Bug report: FB25495244 This bug also appeared with Xcode 27; it worked previously. scenario: A TabView with, for example, 4 tabs. Data in ContentView is loaded via @Query. In ContentBindingView, the same thing is done, but using a parameter instead of SwiftData. ContentView: If no data is available, the system automatically switches to tab 4 at the start; while you can click on other tabs, they are disabled, and the system will not switch to them. ContentBindingView: When tabDisabled is set to "true", the system automatically switches to Tab 4 upon startup; while it is possible to click on other tabs, they are disabled, and the system will not switch to them. So far, so good. The first three tabs are only active if at least one data record exists or tabDisabled is "false". Tab 4 is always active and is used for data entry. When data is entered in Tab 4, tab 1 to 3 should become active. However, it appears as though tabs 1 through 3 remain disabled—the icons appear grayed out. That is actually not the case; you can click on the tabs, and as soon as you move away from a tab, its icon is displayed correctly. This issue did not exist in Xcode 26. In Xcode 26, all symbols were displayed correctly from the start, once data had been saved. What I noticed on the iPhone Duo: If you open the program on an iPhone Duo while it is closed, enter some data, then move the app to the background, open the iPhone Duo, and bring the application back to the foreground, tabs 1 through 3 will be active. The entire view is being updated, which is why tabs 1 through 3 are now active—though they should have been active already. A side note: The same issue described in the forum post "A layout bug when using Tab View in SwiftUI (FB25490881)" also occurs in this program. The entire view has shifted upward. The text field is no longer visible—only the Add button remains. In the other views, you can only see half of the text. import SwiftUI struct ContentBindingView: View { @State private var tabDisabled: Bool = true @State private var selection: TabSelection = .tab1 private var isTabDisabled: Bool { print("ContentView.isTabDisabled: \(tabDisabled)") return tabDisabled } var body: some View { TabView(selection: $selection) { Tab("Tab 1", systemImage: "waveform.badge.magnifyingglass", value: .tab1) { Text("tab 1") } .disabled(isTabDisabled) Tab("Tab 2", systemImage: "heart", value: .tab2) { Text("tab 2") } .disabled(tabDisabled) Tab("Tab 3", systemImage: "target", value: .tab3) { Text("tab 3") } .disabled(tabDisabled) Tab("Tab 4", systemImage: "gear", value: .tab4) { AddFriendBindingView(tabDisabled: $tabDisabled) } } .onAppear { print("ContentView onAppear disabled: \(tabDisabled)") if tabDisabled { selection = .tab4 } } .onChange(of: selection) { print("ContentView onChange disabled: \(tabDisabled)") } } }struct AddFriendBindingView: View { @Environment(\.dismiss) private var disdmiss @Binding var tabDisabled: Bool @State private var name: String = "" var body: some View { VStack { TextField("Name", text: $name) Button { addFriend() } label: { Text("Add") } .buttonStyle(.borderedProminent) } .padding() .onAppear { print("AddFriendView onAppear disabled: \(tabDisabled)") } } private func addFriend() { tabDisabled = false name = "" disdmiss() } }Christian
2
0
297
1w
Age Range Functionality in MacOS 27.2 no handle?
I have a running implementation for an iOS Application which is using AgeRange. It was running very well on Mac OS below 27 and was getting the results. It is still working on iOS 27.2 but now in MacOS 27.2 with the same code base I'm getting an } catch AgeRangeService.Error.notAvailable { NSLog("[AgeRangeDeclaration] Handle not available error")Is there a change for MacOS 27 which has to be implemented or do I have to configure something else?
Topic: UI Frameworks SubTopic: General
1
0
125
1w
Request to remove horizontal blank space for keyboard extensions on iPhone Duo.
I have a custom iOS keyboard extension app. On iPhone Duo, the system forces keyboard extensions inside a container that is narrower than the phone's screen, specifically by adding extra 7 points on the leading and trailing edge in portrait. This creates both a visual and functional blank space on both sides of the keyboard. My keyboard relies on side swipes, which are much more annoying to perform when the keyboard does not occupy full width of the screen. All other devices iPhones before the Duo propely stretch the keyboard to full width, so this is a new issue. Please, reconsider this decision. I believe a better way to handle this is by setting the safe area layout, instead of limiting the container's width itself. I don't see any benefit to protecting these 7 points on each side. Keyboards that don't care will still stay within the limit by respecting the horizontal safe area, while others would get the benefit of better customization.
0
0
107
1w
iPadOS 27.2 — Software keyboard fails to appear in Swift Playgrounds apps (regression compared with iPadOS 26.2)
The on-screen software keyboard does not appear when editing SwiftUI TextField controls in applications created and executed using Swift Playgrounds on iPadOS 27.2. The issue is reproducible in a completely new, minimal Swift Playgrounds application, independently of any existing application code. Steps to reproduce 1. Open Swift Playgrounds on an iPad running iPadOS 27.2. 2. Create a new blank SwiftUI application. 3. Add a standard TextField bound to a @State String. 4. Run the application using Play. 5. Tap the TextField with a finger. Actual result The TextField displays the insertion cursor and responds to touch interactions, but the software keyboard never appears. Long-pressing the TextField displays the Paste / AutoFill context menu. Handwriting input using Apple Pencil Pro works, but the software keyboard remains unavailable. Disabling Scribble in iPadOS settings does not resolve the problem. The software keyboard works normally in Apple Notes on the same iPad. This issue prevents normal text entry and testing in an actively developed payroll management application built entirely with Swift Playgrounds. The problem also occurs in a completely new sample application, indicating that it is not specific to the payroll application’s code. Request Please investigate this apparent regression affecting software keyboard presentation in Swift Playgrounds on iPadOS 27.2. A fix or an official workaround would be greatly appreciated.
0
1
166
1w
Battery usage timeline graph shows incorrect time labels in macOS 27
Description: The time scale values on the battery usage curve in macOS 27 are displayed incorrectly. The screenshot timestamp is 14:39:11, October 20. Under the "Last 24 Hours" tab for Battery Level and Screen On Time charts, the timeline shows usage extending past 21:00 on October 20. This timestamp does not match the actual current time. It appears the timeline axis failed to shift correctly as time progresses. For comparison: a reference screenshot captured on macOS 26 at 09:30, August 8. Its battery usage timeline rendered correctly. The bottom time span covered August 7 to August 8, which is the expected and proper display behavior. This bug only exists in macOS 27’s battery usage chart. The older macOS 26 implementation works correctly. Device: MacBook Air M5 macOS version: macOS 27.2 RC
Topic: UI Frameworks SubTopic: SwiftUI
1
0
305
1w
Launch screen not refreshed after app update: is clearing Library/SplashBoard supported?
We're adding an option to our Unity SDK that gives a game a native launch screen: a launch storyboard (set through UILaunchStoryboardName) showing a full-screen image from an asset catalog. What we see On a clean install, the new launch screen shows as expected. When the same device installs an update over the existing app (tested through TestFlight), the previous launch screen keeps showing. Launching the app several times does not change it. Deleting the app, restarting the device and reinstalling shows the new launch screen straight away. We checked the build itself: the compiled storyboard, the image in Assets.car and the Info.plist keys are all correct, so this looks like the system's launch screen snapshot cache. We assume App Store updates behave the same way. What we're considering On the first launch after an update, the app would delete the cached launch screen snapshots in its own container (Library/SplashBoard), so the system regenerates them and the new launch screen shows on the next launch. This only uses public file APIs inside the app's own sandbox. But Library/SplashBoard is not documented anywhere, so we'd rather ask before shipping it. Questions Is deleting Library/SplashBoard from the app's own container a supported or acceptable practice, or could it cause problems (with the system, or in a future iOS version)? Is there a supported way to make iOS refresh a cached launch screen after an app update? If not, is the expected behaviour simply that the system refreshes the snapshot at some point? Is it documented when that happens (for example after a reboot, or after a certain time)? If clearing the folder isn't recommended, we won't ship it. Updating players would just keep the old launch screen until iOS refreshes it. Thanks!
1
0
281
1w
What is the recommended way to render a divider line in a NSTextView?
I would like to render a divider line in a NSTextView (like the <div> HTML item) on macOS 10.13 or later. I use Objective-C. I've searched for solutions and it looks like the recommended solution is to use a NSTextAttachmentCell. There was supposedly an example provided on the cocoa-dev mailing list but the archives for this useful mailing list are gone. The issue I'm observing with the NSTextAttachmentCell solution is that it is working almost well with a simple NSTextView example but when used in a more complex application, the rendering of the divider is still fine but there's a huge vertical gap between the divider and the text below the divider. The online documentation for the NSTextAttachmentCell class is not really helpful (and contains typos: "With the exceptions of cellBaselineOffset, attachment, and attachment, all of these methods are implemented by the NSCell class.For general information on text attachments, " -> "attachment" twice, no space between "class." and "For general"). Here's the simple code I'm currently testing for the attachment cell: @implementationMyDividerTextAttachmentCell - (NSRect)cellFrameForTextContainer:(NSTextContainer *)textContainer proposedLineFragment:(NSRect)lineFrag glyphPosition:(NSPoint)position characterIndex:(NSUInteger)charIndex { return NSMakeRect(lineFrag.origin.x, lineFrag.origin.y, textContainer.size.width, 10); } - (void)drawWithFrame:(NSRect)cellFrame inView:(nullable NSView *)controlView { [[NSColor darkGrayColor] setStroke]; [NSBezierPath strokeLineFromPoint:NSMakePoint(0, NSMidY(cellFrame)) toPoint:NSMakePoint(NSMaxX(cellFrame), NSMidY(cellFrame))]; }[Q] Is there an obvious reason why there would be a huge gap (think 200 pixels/points) below the divider? What is the recommended way to render a divider line in a NSTextView if it's not NSTextAttachmentCell.
4
0
355
1w
Bug Report: Xcode 26.6 Codex Agent Fails with Response Decoding and Model Compatibility Errors
Bug Report: Xcode 26.6 Codex Agent Fails with Response Decoding and Model Compatibility Errors Severity: High — Core agent functionality unavailableComponent: Xcode Intelligence / Codex Agent IntegrationEnvironment: macOS, Xcode 26.6 (17F113)Date reported: November 1, 2026 Summary The built-in Codex coding agent in Xcode consistently fails to process requests, despite successful ChatGPT Pro authentication and a functioning standalone Codex CLI. The problem occurs even with trivial prompts and prevents use of Codex's autonomous development functionality, including the Pursue Goal workflow. The standard ChatGPT integration inside Xcode works correctly. The failure is isolated to the Codex agent integration. Environment ComponentDetailsIDEXcode 26.6 (17F113)Built-in Codex agent0.140.0 (version observed before reinstall)Standalone Codex CLI0.166.0ACP adapter testedcodex-acp 2.5.0AccountChatGPT ProAuthenticationChatGPT account authenticationAffected projectsMultiple SwiftUI projectsModel testedgpt-5.5, gpt-6.1-solActual Behavior When initiating a conversation with the built-in Codex agent in Xcode, the request fails with the following messages: Error 1: Response decoding failure The data couldn’t be read because it isn’t in the correct format.Accompanied by: Your request couldn't be completed.Error 2: Unsupported model With the original model selection: Codex encountered an error: The 'gpt-5.5' model is not supported when using Codex with a ChatGPT account.After explicitly configuring gpt-6.1-sol: Codex encountered an error: The 'gpt-6.1-sol' model is not supported when using Codex with a ChatGPT account.Error 3: ACP communication failure When testing a separately registered Codex ACP adapter: JSON-RPC request with ID [...] failed to produce a response.This was observed in a separate integration experiment and should not automatically be assumed to share the same root cause as the built-in Codex failure. Expected Behavior The built-in Codex agent should: Authenticate with an eligible ChatGPT Pro account. Select a model supported by the account and installed agent version. Correctly initialize the agent and decode its protocol responses. Execute basic prompts without errors. Support Xcode's native agentic development workflows, including Pursue Goal. Present actionable diagnostics when authentication, model selection, or protocol initialization fails. Reproduction Steps Open Xcode 26.6. Open an existing SwiftUI project. Open the Coding Assistant. Start a new conversation. Select Codex under Agents, rather than OpenAI under Chat. Submit a trivial prompt, such as: Reply with exactly OK. Observe the request failing with a response-format error or an unsupported-model error, depending on configuration. The issue is reproducible across multiple attempts and is not specific to a complex coding task. Troubleshooting Performed The following troubleshooting actions have already been attempted: Reauthenticated using the ChatGPT account. Tested configuration-file-based authentication. Reset Codex authentication. Reinstalled Xcode. Reinstalled the Xcode Codex component. Restarted Xcode and created new conversations. Tested explicit model selection through config.toml. Tested standalone Codex with the same ChatGPT Pro account. Tested a separate ACP adapter integration. The built-in Codex agent remains unusable. Confirmed Successful Control Test Standalone Codex CLI 0.166.0 successfully executed a request using GPT-6.1 Sol. Command: codex exec --model gpt-6.1-sol --skip-git-repo-check \ "Reply with exactly OK. Do not edit files or use tools."Observed output: OpenAI Codex v0.166.0 model: gpt-6.1-sol provider: openai reasoning effort: high codex OKThe request completed without an API error. Additionally, Xcode's separate ChatGPT integration displays the ChatGPT Pro account as authenticated, with usage status Under Limit. These observations strongly suggest that the problem is specific to the Xcode Codex integration or its runtime environment, rather than a general account authentication failure. Suspected Root Causes The following are hypotheses requiring investigation, not confirmed causes: 1. Bundled agent version incompatibility Xcode was observed using Codex 0.140.0, while standalone Codex 0.166.0 successfully accessed GPT-6.1 Sol. Please verify whether the bundled Codex agent is compatible with currently available ChatGPT-authenticated models. 2. Model discovery or selection mismatch The bundled agent's model catalog included models that were subsequently rejected by the service. Please investigate whether Xcode refreshes the model catalog, respects model configuration overrides, and selects models based on account eligibility. 3. Agent protocol response decoding The generic data-format error suggests a possible failure to decode an agent response, handle an unsupported response schema, or propagate an underlying API error. Please inspect the agent initialization, response parsing, and error-handling paths. 4. Configuration and authentication isolation The normal ChatGPT integration authenticates successfully, while the Codex agent fails. Please verify how Xcode manages distinct authentication contexts, configuration locations, agent versions, and model capabilities. Requested Engineering Actions Please investigate and address the following: Ensure the Xcode Codex agent is compatible with supported ChatGPT-authenticated models. Verify that the bundled agent version is current and that component updates are correctly delivered. Validate model availability before dispatching requests. Ensure the model selected in Xcode matches the actual model submitted by the agent. Correct any incompatible protocol or JSON response handling. Expose the underlying error details rather than only reporting a generic data-format failure. Confirm that reinstalling or updating the Xcode Codex component restores a functional agent without requiring manual configuration changes. Add regression coverage for ChatGPT Pro authentication, model selection, agent initialization, and basic prompt execution. Impact The issue prevents me from using the Codex agent directly inside Xcode, despite having a ChatGPT Pro subscription and a fully functional standalone Codex CLI. As a result, I cannot use the integrated agentic coding experience or the Pursue Goal workflow that previously worked. Please investigate the bundled Codex runtime, model selection, and protocol compatibility. The successful standalone Codex 0.166.0 test provides a control case for reproducing and isolating the failure.
1
1
371
1w
HiraginoSans-W4/W5 availability diverges between iOS 16.5.1 and iOS 18.0.1: UIFont(name:) returns nil, XIB labels fall back to Helvetica
Background Our app previously bundled ヒラギノ角ゴシック W4.ttc and W5.ttc via UIAppFonts. App Store review flagged them under ITMS-91198 as Apple-provided fonts. We removed the bundled .ttc files and need to verify the runtime font-resolution behavior before shipping. Case C below shows the original state (with .ttc present) for comparison. Environment Same app, same code, same XIB, physical devices only. Tested OS: iOS 16.5.1 (two builds: with and without bundled .ttc) and iOS 18.0.1 (without bundled .ttc). Xcode 16.x. How to read the logs Each log has three sections: SYSTEM HIRAGINO SANS — UIFont.fontNames(forFamilyName: "Hiragino Sans"), i.e. what the OS itself provides. RAW UIFont(name:) — UIFont(name: "HiraginoSans-W4", size: 16) etc. This is the code path our App.Font wrapper uses. XIB LABEL RESOLVED — four UILabels whose XIB fontDescription specifies HiraginoSans-W3/W4/W5/W6 respectively. resolved= is label.font.fontName at runtime. Case A — iOS 18.0.1, physical device, bundled .ttc removed ===== ENV ===== systemVersion : 18.0.1 target : Physical Device ===== SYSTEM HIRAGINO SANS ===== HiraginoSans-W3 HiraginoSans-W4 HiraginoSans-W5 HiraginoSans-W6 HiraginoSans-W7 HiraginoSans-W8 ===== RAW UIFont(name:) ===== HiraginoSans-W3 OK family=Hiragino Sans HiraginoSans-W4 OK family=Hiragino Sans HiraginoSans-W5 OK family=Hiragino Sans HiraginoSans-W6 OK family=Hiragino Sans ===== XIB LABEL RESOLVED ===== W3Lab xib=HiraginoSans-W3 resolved=HiraginoSans-W3 family=Hiragino Sans W4Lab xib=HiraginoSans-W4 resolved=HiraginoSans-W4 family=Hiragino Sans W5Lab xib=HiraginoSans-W5 resolved=HiraginoSans-W5 family=Hiragino Sans W6Lab xib=HiraginoSans-W6 resolved=HiraginoSans-W6 family=Hiragino Sans ===== END =====Case B — iOS 16.5.1, physical device, bundled .ttc removed ===== ENV ===== systemVersion : 16.5.1 target : Physical Device ===== SYSTEM HIRAGINO SANS ===== HiraginoSans-W3 HiraginoSans-W6 HiraginoSans-W7 ===== RAW UIFont(name:) ===== HiraginoSans-W3 OK family=Hiragino Sans HiraginoSans-W4 nil HiraginoSans-W5 nil HiraginoSans-W6 OK family=Hiragino Sans ===== XIB LABEL RESOLVED ===== W3Lab xib=HiraginoSans-W3 resolved=HiraginoSans-W3 family=Hiragino Sans W4Lab xib=HiraginoSans-W4 resolved=Helvetica family=Helvetica W5Lab xib=HiraginoSans-W5 resolved=Helvetica family=Helvetica W6Lab xib=HiraginoSans-W6 resolved=HiraginoSans-W6 family=Hiragino Sans ===== END =====Case C — iOS 16.5.1, physical device, bundled .ttc present (original state) ===== ENV ===== systemVersion : 16.5.1 target : Physical Device ===== SYSTEM HIRAGINO SANS ===== HiraginoSans-W3 HiraginoSans-W4 HiraginoSans-W5 HiraginoSans-W6 HiraginoSans-W7 ===== RAW UIFont(name:) ===== HiraginoSans-W3 OK family=Hiragino Sans HiraginoSans-W4 OK family=Hiragino Sans HiraginoSans-W5 OK family=Hiragino Sans HiraginoSans-W6 OK family=Hiragino Sans ===== XIB LABEL RESOLVED ===== W3Lab xib=HiraginoSans-W3 resolved=HiraginoSans-W3 family=Hiragino Sans W4Lab xib=HiraginoSans-W4 resolved=HiraginoSans-W4 family=Hiragino Sans W5Lab xib=HiraginoSans-W5 resolved=HiraginoSans-W5 family=Hiragino Sans W6Lab xib=HiraginoSans-W6 resolved=HiraginoSans-W6 family=Hiragino Sans ===== END =====Observations Comparing B and C (same OS, only .ttc presence differs): removing the bundled .ttc removes HiraginoSans-W4/W5 from the system font list, makes UIFont(name:) return nil for them, and makes XIB labels naming them fall back to Helvetica — not SF, not the nearest weight in the same family. Comparing B and A (same .ttc state, only OS differs): iOS 18.0.1 ships HiraginoSans-W3–W8 in the system, so removing the bundled .ttc has no effect there. Question 1 — System font inventory by OS version Is there an official, versioned list of system-provided fonts (PostScript names) per iOS release? We need to determine which Hiragino Sans weights are available on a given OS at runtime, without hard-coding assumptions. Our observations show that iOS 16.5.1 does not provide HiraginoSans-W4/W5 in the system font set, while iOS 18.0.1 provides W3–W8. If no per-version official list exists, is UIFont.familyNames / UIFont.fontNames(forFamilyName:) the recommended runtime enumeration method? Or is there a documented recommendation to avoid relying on specific PostScript names across OS versions? Question 2 — XIB fontDescription fallback rule When a UILabel's XIB fontDescription specifies a font PostScript name that is not available at runtime (e.g. HiraginoSans-W4 on iOS 16.5.1 after removing the bundled .ttc), we observe UIKit falls back to Helvetica — not SF, not the nearest available weight in the same family. Is this fallback rule documented? Is it stable across iOS versions, or should we treat the fallback target as unspecified? If the fallback target cannot be relied upon, what is the recommended approach for XIB-based layouts that must not render with an unexpected font? Must every such label be re-assigned in code after awakeFromNib / viewDidLoad? Or is there a supported way to declare a fallback chain in Interface Builder?
0
0
69
1w
Adapting a large UIKit/Objective-C document viewer controller for iPhone Duo on the iOS 27.1 SDK
We ship a mature document viewer (PDF) written mostly in Objective-C with UIKit. It runs on iPhone and iPad and supports multiple scenes. We're planning support for iPhone Duo and would like advice on the right architectural approach before we start. Current structure (simplified) One root viewer view controller (a UIViewController subclass, large and long-lived) owns the document view, search, bookmarks, text-to-speech, presentation mode and similar features. Most of these live in categories and helper modules. Chrome is swapped by size class. A factory picks one of two "toolbars controller" classes based on the trait collection: one for compact, one for regular. The regular one also hosts a tab strip and a sidebar built on the system sidebar UI. When the class it would pick changes, traitCollectionDidChange: tears down the current chrome controller, builds the other one, re-parents the document view into the new container, and then restores tool and presentation state. We skip this while the app isn't active, because UIKit sends trait changes during backgrounding. Geometry changes go through viewWillTransitionToSize:withTransitionCoordinator:, which forwards to the chrome controller, the document view and a zoomed handwriting helper. When the transition completes we recompute content insets and re-render the output for an external display. The document view is a custom scroll-based view (not PDFKit). It has display modes for continuous, single page, two-page spread and two-page spread with a cover page. It calculates its own insets from safe areas and whatever chrome is visible. We still use traitCollectionDidChange: and haven't moved to registerForTraitChanges:. Questions Posture changes and size-class flips. When the device folds or unfolds, should we expect a normal viewWillTransitionToSize: plus a trait change (compact ↔ regular) that our existing swap handles? Or is there a posture/display-configuration signal we should observe instead? Swapping the whole chrome hierarchy in the middle of a fold animation seems costly. Is there a recommended way to defer or coordinate that with the transition coordinator? Hinge or seam area. Is the fold region exposed through safe-area insets, layout guides or a new API? A custom scroll view that lays out two-page spreads needs to keep content out of that region, or line the spread up with it. What's the recommended way to get this geometry from Objective-C? Two-page spread tied to posture. Showing a two-page spread automatically when the device is unfolded (like an open book) seems natural. Does Apple recommend deciding this from traits/posture or from bounds, and is there a trait we can override per view controller? Trait registration. For this form factor, is it effectively required to move from traitCollectionDidChange: to registerForTraitChanges: (for example to get notified about new traits), or will the legacy callback still fire reliably? Scenes and external displays. Does iPhone Duo change anything about scene activation, window geometry or UIScreen handling that a multi-scene app with external-display output should plan for? Incremental adoption. Can we adopt this step by step in Objective-C, or do some of the APIs only exist in Swift and push us toward Swift wrappers? Any pointers to WWDC sessions, sample code or documentation for adapting existing UIKit apps would be very helpful. Thanks!
Topic: UI Frameworks SubTopic: UIKit
Replies
4
Boosts
1
Views
379
Activity
1w
How to implement correct horizontal padding for iPhone Duo
The iPhone Duo outer screen displays a vertical bar on the right edge with view contents inset. A SwiftUI Form displays an appropriate amount of leading padding but 0 padding on the trailing edge, since the vertical bar provides some visual margins already that looks nice. I have a view that looks kind of like a form, multiple stacked text fields, that should align the same way. I used scenePadding to achieve which looks correct on iPhone 18 Pro perfectly aligned with Form, but on iPhone Duo there is extra trailing padding. It doesn't align with my Edit button that remains in the horizontal axis navigation bar (and it is not inset enough on the leading edge, off by a few pixels, interestingly). Note when you unfold it and add the app on the left side in Split View, the vertical bar is on the leading edge, in which case there's too much padding on the leading edge. How can I achieve the correct layout padding/margins? iPhone 18 Pro vs iPhone Duo: My actual app: struct ContentView: View { var body: some View { TabView { NavigationStack { SystemFormView() .navigationTitle("System Form") } .tabItem { Label("System Form", systemImage: "list.bullet.rectangle") } NavigationStack { CustomFormView() .navigationTitle("Custom Form") } .tabItem { Label("Custom Form", systemImage: "rectangle.3.group") } } } } private struct SystemFormView: View { var body: some View { Form { Text("Row 1") Text("Row 2") Text("Row 3") } } } private struct CustomFormView: View { var body: some View { ScrollView { VStack(spacing: 0) { customRow("Row 1") Divider() .padding(.leading) customRow("Row 2") Divider() .padding(.leading) customRow("Row 3") } .background(.background) .scenePadding(.horizontal) } .background(Color(uiColor: .systemGroupedBackground)) } private func customRow(_ title: LocalizedStringKey) -> some View { Text(title) .frame(maxWidth: .infinity, minHeight: 44, alignment: .leading) .padding(.horizontal) } } Note in UIKit, UITableViewController with the inset grouped style has the same layout as Form. A custom view hierarchy can achieve the exact same placement/padding/margins by following these steps: create a scroll view and a content view, set preservesSuperviewLayoutMargins = true on both views, constrain the scroll view to the root view on all edges, constrain the content view to the scrollView.contentLayoutGuide on all edges, constrain the content view width anchor to the scrollView.frameLayoutGuide.widthAnchor, then constrain subviews of the content view to the contentView.layoutMarginsGuide. So I know how to do it in UIKit, how do we in SwiftUI? Thanks!
Topic: UI Frameworks SubTopic: SwiftUI
Replies
7
Boosts
1
Views
815
Activity
1w
UISceneDelegate.sceneWillResignActive and sceneDidEnterBackground not called on iOS 27
In our UIKit app built with Xcode 27.2 / iOS 27 SDK, the foreground-to-background UISceneDelegate methods are not called when the app enters background. The matching UIApplication notifications are still posted. Environment: Device: iPhone 13 OS: iOS 27.2 Xcode: 27.2 (27B52) UIApplicationSupportsMultipleScenes: false SceneDelegate configured in Info.plist Observed: Launch: scene:willConnectToSession:options: sceneWillEnterForeground: sceneDidBecomeActive: Press Home / switch app / lock screen: (sceneWillResignActive: NOT called) (sceneDidEnterBackground: NOT called) Return to app: sceneWillEnterForeground: sceneDidBecomeActive: Evidence from file logging: [2026-11-12 11:28:05.502] sceneWillEnterForeground [2026-11-12 11:28:05.729] sceneDidBecomeActive [2026-11-12 13:25:45.077] sceneWillEnterForeground [2026-11-12 13:25:45.517] sceneDidBecomeActive No sceneWillResignActive or sceneDidEnterBackground entries. However, UIApplicationWillResignActiveNotification and UIApplicationDidEnterBackgroundNotification are delivered correctly. Expected: sceneWillResignActive: and sceneDidEnterBackground: should be called when leaving foreground. Workaround: We currently fall back to UIApplication notifications.
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
0
Views
71
Activity
1w
cannot add handler to 0 from 0 - dropping
import SwiftUI struct ContentView: View { var body: some View { NavigationStack { VStack { Text("Hello, world!") } .padding() } } } This simple program gives the messages: non-launching port is incompatible with service identifier "com.apple.PointerUI.pointeruid.default-service" cannot add handler to 0 from 0 - dropping cannot add handler to 0 from 0 - dropping I'm teston on IPad (A16) ver 27.2.1 and xcode 27.2
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
66
Activity
1w
iPadOS 27.0.1: iPhone-only apps crash when displaying the Japanese Kana keyboard on iPad
We are seeing a crash when attempting to display the Japanese Kana keyboard (日本語-かな) in our iPhone-only app running on an iPad with iPadOS 27.0.1. The keyboard displays successfully in our app on iPadOS 26 and iPadOS 27.0. We also reproduced a similar crash in other iPhone-only apps downloaded from the App Store on the affected iPad. We have not yet confirmed whether those apps crash with the same exception. Our app logs the following exception: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 15 beyond bounds [0 .. 2]' *** First throw call stack: ( 0x19fab7190 0x19f834380 0x19fa45734 0x1aee9f5bc 0x1aee3dc14 0x1aee3cb30 0x1aee3c4d4 0x1aee3ab0c 0x1a433798c 0x1a44a4120 0x1a449bd5c 0x1a42148c8 0x1a42143fc 0x1a4239d7c 0x1a421203c 0x1a3fc1338 0x1a3d12e0c 0x1a3d11ed0 0x1a52784ec 0x1a3d11abc 0x1a4115238 0x1a3d436d4 0x1a3d43a80 0x1a44eea14 0x1aabb8ef8 0x1a517161c 0x1a5152450 0x1a5153388 0x1a41f20c4 0x1a49e3fec 0x1a426598c 0x1a42657fc 0x1a4265580 0x1a3d62b30 0x1a3d62984 0x1a95c4dac 0x1a994fb68 0x1a95c5514 0x1a95c287c 0x1a95d2608 0x1a3d6841c 0x1a3d6a298 0x1a4263874 0x1a3d60bdc 0x1a3ce8d78 0x1a3ce7b88 0x1a3ce7928 0x2d1482bc0 0x19fa78c20 0x19fa78b94 0x19fa5a268 0x19fa59384 0x19fa5a7f4 0x249e6ff24 0x1a3d381cc 0x1a9d27404 0x1a9d20b50 0x1a9d20a10 0x109042dc4 0x109042e04 0x19f8ab5b8 ) libc++abi: terminating due to uncaught exception of type NSException Steps to reproduce: Enable the Japanese – Kana keyboard in the iPad’s keyboard settings. Open an affected iPhone-only app on an iPad running iPadOS 27.0.1. Tap a text input field and attempt to display the Japanese Kana keyboard. The app crashes. We suspect this may be a regression involving iPhone compatibility mode on iPad and the Japanese Kana keyboard, but we have not yet identified the failing component in a symbolicated stack trace. We have submitted a report through Feedback Assistant: FB24985530. Has anyone else encountered this behavior? Are there any known workarounds we can apply in the app while this is being investigated?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
8
Boosts
7
Views
2.0k
Activity
1w
macOS 27.2: external monitor on a USB-C to HDMI adapter flickers, shows as "12 inch Display" at 1280x720, all resolutions refused (empty EDID)
Since I updated from macOS 27.0.1 to 27.2 (26B123), my second monitor stopped working on a Mac mini M4 Pro. It is a Dell SE2726HG on a USB-C to HDMI adapter. My LG on the built-in HDMI port still works. Symptoms: The Dell flickers. It disconnects and reconnects about once per second. System Settings shows it as "Display", 12 inch, 1280x720 at 50 Hz. Every resolution change is refused, also for the other monitor. A restart, a replug, or a lower refresh rate on the other monitor does not help. What the logs show: macOS cannot read the monitor's EDID through the adapter. IOAVServiceCopyEDID returns 0xe00002c9 (internal error), and the framebuffer has an all-zero EDID. Without an EDID, the kernel gives the display no display pipe: "AED: validate_or_set_ex: fb 2 rejecting request, exceeds full dual-pipe allocation (w 1280 vs 0 ...)" and "skipping display with null info". In 47 minutes, the log had 379 hotplug "out" events. Workaround (no extra hardware, no paid app): I injected a normal 1920x1080 EDID at runtime with the private IOKit call IOAVServiceSetVirtualEDIDMode(service, 1, edid), then IODPDeviceSetUpdated(device, 1). The monitor then comes up with its correct name at 1920x1080, with zero disconnects. The override is lost on reboot, sleep, or replug, so a LaunchAgent re-applies it every 5 seconds when the EDID read fails. This is the same approach as these projects: https://gist.github.com/danii1/99fa5f849a4d42807418259abfbf03d5 https://github.com/owomocha/macos-360hz-unlock BetterDisplay Pro can also apply a custom EDID.
Topic: UI Frameworks SubTopic: General
Replies
3
Boosts
2
Views
438
Activity
1w
iPhone Duo: Keep app on inner display while hinge is open (like Clock)?
Hi! I'm building a night-light app for iPhone Duo. When the device is partly open in tent mode, the lamp starts on the inner display. As soon as I set the phone down on a table, the system moves my window to the outer display, even though the hinge stays open. Apple's Clock app stays on the inner display in the same pose, so it seems possible at the system level. Steps Open iPhone Duo to ~80° (tent). Launch the app on the inner display. Set the device down on a table. Observed (logged from the app) UIHinge.status stays .partiallyOpen (~80°), not .closed. UIDevice.orientation goes portraitUpsideDown → faceDown → landscapeRight. UIScreen.didDisconnectNotification fires and UIScreen.screens drops the inner screen. The window moves to the outer screen (466×678). What I've tried Restricting UISupportedInterfaceOrientations to portrait only Turning on Rotation Lock Reading UIHingeInteraction (read-only, no effect on display routing) Looking at UISceneAccessory.cameraCapture, which only applies with an active capture session and a fully open device Question Is there a supported way for a scene to prefer or stay on the inner display while the hinge isn't closed? If not, I'll file a Feedback Assistant request. iPhone Duo · iOS 27.2 · Xcode 27.2
Replies
1
Boosts
0
Views
70
Activity
1w
Is NavigationSplitView on macOS 27 broken?
On macOS 27 Beta 2, a simple NavigationSplitView example exhibits bizarre behaviour when the window is resized. The sidebar seemingly expands and collapses at random as the window is resized. The symptoms can be exacerbated with toolbar items. The sidebar appears to behave correctly when an inspector view is not present. Copy paste the code below into a new Xcode 27 project and run on macOS 27 and then resize the window: File -> New -> Project... -> App import SwiftUI @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { var body: some View { NavigationSplitView { Text("Sidebar") } detail: { Text("Content") } .inspector(isPresented: .constant(true)) { Text("Inspector") } } } Adding .frame or .inspectorColumnWidth to any of the Text views does not appear to fix the issues. macOS: 27.0 Beta (26A5368g) Xcode: 27.0 beta 2 (27A5209h)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
6
Boosts
1
Views
767
Activity
1w
Tab grayed out, but not disabled
Bug report: FB25495244 This bug also appeared with Xcode 27; it worked previously. scenario: A TabView with, for example, 4 tabs. Data in ContentView is loaded via @Query. In ContentBindingView, the same thing is done, but using a parameter instead of SwiftData. ContentView: If no data is available, the system automatically switches to tab 4 at the start; while you can click on other tabs, they are disabled, and the system will not switch to them. ContentBindingView: When tabDisabled is set to "true", the system automatically switches to Tab 4 upon startup; while it is possible to click on other tabs, they are disabled, and the system will not switch to them. So far, so good. The first three tabs are only active if at least one data record exists or tabDisabled is "false". Tab 4 is always active and is used for data entry. When data is entered in Tab 4, tab 1 to 3 should become active. However, it appears as though tabs 1 through 3 remain disabled—the icons appear grayed out. That is actually not the case; you can click on the tabs, and as soon as you move away from a tab, its icon is displayed correctly. This issue did not exist in Xcode 26. In Xcode 26, all symbols were displayed correctly from the start, once data had been saved. What I noticed on the iPhone Duo: If you open the program on an iPhone Duo while it is closed, enter some data, then move the app to the background, open the iPhone Duo, and bring the application back to the foreground, tabs 1 through 3 will be active. The entire view is being updated, which is why tabs 1 through 3 are now active—though they should have been active already. A side note: The same issue described in the forum post "A layout bug when using Tab View in SwiftUI (FB25490881)" also occurs in this program. The entire view has shifted upward. The text field is no longer visible—only the Add button remains. In the other views, you can only see half of the text. import SwiftUI struct ContentBindingView: View { @State private var tabDisabled: Bool = true @State private var selection: TabSelection = .tab1 private var isTabDisabled: Bool { print("ContentView.isTabDisabled: \(tabDisabled)") return tabDisabled } var body: some View { TabView(selection: $selection) { Tab("Tab 1", systemImage: "waveform.badge.magnifyingglass", value: .tab1) { Text("tab 1") } .disabled(isTabDisabled) Tab("Tab 2", systemImage: "heart", value: .tab2) { Text("tab 2") } .disabled(tabDisabled) Tab("Tab 3", systemImage: "target", value: .tab3) { Text("tab 3") } .disabled(tabDisabled) Tab("Tab 4", systemImage: "gear", value: .tab4) { AddFriendBindingView(tabDisabled: $tabDisabled) } } .onAppear { print("ContentView onAppear disabled: \(tabDisabled)") if tabDisabled { selection = .tab4 } } .onChange(of: selection) { print("ContentView onChange disabled: \(tabDisabled)") } } }struct AddFriendBindingView: View { @Environment(\.dismiss) private var disdmiss @Binding var tabDisabled: Bool @State private var name: String = "" var body: some View { VStack { TextField("Name", text: $name) Button { addFriend() } label: { Text("Add") } .buttonStyle(.borderedProminent) } .padding() .onAppear { print("AddFriendView onAppear disabled: \(tabDisabled)") } } private func addFriend() { tabDisabled = false name = "" disdmiss() } }Christian
Replies
2
Boosts
0
Views
297
Activity
1w
Age Range Functionality in MacOS 27.2 no handle?
I have a running implementation for an iOS Application which is using AgeRange. It was running very well on Mac OS below 27 and was getting the results. It is still working on iOS 27.2 but now in MacOS 27.2 with the same code base I'm getting an } catch AgeRangeService.Error.notAvailable { NSLog("[AgeRangeDeclaration] Handle not available error")Is there a change for MacOS 27 which has to be implemented or do I have to configure something else?
Topic: UI Frameworks SubTopic: General
Replies
1
Boosts
0
Views
125
Activity
1w
Request to remove horizontal blank space for keyboard extensions on iPhone Duo.
I have a custom iOS keyboard extension app. On iPhone Duo, the system forces keyboard extensions inside a container that is narrower than the phone's screen, specifically by adding extra 7 points on the leading and trailing edge in portrait. This creates both a visual and functional blank space on both sides of the keyboard. My keyboard relies on side swipes, which are much more annoying to perform when the keyboard does not occupy full width of the screen. All other devices iPhones before the Duo propely stretch the keyboard to full width, so this is a new issue. Please, reconsider this decision. I believe a better way to handle this is by setting the safe area layout, instead of limiting the container's width itself. I don't see any benefit to protecting these 7 points on each side. Keyboards that don't care will still stay within the limit by respecting the horizontal safe area, while others would get the benefit of better customization.
Replies
0
Boosts
0
Views
107
Activity
1w
iPadOS 27.2 — Software keyboard fails to appear in Swift Playgrounds apps (regression compared with iPadOS 26.2)
The on-screen software keyboard does not appear when editing SwiftUI TextField controls in applications created and executed using Swift Playgrounds on iPadOS 27.2. The issue is reproducible in a completely new, minimal Swift Playgrounds application, independently of any existing application code. Steps to reproduce 1. Open Swift Playgrounds on an iPad running iPadOS 27.2. 2. Create a new blank SwiftUI application. 3. Add a standard TextField bound to a @State String. 4. Run the application using Play. 5. Tap the TextField with a finger. Actual result The TextField displays the insertion cursor and responds to touch interactions, but the software keyboard never appears. Long-pressing the TextField displays the Paste / AutoFill context menu. Handwriting input using Apple Pencil Pro works, but the software keyboard remains unavailable. Disabling Scribble in iPadOS settings does not resolve the problem. The software keyboard works normally in Apple Notes on the same iPad. This issue prevents normal text entry and testing in an actively developed payroll management application built entirely with Swift Playgrounds. The problem also occurs in a completely new sample application, indicating that it is not specific to the payroll application’s code. Request Please investigate this apparent regression affecting software keyboard presentation in Swift Playgrounds on iPadOS 27.2. A fix or an official workaround would be greatly appreciated.
Replies
0
Boosts
1
Views
166
Activity
1w
is NSTextInputClient safe?
is NSTextInputClient safe? I have several apps that has autofill (app name) activity due to NSTextInputClient. I am wondering if my app has this activity will it be submittable to the app store?
Replies
2
Boosts
0
Views
355
Activity
1w
Battery usage timeline graph shows incorrect time labels in macOS 27
Description: The time scale values on the battery usage curve in macOS 27 are displayed incorrectly. The screenshot timestamp is 14:39:11, October 20. Under the "Last 24 Hours" tab for Battery Level and Screen On Time charts, the timeline shows usage extending past 21:00 on October 20. This timestamp does not match the actual current time. It appears the timeline axis failed to shift correctly as time progresses. For comparison: a reference screenshot captured on macOS 26 at 09:30, August 8. Its battery usage timeline rendered correctly. The bottom time span covered August 7 to August 8, which is the expected and proper display behavior. This bug only exists in macOS 27’s battery usage chart. The older macOS 26 implementation works correctly. Device: MacBook Air M5 macOS version: macOS 27.2 RC
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
305
Activity
1w
Launch screen not refreshed after app update: is clearing Library/SplashBoard supported?
We're adding an option to our Unity SDK that gives a game a native launch screen: a launch storyboard (set through UILaunchStoryboardName) showing a full-screen image from an asset catalog. What we see On a clean install, the new launch screen shows as expected. When the same device installs an update over the existing app (tested through TestFlight), the previous launch screen keeps showing. Launching the app several times does not change it. Deleting the app, restarting the device and reinstalling shows the new launch screen straight away. We checked the build itself: the compiled storyboard, the image in Assets.car and the Info.plist keys are all correct, so this looks like the system's launch screen snapshot cache. We assume App Store updates behave the same way. What we're considering On the first launch after an update, the app would delete the cached launch screen snapshots in its own container (Library/SplashBoard), so the system regenerates them and the new launch screen shows on the next launch. This only uses public file APIs inside the app's own sandbox. But Library/SplashBoard is not documented anywhere, so we'd rather ask before shipping it. Questions Is deleting Library/SplashBoard from the app's own container a supported or acceptable practice, or could it cause problems (with the system, or in a future iOS version)? Is there a supported way to make iOS refresh a cached launch screen after an app update? If not, is the expected behaviour simply that the system refreshes the snapshot at some point? Is it documented when that happens (for example after a reboot, or after a certain time)? If clearing the folder isn't recommended, we won't ship it. Updating players would just keep the old launch screen until iOS refreshes it. Thanks!
Replies
1
Boosts
0
Views
281
Activity
1w
What is the recommended way to render a divider line in a NSTextView?
I would like to render a divider line in a NSTextView (like the <div> HTML item) on macOS 10.13 or later. I use Objective-C. I've searched for solutions and it looks like the recommended solution is to use a NSTextAttachmentCell. There was supposedly an example provided on the cocoa-dev mailing list but the archives for this useful mailing list are gone. The issue I'm observing with the NSTextAttachmentCell solution is that it is working almost well with a simple NSTextView example but when used in a more complex application, the rendering of the divider is still fine but there's a huge vertical gap between the divider and the text below the divider. The online documentation for the NSTextAttachmentCell class is not really helpful (and contains typos: "With the exceptions of cellBaselineOffset, attachment, and attachment, all of these methods are implemented by the NSCell class.For general information on text attachments, " -> "attachment" twice, no space between "class." and "For general"). Here's the simple code I'm currently testing for the attachment cell: @implementationMyDividerTextAttachmentCell - (NSRect)cellFrameForTextContainer:(NSTextContainer *)textContainer proposedLineFragment:(NSRect)lineFrag glyphPosition:(NSPoint)position characterIndex:(NSUInteger)charIndex { return NSMakeRect(lineFrag.origin.x, lineFrag.origin.y, textContainer.size.width, 10); } - (void)drawWithFrame:(NSRect)cellFrame inView:(nullable NSView *)controlView { [[NSColor darkGrayColor] setStroke]; [NSBezierPath strokeLineFromPoint:NSMakePoint(0, NSMidY(cellFrame)) toPoint:NSMakePoint(NSMaxX(cellFrame), NSMidY(cellFrame))]; }[Q] Is there an obvious reason why there would be a huge gap (think 200 pixels/points) below the divider? What is the recommended way to render a divider line in a NSTextView if it's not NSTextAttachmentCell.
Replies
4
Boosts
0
Views
355
Activity
1w
Bug Report: Xcode 26.6 Codex Agent Fails with Response Decoding and Model Compatibility Errors
Bug Report: Xcode 26.6 Codex Agent Fails with Response Decoding and Model Compatibility Errors Severity: High — Core agent functionality unavailableComponent: Xcode Intelligence / Codex Agent IntegrationEnvironment: macOS, Xcode 26.6 (17F113)Date reported: November 1, 2026 Summary The built-in Codex coding agent in Xcode consistently fails to process requests, despite successful ChatGPT Pro authentication and a functioning standalone Codex CLI. The problem occurs even with trivial prompts and prevents use of Codex's autonomous development functionality, including the Pursue Goal workflow. The standard ChatGPT integration inside Xcode works correctly. The failure is isolated to the Codex agent integration. Environment ComponentDetailsIDEXcode 26.6 (17F113)Built-in Codex agent0.140.0 (version observed before reinstall)Standalone Codex CLI0.166.0ACP adapter testedcodex-acp 2.5.0AccountChatGPT ProAuthenticationChatGPT account authenticationAffected projectsMultiple SwiftUI projectsModel testedgpt-5.5, gpt-6.1-solActual Behavior When initiating a conversation with the built-in Codex agent in Xcode, the request fails with the following messages: Error 1: Response decoding failure The data couldn’t be read because it isn’t in the correct format.Accompanied by: Your request couldn't be completed.Error 2: Unsupported model With the original model selection: Codex encountered an error: The 'gpt-5.5' model is not supported when using Codex with a ChatGPT account.After explicitly configuring gpt-6.1-sol: Codex encountered an error: The 'gpt-6.1-sol' model is not supported when using Codex with a ChatGPT account.Error 3: ACP communication failure When testing a separately registered Codex ACP adapter: JSON-RPC request with ID [...] failed to produce a response.This was observed in a separate integration experiment and should not automatically be assumed to share the same root cause as the built-in Codex failure. Expected Behavior The built-in Codex agent should: Authenticate with an eligible ChatGPT Pro account. Select a model supported by the account and installed agent version. Correctly initialize the agent and decode its protocol responses. Execute basic prompts without errors. Support Xcode's native agentic development workflows, including Pursue Goal. Present actionable diagnostics when authentication, model selection, or protocol initialization fails. Reproduction Steps Open Xcode 26.6. Open an existing SwiftUI project. Open the Coding Assistant. Start a new conversation. Select Codex under Agents, rather than OpenAI under Chat. Submit a trivial prompt, such as: Reply with exactly OK. Observe the request failing with a response-format error or an unsupported-model error, depending on configuration. The issue is reproducible across multiple attempts and is not specific to a complex coding task. Troubleshooting Performed The following troubleshooting actions have already been attempted: Reauthenticated using the ChatGPT account. Tested configuration-file-based authentication. Reset Codex authentication. Reinstalled Xcode. Reinstalled the Xcode Codex component. Restarted Xcode and created new conversations. Tested explicit model selection through config.toml. Tested standalone Codex with the same ChatGPT Pro account. Tested a separate ACP adapter integration. The built-in Codex agent remains unusable. Confirmed Successful Control Test Standalone Codex CLI 0.166.0 successfully executed a request using GPT-6.1 Sol. Command: codex exec --model gpt-6.1-sol --skip-git-repo-check \ "Reply with exactly OK. Do not edit files or use tools."Observed output: OpenAI Codex v0.166.0 model: gpt-6.1-sol provider: openai reasoning effort: high codex OKThe request completed without an API error. Additionally, Xcode's separate ChatGPT integration displays the ChatGPT Pro account as authenticated, with usage status Under Limit. These observations strongly suggest that the problem is specific to the Xcode Codex integration or its runtime environment, rather than a general account authentication failure. Suspected Root Causes The following are hypotheses requiring investigation, not confirmed causes: 1. Bundled agent version incompatibility Xcode was observed using Codex 0.140.0, while standalone Codex 0.166.0 successfully accessed GPT-6.1 Sol. Please verify whether the bundled Codex agent is compatible with currently available ChatGPT-authenticated models. 2. Model discovery or selection mismatch The bundled agent's model catalog included models that were subsequently rejected by the service. Please investigate whether Xcode refreshes the model catalog, respects model configuration overrides, and selects models based on account eligibility. 3. Agent protocol response decoding The generic data-format error suggests a possible failure to decode an agent response, handle an unsupported response schema, or propagate an underlying API error. Please inspect the agent initialization, response parsing, and error-handling paths. 4. Configuration and authentication isolation The normal ChatGPT integration authenticates successfully, while the Codex agent fails. Please verify how Xcode manages distinct authentication contexts, configuration locations, agent versions, and model capabilities. Requested Engineering Actions Please investigate and address the following: Ensure the Xcode Codex agent is compatible with supported ChatGPT-authenticated models. Verify that the bundled agent version is current and that component updates are correctly delivered. Validate model availability before dispatching requests. Ensure the model selected in Xcode matches the actual model submitted by the agent. Correct any incompatible protocol or JSON response handling. Expose the underlying error details rather than only reporting a generic data-format failure. Confirm that reinstalling or updating the Xcode Codex component restores a functional agent without requiring manual configuration changes. Add regression coverage for ChatGPT Pro authentication, model selection, agent initialization, and basic prompt execution. Impact The issue prevents me from using the Codex agent directly inside Xcode, despite having a ChatGPT Pro subscription and a fully functional standalone Codex CLI. As a result, I cannot use the integrated agentic coding experience or the Pursue Goal workflow that previously worked. Please investigate the bundled Codex runtime, model selection, and protocol compatibility. The successful standalone Codex 0.166.0 test provides a control case for reproducing and isolating the failure.
Replies
1
Boosts
1
Views
371
Activity
1w
HiraginoSans-W4/W5 availability diverges between iOS 16.5.1 and iOS 18.0.1: UIFont(name:) returns nil, XIB labels fall back to Helvetica
Background Our app previously bundled ヒラギノ角ゴシック W4.ttc and W5.ttc via UIAppFonts. App Store review flagged them under ITMS-91198 as Apple-provided fonts. We removed the bundled .ttc files and need to verify the runtime font-resolution behavior before shipping. Case C below shows the original state (with .ttc present) for comparison. Environment Same app, same code, same XIB, physical devices only. Tested OS: iOS 16.5.1 (two builds: with and without bundled .ttc) and iOS 18.0.1 (without bundled .ttc). Xcode 16.x. How to read the logs Each log has three sections: SYSTEM HIRAGINO SANS — UIFont.fontNames(forFamilyName: "Hiragino Sans"), i.e. what the OS itself provides. RAW UIFont(name:) — UIFont(name: "HiraginoSans-W4", size: 16) etc. This is the code path our App.Font wrapper uses. XIB LABEL RESOLVED — four UILabels whose XIB fontDescription specifies HiraginoSans-W3/W4/W5/W6 respectively. resolved= is label.font.fontName at runtime. Case A — iOS 18.0.1, physical device, bundled .ttc removed ===== ENV ===== systemVersion : 18.0.1 target : Physical Device ===== SYSTEM HIRAGINO SANS ===== HiraginoSans-W3 HiraginoSans-W4 HiraginoSans-W5 HiraginoSans-W6 HiraginoSans-W7 HiraginoSans-W8 ===== RAW UIFont(name:) ===== HiraginoSans-W3 OK family=Hiragino Sans HiraginoSans-W4 OK family=Hiragino Sans HiraginoSans-W5 OK family=Hiragino Sans HiraginoSans-W6 OK family=Hiragino Sans ===== XIB LABEL RESOLVED ===== W3Lab xib=HiraginoSans-W3 resolved=HiraginoSans-W3 family=Hiragino Sans W4Lab xib=HiraginoSans-W4 resolved=HiraginoSans-W4 family=Hiragino Sans W5Lab xib=HiraginoSans-W5 resolved=HiraginoSans-W5 family=Hiragino Sans W6Lab xib=HiraginoSans-W6 resolved=HiraginoSans-W6 family=Hiragino Sans ===== END =====Case B — iOS 16.5.1, physical device, bundled .ttc removed ===== ENV ===== systemVersion : 16.5.1 target : Physical Device ===== SYSTEM HIRAGINO SANS ===== HiraginoSans-W3 HiraginoSans-W6 HiraginoSans-W7 ===== RAW UIFont(name:) ===== HiraginoSans-W3 OK family=Hiragino Sans HiraginoSans-W4 nil HiraginoSans-W5 nil HiraginoSans-W6 OK family=Hiragino Sans ===== XIB LABEL RESOLVED ===== W3Lab xib=HiraginoSans-W3 resolved=HiraginoSans-W3 family=Hiragino Sans W4Lab xib=HiraginoSans-W4 resolved=Helvetica family=Helvetica W5Lab xib=HiraginoSans-W5 resolved=Helvetica family=Helvetica W6Lab xib=HiraginoSans-W6 resolved=HiraginoSans-W6 family=Hiragino Sans ===== END =====Case C — iOS 16.5.1, physical device, bundled .ttc present (original state) ===== ENV ===== systemVersion : 16.5.1 target : Physical Device ===== SYSTEM HIRAGINO SANS ===== HiraginoSans-W3 HiraginoSans-W4 HiraginoSans-W5 HiraginoSans-W6 HiraginoSans-W7 ===== RAW UIFont(name:) ===== HiraginoSans-W3 OK family=Hiragino Sans HiraginoSans-W4 OK family=Hiragino Sans HiraginoSans-W5 OK family=Hiragino Sans HiraginoSans-W6 OK family=Hiragino Sans ===== XIB LABEL RESOLVED ===== W3Lab xib=HiraginoSans-W3 resolved=HiraginoSans-W3 family=Hiragino Sans W4Lab xib=HiraginoSans-W4 resolved=HiraginoSans-W4 family=Hiragino Sans W5Lab xib=HiraginoSans-W5 resolved=HiraginoSans-W5 family=Hiragino Sans W6Lab xib=HiraginoSans-W6 resolved=HiraginoSans-W6 family=Hiragino Sans ===== END =====Observations Comparing B and C (same OS, only .ttc presence differs): removing the bundled .ttc removes HiraginoSans-W4/W5 from the system font list, makes UIFont(name:) return nil for them, and makes XIB labels naming them fall back to Helvetica — not SF, not the nearest weight in the same family. Comparing B and A (same .ttc state, only OS differs): iOS 18.0.1 ships HiraginoSans-W3–W8 in the system, so removing the bundled .ttc has no effect there. Question 1 — System font inventory by OS version Is there an official, versioned list of system-provided fonts (PostScript names) per iOS release? We need to determine which Hiragino Sans weights are available on a given OS at runtime, without hard-coding assumptions. Our observations show that iOS 16.5.1 does not provide HiraginoSans-W4/W5 in the system font set, while iOS 18.0.1 provides W3–W8. If no per-version official list exists, is UIFont.familyNames / UIFont.fontNames(forFamilyName:) the recommended runtime enumeration method? Or is there a documented recommendation to avoid relying on specific PostScript names across OS versions? Question 2 — XIB fontDescription fallback rule When a UILabel's XIB fontDescription specifies a font PostScript name that is not available at runtime (e.g. HiraginoSans-W4 on iOS 16.5.1 after removing the bundled .ttc), we observe UIKit falls back to Helvetica — not SF, not the nearest available weight in the same family. Is this fallback rule documented? Is it stable across iOS versions, or should we treat the fallback target as unspecified? If the fallback target cannot be relied upon, what is the recommended approach for XIB-based layouts that must not render with an unexpected font? Must every such label be re-assigned in code after awakeFromNib / viewDidLoad? Or is there a supported way to declare a fallback chain in Interface Builder?
Replies
0
Boosts
0
Views
69
Activity
1w