Currently i am trying really hard to create experience like the Apple fitness app. So the main view is a single day and the user can swipe between days. The week would be displayed in the toolbar and provide a shortcut to scroll to the right day.
I had many attempts at solving this and it can work. You can create such an interface with SwiftUI. However, changing the data on every scroll makes limiting view updates hard and additionally the updates are not related to my code directly. Instruments show me long updates, but they belong to SwiftUI and all the advice i found does not apply or help.
struct ContentView: View {
@State var journey = JourneyPrototype(selection: 0)
@State var position: Int? = 0
var body: some View {
ScrollView(.horizontal) {
LazyHStack(spacing: 0) {
ForEach(journey.collection, id: \.self) { index in
Listing(index: index)
.id(index)
}
}
.scrollTargetLayout()
}
.scrollTargetBehavior(.paging)
.scrollPosition(id: $position)
.onChange(of: position) { oldValue, newValue in
journey.selection = newValue ?? 0
journey.update()
}
.onScrollPhaseChange { oldPhase, newPhase in
if newPhase == .idle {
journey.commit()
}
}
}
}
struct Listing: View {
var index: Int
var body: some View {
List {
Section {
Text("Title")
.font(.largeTitle)
.padding()
}
Section {
Text("\(index)")
.font(.largeTitle)
.padding()
}
Section {
Text("1 ")
Text("2 ")
Text("3 ")
Text("4 ")
Text("5 ")
Text("6 ")
}
}
.containerRelativeFrame(.horizontal)
}
}
@Observable
class JourneyPrototype {
var selection: Int
var collection: [Int]
var nextUp: [Int]?
init(selection: Int) {
self.selection = selection
self.collection = [selection]
Task {
self.collection = [-2,-1,0,1,2]
}
}
func update() {
self.nextUp = [
self.selection - 2,
self.selection - 1,
selection,
self.selection + 1,
self.selection + 2
]
}
func commit() {
self.collection = self.nextUp ?? self.collection
self.nextUp = nil
}
}
#Preview {
ContentView()
}
There are some major Problem with this abstracted prototype
ScrollView has no good trigger for the update, because if i update on change of the position, it will update much more than once. Thats why i had to split calculation and applying the diff
The LazyHStack is not optimal, because there are only 5 View in the example, but using HStack breaks the scrollPosition
Each scroll updates all List, despite changing only 2 numbers in the array. AI recommended to append and remove, which does nothing about the updates.
In my actual Code i do this with Identifiable data and the Problem is the same. So the data itself is not the problem?
Please consider, this is just the rough prototype to explain the problem, i am aware that an array of Ints is not ideal here, but the problem is the same in Instruments and much shorter to post.
Why am i posting this? Scrolling through dynamic data is required for many apps, but there is no proper solution to this online. Github and Blogs are fine with showing a progress indicator and letting the user wait, some probably perform worse than this prototype. Other solutions require UIKit like using a UIPageViewController. But even using this i run in small hitches related to layout.
Important consideration, my data for the scrollview is too big to be calculated upfront. 100 years of days that are calculated for my domain logic take too long, so i have no network request, but the need to only act on a smaller window of data.
Instruments shows long update for one scroll action tested on a iPhone SE 2nd generation
ListRepresentable has 7 updates and takes 17ms
LazySubViewPlacements has 2 updates and takes 8ms
Other long updates are too verbose to include
I would be very grateful for any help.
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
What works
let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
backButton.hidesSharedBackground = true
self.navigationItem.rightBarButtonItem = backButton
// or
self.navigationItem.leftBarButtonItem = backButton
What doesn't work
let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
backButton.hidesSharedBackground = true
self.navigationItem.backBarButtonItem = backButton
I've tried setting this property on all possible permutations and combinations e.g. Inside navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) and pushViewController(_ viewController: UIViewController, animated: Bool) of a custom UINavigationController to make sure.
Expected vs Actual behavior
Setting hidesSharedBackground = true should remove the glass background from both regular bar button items and back bar button items but it has no effect on backBarButtonItem.
Additional context
I’m aware of the UIDesignRequiresCompatibility Info.plist key, but I’m looking for a programmatic solution if there is one. The goal is to remove the glass background from back buttons.
Hi all,
I’m running into a “double update” effect in SwiftUI when using the @Observable with @State. I’m trying to understand whether this is expected behavior, a misuse on my side, or a potential bug.
Setup
I have an observable store using the Observation macro:
@Observable
class AlbumStore {
var albums: [Album] = [
Album(id: "1", title: "Album 1", author: "user1"),
Album(id: "2", title: "Album 2", author: "user1"),
Album(id: "3", title: "Album 3", author: "user1"),
Album(id: "4", title: "Album 4", author: "user1"),
Album(id: "5", title: "Album 5", author: "user1"),
Album(id: "6", title: "Album 6", author: "user1")
]
func addAlbum(_ album: Album) {
albums.insert(album, at: 0)
}
func removeAlbum(_ album: Album) {
albums.removeAll(where: { $0 == album })
}
}
In my view, I inject it via @Environment and also keep some local state:
@Environment(AlbumStore.self) var albumStore
@State private var albumToAdd: Album?
I derive a computed array that depends on both the environment store and local state:
private var filteredAlbums: [Album] {
let albums = albumStore.albums.filter { album in
if let albumToAdd {
return album.id != albumToAdd.id
} else {
return true
}
}
return albums
}
View usage
Inside a horizontal ScrollView / LazyHStack, I observe changes to filteredAlbums:
@ViewBuilder
private func carousel() -> some View {
GeometryReader { proxy in
let itemWidth: CGFloat = proxy.size.width / 3
let sideMargin = (proxy.size.width - itemWidth) / 2
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(spacing: 20) {
ForEach(filteredAlbums, id: \.id) { album in
albumItem(album: album)
.frame(width: itemWidth)
.scrollTransition(.interactive, axis: .horizontal) { content, phase in
content
.scaleEffect(phase.isIdentity ? 1.0 : 0.8)
}
}
}
.scrollTargetLayout()
}
.scrollTargetBehavior(.viewAligned(limitBehavior: .always))
.scrollPosition(id: $carouselScrollID, anchor: .center)
.contentMargins(.horizontal, sideMargin, for: .scrollContent)
.onChange(of: filteredAlbums) { old, new in
print("filteredAlbums id: \(new.map { $0.id })")
}
}
}
Triggering the update
When I add a new album, I do:
albumToAdd = newAlbum
albumStore.addAlbum(newAlbum)
Expected behavior
Since filteredAlbums explicitly filters out albumToAdd, I expect the result to remain unchanged.
Actual behavior
I consistently get two onChange callbacks, in this order:
filteredAlbums id: ["E852E42A-AAEC-4360-A6A6-A95752805E2E", "1", "2", "3", "4", "5", "6"]
filteredAlbums id: ["1", "2", "3", "4", "5", "6"]
This suggests:
The AlbumStore update (albums.insert) is observed first.
The @State update (albumToAdd) is applied later.
As a result, filteredAlbums is recomputed twice with different dependency snapshots.
On a real iPad device, this also causes a visible scroll position jump.
In the simulator, the jump is not visually observable; however, the onChange(of: filteredAlbums) callback still fires twice with the same sequence of values, indicating that the underlying state update behavior is identical.
Strange observations
This does not happen with ObservableObject
If I replace @Observable with a classic ObservableObject + @Published:
class OBAlbumStore: ObservableObject {
@Published var albums: [Album] = [
Album(id: "1", title: "Album 1", author: "user1"),
Album(id: "2", title: "Album 2", author: "user1"),
Album(id: "3", title: "Album 3", author: "user1"),
Album(id: "4", title: "Album 4", author: "user1"),
Album(id: "5", title: "Album 5", author: "user1"),
Album(id: "6", title: "Album 6", author: "user1")
]
func addAlbum(_ album: Album) {
albums.insert(album, at: 0)
}
func removeAlbum(_ album: Album) {
albums.removeAll(where: { $0 == album })
}
}
…and inject it with @EnvironmentObject, the double update disappears.
Removing GeometryReader also avoids the issue
If I remove the surrounding GeometryReader and hardcode sizes:
@ViewBuilder
private func carousel() -> some View {
// GeometryReader { proxy in
let itemWidth: CGFloat = 400
let sideMargin: CGFloat = 410
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(spacing: 20) {
ForEach(filteredAlbums, id: \.id) { album in
albumItem(album: album)
.frame(width: itemWidth)
.scrollTransition(.interactive, axis: .horizontal) { content, phase in
content
.scaleEffect(phase.isIdentity ? 1.0 : 0.8)
}
}
}
.scrollTargetLayout()
}
.scrollTargetBehavior(.viewAligned(limitBehavior: .always))
.scrollPosition(id: $carouselScrollID, anchor: .center)
.contentMargins(.horizontal, sideMargin, for: .scrollContent)
.onChange(of: filteredAlbums) { old, new in
print("filteredAlbums id: \(new.map { $0.id })")
}
// }
}
…the double onChange no longer occurs.
Questions
Is this update ordering expected when using @Observable and @State?
Does Observation intentionally propagate environment changes before local state updates?
Is GeometryReader forcing an additional evaluation pass that exposes this ordering?
Is this a known limitation / bug compared to ObservableObject?
I want to understand why this behaves differently under Observation.
Thanks in advance for any insights 🙏
Full Project Link
NSWindow objects with custom styleMask configurations seem to behave erratically in macOS Tahoe 26.3 RC.
For example an NSWindow is not resizable after issuing .styleMask.remove(.titled) or some NSWindow-s become totally unresponsive (the NSWindow becomes transparent to mouse events) with custom styleMask-s.
This is a radical change compared to how all previous macOS versions or the 26.3 beta3 worked and seriously affects apps that might use custom NSWindows - this includes some system utilities, OSD/HUD apps etc, actually breaking some apps.
Such fundamental compatibility altering changes should not be introduced in an RC stage (if this is intentional and not a bug) imho.
Opened feedback item FB21877364.
Context
I have the following Metal shader, which replaces one color with another.
[[ stitchable ]]
half4 recolor(
float2 position,
half4 currentColor,
half4 from,
half4 to
) {
if (all(currentColor == from))
return to;
return currentColor;
}
Given this SwiftUI view:
let shader = ShaderLibrary.recolor(.color(.red), .color(.green))
Color.red
.colorEffect(shader)
I get a red rectangle instead of the expected green one.
Note that this works on both dynamic and non-dynamic colors.
Note that this sometimes works with some colors, which is very inconvenient when trying to figure out what's going on.
Did I miss something? I would've expected the shader to work with colors the same way.
Issue
To really highlight the issue, here's another test case.
I'll define #94877E in an Asset Catalog as example and check the RGB values using the Digital Color Meter app in "Display native values" mode.
We'll use the following shader to determine how colorEffect receives colors:
[[ stitchable ]]
half4 test(
float2 position,
half4 currentColor,
half4 color
) {
return color;
}
The following view yields "R: 0.572, G: 0.531, B: 0.498".
Color.example
While this one yields "R: 0.572, G: 0.531, B: 0.499".
let shader = ShaderLibrary.test(.color(Color.example))
Color.white.colorEffect(shader)
I would expect them to match.
Topic:
UI Frameworks
SubTopic:
SwiftUI
When using the Password AutoFill feature, after entering a password and navigating to another page, a system prompt appears asking whether to save the password to the keychain (as shown in the figure). If this prompt is not dismissed and the app is moved to the background, then brought back to the foreground, the prompt automatically disappears. However, after this occurs, all input fields within the app become unresponsive to keyboard input—no keyboard will appear when tapping any text field. The only way to restore keyboard functionality is to force-quit the app and relaunch it. How can this issue be resolved?
Hello, Developers!
While writing custom view modifier I ran into unexpected behavior of .strokeBorder modifier. The underlying content seem to be “bleeding” outside of the stroke border edges, even though they share the exact same shape for their layout.
This issue relevant for both Xcode Previews and on-device testing.
Maybe someone has experienced this issue before, I'd be glad to see your opinion on this matter.
I am adopting some of the new glass UI, but having to duplicate a lot of code to maintain support for previous UI systems in macOS. An example:
if #available(macOS 26.0, *) {
VStack {
/*some 40+ lines of code clipped here for brevity*/
}
.cueButtons()
.cueStyleGlass()
} else {
VStack {
/*identical 40+ lines of code clipped here for brevity*/
}
.cueButtons()
.cueStyle()
}
If I try to use conditional modifiers as indicated here:
extension View {
func cueStyle(font: Font = .system(size: 45)) -> some View {
if #available(macOS 26.0, *) {
modifier(GlassCueStyle(font: font))
} else {
modifier(CueStyle(font: font))
}
}
}
I get this error:
Conflicting arguments to generic parameter 'τ_1_0' ('ModifiedContent<Self, GlassCueStyle>' vs. 'ModifiedContent<Self, CueStyle>')
Is there a better way to do this?
Hello,
We’re seeing an iPad-specific Launch Screen issue related to multitasking window sizes.
Environment
Device: iPad (iPadOS 26)
Device orientation: Landscape
App is launched in a small window where the app window is portrait-shaped (width < height)
Issue
When the iPad is in landscape but the app is launched as a portrait-shaped small window, the LaunchScreen.storyboard appears to be rendered/layouted as landscape, not matching the actual window geometry. As a result, the Launch Screen content is clipped / partially missing (we see blank/empty area at the bottom during launch). After the app finishes launching, our first view controller uses the correct window size and the UI looks fine — the problem is mainly during the Launch Screen phase.
What we checked
LaunchScreen.storyboard uses Auto Layout and is expected to adapt to screen/window size.
This only reproduces when the device orientation and the app window aspect ratio don’t match (landscape device + portrait-shaped app window, or vice versa). When device orientation and window shape are aligned, the Launch Screen displays correctly.
Question
Is it expected that iPadOS renders LaunchScreen.storyboard based on the interface orientation / size class rather than the actual window bounds in multitasking scenarios?
If not expected, what is the recommended way to ensure the Launch Screen matches the app’s actual window size/aspect ratio at launch (without using code, since Launch Screen is static)?
Are there any additional diagnostics or recommended steps to help us investigate and confirm the root cause (e.g., specific logs, APIs/values to capture at launch such as UIWindowScene bounds, interfaceOrientation, size classes, or any guidance on how Launch Screen snapshots are chosen/cached in multitasking)?
Thank you.
I'm struggling to understand whether TextField handles undo by itself, or how to properly handle it myself.
In a macOS app with a SwiftUI lifecycle, in a DocumentGroup scene, I'm using both TextEditors and Textfields. The text editors handle undo out of the box, with undo coalescing.
The text fields seem not to. However, on occasion, they do create undo points, leaving me confused as to what conditions are needed for that to happen.
Is there a way to reliably get text fields to handle undo on their own? Or, how should I implement typing undo, including undo coalescing, manually?
Topic:
UI Frameworks
SubTopic:
SwiftUI
I’m seeing unexpected UITabBar behavior on iOS 26 when Liquid Glass is enabled.
I’m using UITabBarAppearance with a dynamic UIColor to keep the selected tab bar icon and title text in sync (blue in light mode, green in dark mode).
Expected behavior
The selected tab bar icon and title text should always resolve to the same color based on the current trait collection.
Actual behavior
On initial load, the colors are correct. However, after switching light/dark mode (or any trait change that triggers a material update):
The icon keeps the configured color
The title text color is overridden by the system
Result: selected icon and title text end up with different colors
This happens even though both colors are explicitly set to the same dynamic UIColor.
Minimal reproducible example:
func applyAppearance() {
let color = UIColor { trait in
trait.userInterfaceStyle == .dark ? .green : .blue
}
self.tabBar.tintColor = color
}
Topic:
UI Frameworks
SubTopic:
UIKit
I'm trying to replicate edit/select mode of iOS 26 photos app. When user clicks Select button, bottom tab bar is replaced by the toolbar buttons. When I press Done button, a white opaque bar appears at the bottom behind the tabbar. It looks pretty straightforward to implement but I'm banging my head here now. Any help will be appreciated.
Code and animation frames attached bellow
struct ContentView: View {
var body: some View {
TabView(selection: $selectedTab) {
OverviewView()
.tabItem {
Image(systemName: "chart.pie")
Text("Overview")
}
.tag(0)
//rest of the tabs
}
}
}
struct OverviewView: View {
@State private var editActive = false
@State private var selection = Set<String>()
@State private var items = [
"Item 1",
"Item 2",
"Item 3",
]
var body: some View {
NavigationStack {
List(selection: $selection) {
ForEach(items, id: \.self) { item in
Text(item)
}
}
.toolbar {
if editActive {
ToolbarItem(placement: .bottomBar) {
Button {
} label: {
Label("Delete", systemImage: "trash")
}
}
ToolbarItem(placement: .bottomBar) {
Button {
} label: {
Label("Category", systemImage: "tag")
}
}
}
ToolbarItem(placement: .topBarTrailing) {
Button(editActive ? "Done" : "Select") {
withAnimation {
editActive.toggle()
}
}
}
}
.environment(\.editMode, .constant(editActive ? .active : .inactive))
.toolbar(editActive ? .hidden : .visible, for: .tabBar)
}
}
}
I have attached 5 frames during animation phase.
Platform
UIKit
iOS
UIActivityViewController
Environment
Device (issue reported): iPhone 16
iOS Version: 26.2
App Type: UIKit / Swift (standard modal presentation of UIActivityViewController)
Summary
When presenting UIActivityViewController to share a CSV file, the share sheet does not allow vertical scrolling, making lower actions (including Save to Files) unreachable.
The same flow works correctly when sharing a PDF, and the issue cannot be reproduced on other test devices.
Steps to Reproduce
Launch the app and log in
Navigate to More → Reports
Tap Export Report
Choose Export Report (CSV)
Observe the share sheet
Expected Result
The user should be able to vertically scroll the share sheet
All share actions (including Save to Files) should be reachable
Actual Result
Share sheet opens but vertical scrolling is disabled
Lower options (including Save to Files) are not reachable
No crash or console errors
When using an image in a List item, you sometimes want to tint that image, but only if the item isn’t selected. When it’s selected, you usually want the contents of the list item to be all-white, for contrast.
The backgroundProminence Environment value ostensibly exists for this purpose, but in my tests, it never seems to change. Am I doing something wrong? Is there an alternative solution?
For instance, this code:
import SwiftUI
struct ProminentBackgroundInList: View {
var body: some View {
List(selection: .constant(0)) {
ListItem().tag(0)
ListItem().tag(1)
}
}
}
struct ListItem: View {
@Environment(\.backgroundProminence) var backgroundProminence
var body: some View {
HStack {
Image(systemName: "person.fill")
.foregroundStyle(backgroundProminence == .standard ? .orange : .primary)
Text("Person")
}
}
}
#Preview {
ProminentBackgroundInList()
}
Produces this result:
I'd like to create a Quick Look extension for a file type for which a location or region on a Map should be shown as preview.
However the MapView would only show a grid without any map. From within the MapKit delegate I can see from the "Error" parameter (a server with this domain can not be found) that this seems to be a network issue. The Quick Look extension seems to have no access to the internet and therefore the MapView can not load any map data.
I've then also done some other tests via URLSession, which also only fails with connection errors.
I haven't seen any limitations or restrictions mentioned in the API documentation.
Is this the expected behavior? Is this a bug? Or am I missing something?
I have the following view hierarchy in my app:
[UINavigationController] -> [MainViewController] -> [MyTabBarController] -> [DashboardViewController]
In my MainViewController I have a button that pushes the MyTabBarController onto the navigation controllers stack. In the tab bar controller I only have one tab in this example showing the DashboardViewController.
That all works fine, and when I tap the back button on MyTabBarController, everything works fine and the MainViewController is shown again. The UI works exactly how I want it, but when I load up the 'Debug Memory Graph' view, I can see that my DashboardViewController is still in memory and it seems the UITab has a reference to it. The MyTabBarController is NOT in memory anymore.
MyTabBarController is very simple:
class MyTabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
self.mode = .tabSidebar
var allTabs:[UITab] = []
let mainTab = UITab(title: "Dashboard",
image: UIImage(systemName: "chart.pie"),
identifier: "dashboard",
viewControllerProvider: { _ in
return UINavigationController(rootViewController: DashboardViewController())
})
allTabs.append(mainTab)
setTabs(allTabs, animated: false)
}
}
And the DashboardViewController is empty:
class DashboardViewController: UIViewController {
}
The only reason I created as a seperate class in this example is so I can easily see if it's visible in the memory debug view.
I have uploaded the simple sample app to GitHub:
https://github.com/fwaddle/TabbarMemoryLeakCheck
Anyone have any suggestions?
Here is a screen grab of the memory debug view showing the UITab having a reference to the DashboardViewController even though MyTabBarController has been dealloc'd:
Topic:
UI Frameworks
SubTopic:
UIKit
1. Summary
In a hybrid iOS app using WKWebView (Angular + Capacitor), after programmatically blurring an element and connecting a Bluetooth keyboard, pressing Ctrl+Home or Ctrl+End causes the app to crash.
The crash stack shows the issue occurs inside UIKit keyboard handling (UITextInteractionSelectableInputDelegate _moveToStartOfLine), indicating a system-level bug.
2. Steps to Reproduce
Open the hybrid app containing a WKWebView.
Blur the input (programmatically).
Connect a Bluetooth keyboard.
Press Ctrl + Home or Ctrl + End.
Expected result:
No crash. The command should be ignored if no text input is active.
Actual result:
App crashes immediately.
3. Crash Log (Crashlytics Trace)
Crashed: com.apple.main-thread
0 WebKit 0xfbdad0 <redacted> + 236
1 UIKitCore 0x10b0548 -[UITextInteractionSelectableInputDelegate _moveToStartOfLine:withHistory:] + 96
2 UIKitCore 0xd0fb38 -[UIKBInputDelegateManager _moveToStartOfLine:withHistory:] + 188
3 UIKitCore 0xa16174 __158-[_UIKeyboardStateManager handleMoveCursorToStartOfLine:beforePublicKeyCommands:testOnly:savedHistory:force:canHandleSelectableInputDelegateCommand:keyEvent:]_block_invoke + 52
4 UIKitCore 0xa36ae4 -[_UIKeyboardStateManager performBlockWithTextInputChangesIgnoredForNonMacOS:] + 48
5 UIKitCore 0xa160f0 -[_UIKeyboardStateManager handleMoveCursorToStartOfLine:beforePublicKeyCommands:testOnly:savedHistory:force:canHandleSelectableInputDelegateCommand:keyEvent:] + 440
6 UIKitCore 0xa06614 -[_UIKeyboardStateManager handleKeyCommand:repeatOkay:options:] + 3204
7 UIKitCore 0xa2fb64 -[_UIKeyboardStateManager _handleKeyCommandCommon:options:] + 76
8 UIKitCore 0xa2fb08 -[_UIKeyboardStateManager _handleKeyCommand:] + 20
9 UIKitCore 0xa30684 -[_UIKeyboardStateManager handleKeyEvent:executionContext:] + 2464
10 UIKitCore 0xa2f95c __42-[_UIKeyboardStateManager handleKeyEvent:]_block_invoke + 40
11 UIKitCore 0x4b9460 -[UIKeyboardTaskEntry execute:] + 208
12 UIKitCore 0x4b92f4 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 356
13 UIKitCore 0x4b8be0 -[UIKeyboardTaskQueue addTask:breadcrumb:] + 120
14 UIKitCore 0xa2f8d0 -[_UIKeyboardStateManager handleKeyEvent:] + 432
15 CoreFoundation 0x2f934 __invoking___ + 148
16 CoreFoundation 0x2efac -[NSInvocation invoke] + 424
17 UIKitCore 0x14cbcc4 -[UIRepeatedAction invoke] + 176
18 UIKitCore 0x14cbeb8 -[UIRepeatedAction _preInvocationTimerFire] + 56
19 UIKitCore 0x1195364 -[UIApplication _handleKeyboardPressEvent:] + 2192
20 UIKitCore 0x1187278 -[UIApplication pressesBegan:withEvent:] + 328
21 UIKitCore 0x9b808 forwardTouchMethod + 376
22 UIKitCore 0x9b808 forwardTouchMethod + 376
23 UIKitCore 0x9b808 forwardTouchMethod + 376
24 UIKitCore 0x9b808 forwardTouchMethod + 376
25 UIKitCore 0x9b808 forwardTouchMethod + 376
26 UIKitCore 0x9b808 forwardTouchMethod + 376
27 UIKitCore 0x9b808 forwardTouchMethod + 376
28 UIKitCore 0x9b808 forwardTouchMethod + 376
29 WebKit 0x66e2b4 <redacted> + 84
30 UIKitCore 0x9b808 forwardTouchMethod + 376
31 UIKitCore 0x157290c -[UIScrollView pressesBegan:withEvent:] + 148
32 UIKitCore 0x9b808 forwardTouchMethod + 376
33 WebKit 0xfbbd04 <redacted> + 100
34 UIKitCore 0x11a7620 -[UIWindow _sendButtonsForEvent:] + 312
35 UIKitCore 0x522dc -[UIWindow sendEvent:] + 568
36 UIKitCore 0x5f508 -[UIApplication sendEvent:] + 376
37 UIKitCore 0x1194364 -[UIApplication _handleKeyUIEvent:] + 136
38 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
39 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
40 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
41 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
42 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
43 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
44 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
45 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
46 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
47 UIKitCore 0x11a3e14 -[UIResponder _handleKeyUIEvent:] + 56
48 UIKitCore 0x11943e8 -[UIApplication handleKeyUIEvent:] + 56
49 UIKitCore 0x11942ac -[UIApplication _handleKeyHIDEvent:usingSyntheticEvent:] + 660
50 UIKitCore 0x117ac __dispatchPreprocessedEventFromEventQueue + 4648
51 UIKitCore 0xfbe4 __processEventQueue + 4812
52 UIKitCore 0x94e4 updateCycleEntry + 160
53 UIKitCore 0x9404 _UIUpdateSequenceRun + 84
54 UIKitCore 0x8ab4 schedulerStepScheduledMainSection + 208
55 UIKitCore 0x41e4 runloopSourceCallback + 92
56 CoreFoundation 0xf92c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
57 CoreFoundation 0xf744 __CFRunLoopDoSource0 + 172
58 CoreFoundation 0xf5a0 __CFRunLoopDoSources0 + 232
59 CoreFoundation 0xff20 __CFRunLoopRun + 840
60 CoreFoundation 0x11adc CFRunLoopRunSpecific + 572
61 GraphicsServices 0x1454 GSEventRunModal + 168
62 UIKitCore 0x135274 -[UIApplication _run] + 816
63 UIKitCore 0x100a28 UIApplicationMain + 336
64 Order 0xa2ed0 main + 21 (AppDelegate.swift:21)
4. Environment
iPadOS versions: 18.1.0, 18.4.1, 18.6.2
WebView: WKWebView
Hybrid stack: Angular + (Capacitor)
Reproducible on multiple iPads and multiple iPadOS 18.x versions.
5. Expected Behavior
Pressing Ctrl+Home or Ctrl+End when no text input is active should be ignored and should not crash the app.
I’m trying to add a container view above a list view that stretches edge-to-edge across the device.
What’s the recommended approach to achieve this layout with Swift UI?
Example
Topic:
UI Frameworks
SubTopic:
SwiftUI
Environment
iOS 17.2, Xcode 16.2, physical iPhone (12 Pro)
Main app in Flutter
WidgetKit extension written in Swift (Swift‑PM package)
Shared App Group: group.cool.glance.shared
Widget uses an AppIntent (FeedSelectionIntent) + custom entity (FeedAppEntity)
Flutter bridge writes JSON snapshots for the widget
Observed behaviour
Flutter prints the snapshot payload and writes /…/AppGroup/<uuid>/Library/Caches/feed_snapshots.json.
Widget gallery only shows the plain grey system placeholder (my sample placeholder never appears).
Console log every time WidgetKit runs:
chronod: Unable to resolve default intent (appintent:FeedSelectionIntent) for extension cool.glance.app.widget
Error Domain=LNMetadataProviderErrorDomain Code=9000
LinkMetadata.BundleMetadataExtractionError.aggregateMetadataIsEmpty
Added os_log in the widget + bridge (WidgetsBridgePlugin, FeedSnapshotStore, FeedEntityQuery, FeedSummaryTimeline), but none of them ever appear. That suggests the widget bundle can’t see the compiled AppIntent metadata or the snapshot file even though it’s there.
Code (trimmed to essentials)
FeedSelectionIntent.swift
struct FeedSelectionIntent: AppIntent, WidgetConfigurationIntent {
static var title: LocalizedStringResource = "Feed"
static var description = IntentDescription("Choose which feed should appear in the widget.")
@Parameter(title: "Feed",
requestValueDialog: IntentDialog("Select which feed to display."))
var feed: FeedAppEntity?
static var parameterSummary: some ParameterSummary { Summary("Show \(\.$feed)") }
init() { feed = FeedAppEntity.sample }
init(feed: FeedAppEntity?) { self.feed = feed }
static var defaultValue: FeedSelectionIntent { FeedSelectionIntent(feed: .sample) }
func perform() async throws -> some IntentResult { .result() }
}
FeedSnapshotStore.loadSnapshots()
guard let containerURL = fileManager.containerURL(
forSecurityApplicationGroupIdentifier: appGroupIdentifier) else {
os_log("FeedSnapshotStore: missing app group container %{public}s", log: Self.log, type: .error, appGroupIdentifier)
return []
}
let fileURL = SharedConstants.feedSnapshotRelativePath.reduce(containerURL) { url, component in
url.appendingPathComponent(component, isDirectory: component != SharedConstants.feedSnapshotFileName)
}
guard let data = try? Data(contentsOf: fileURL), !data.isEmpty else {
os_log("FeedSnapshotStore: no snapshot data found at %{public}s", log: Self.log, type: .info, fileURL.path)
return []
}
// decode FeedSnapshotEnvelope…
WidgetsBridgePlugin.writeSnapshots (Flutter → widget)
guard let containerURL = fileManager.containerURL(
forSecurityApplicationGroupIdentifier: SharedConstants.appGroupIdentifier) else {
result(FlutterError(code: "container-unavailable", message: "Unable to locate shared app group container.", details: nil))
return
}
let targetDir = SharedConstants.feedSnapshotRelativePath.dropLast().reduce(containerURL) {
$0.appendingPathComponent($1, isDirectory: true)
}
try fileManager.createDirectory(at: targetDir, withIntermediateDirectories: true)
let targetURL = targetDir.appendingPathComponent(SharedConstants.feedSnapshotFileName, isDirectory: false)
try data.write(to: targetURL, options: .atomic)
WidgetCenter.shared.reloadTimelines(ofKind: "GlanceSummaryWidget")
os_log("WidgetsBridgePlugin: wrote snapshots for %{public}d feeds at %{public}s",
log: WidgetsBridgePlugin.log,
type: .info,
envelope.feeds.count,
targetURL.path)
Info.plist for the widget contains only:
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widgetkit-extension</string>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>cool.glance.app</string>
</dict>
(If I add NSExtensionPrincipalClass, the install fails with “principal class not allowed for com.apple.widgetkit-extension”, so it stays out.)
What I’ve double‑checked
App Group entitlement present on Runner.app and the widget extension.
Snapshot file definitely exists under Library/Caches/feed_snapshots.json (size updates when Flutter writes).
Code matches Apple’s “Making a configurable widget” sample (custom WidgetConfigurationIntent, entity, and timeline provider).
Cleaned build folders (Flutter + Xcode), reinstalled app from scratch, but I still don’t see any of the os_log messages from the widget extension-only the LinkMetadata error above.
Placeholder entry (SampleSnapshots.recentSummary) is wired up; yet the system never uses it and always drops to the generic grey preview.
Questions
Does LinkMetadata.BundleMetadataExtractionError.aggregateMetadataIsEmpty mean WidgetKit can’t see the compiled AppIntent metadata? If so, what could cause that when the extension is built via Swift Package Manager inside a Flutter project?
Are there extra build settings or plist keys required so the AppIntent metadata gets embedded in the widget bundle?
Any reason the widget would never reach my FeedSnapshotStore logs even though the file is written and the App Group is configured?
Any help connecting the dots would be hugely appreciated.
Calling contactAccessPicker results in a blank sheet and a jetsam error, rather than the expected contact picker, using Apple’s sample code, only on device with iOS 26.2.1.
This is happening on a iPhone 17 Pro Max running 26.2.1, and not on a simulator.
I’m running Apple's sample project
Accessing a person’s contact data using Contacts and ContactsUI
Steps:
Run the sample app on device running iOS 26.2.1.
Use the flow to authorize .limited access with 1 contact: Tap request access, Continue, Select Contacts. Select a contact, Continue, Allow Selected Contact. This all works as expected.
Tap the add contact button in the toolbar to add a second contact.
Expected: This should show the Contact Access Picker UI.
Actual: Sheet is shown with no contents. See screenshot of actual results on iOS device running 26.2.1.
Reported as FB21812568
I see a similar (same?) error reported for 26.1. It seems strange that the feature is completely broken for multiple point releases. Is anyone else seeing this or are the two of us running into the same rare edge case?
Expected Outcome, seen on simulator running 26.2
Actual outcome, seen on device running 26.2.1