I have a layout similar to Music or Podcasts, where I have a sidebar and a grid content area. When clicking on one of the items in the grid I want to open a full screen detail view just like Music does. My question is: How can I display a back button in the toolbar? I only figured out how to add buttons to the trailing side of the toolbar. Is this even possible in pure SwiftUI?
.toolbar {
Button(action: showSearch) {
Label("Add Game", systemImage: "plus")
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
[Detailed feedback FB15232205]
Since I restored my new iPhone 16 Pro from a previous iPhone 15 Pro backup, I can't use stickers any more.
The stickers gallery is filled with clear stickers that I can't interact with. Deleting does nothing. I also can't add new stickers. They appear for a second and then disappear again. iCloud sync is also not working. Other devices are fine.
When restoring the phone without backup, everything works fine. Is it possible this is caused by the iOS 18.0 version that's shipping with the new iPhones? I was only offered another iOS 18.0 update in Settings later on. Updating to 18.1 beta 5 today did not fix it either.
From what I gather from the logs, there's a database corruption happening. I've seen various posts across the internet who have this issue specifically after setting up their new iPhone.
fehler 22:08:24.677501+0200 stickersd error: (11) Fatal error. The database at /private/var/mobile/Library/Stickers/stickers.stickerdb is corrupted. SQLite error code:11, 'database disk image is malformed' fehler 22:08:24.677615+0200 stickersd error: exception fetching row for object with ID: Fatal error. The database at /private/var/mobile/Library/Stickers/stickers.stickerdb is corrupted. SQLite error code:11, 'database disk image is malformed' with userInfo of { NSFilePath = "/private/var/mobile/Library/Stickers/stickers.stickerdb"; NSSQLiteErrorDomain = 11; } fehler 22:08:24.677679+0200 stickersd error: Unhandled error occurred during faulting: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} ({ NSFilePath = "/private/var/mobile/Library/Stickers/stickers.stickerdb"; NSSQLiteErrorDomain = 11; }) fehler 22:08:24.677700+0200 stickersd fault: Unhandled error (NSSQLiteErrorDomain, 11) occurred during faulting and was ignored: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} problem 22:08:24.677736+0200 stickersd CoreData: Unhandled error (NSSQLiteErrorDomain, 11) occurred during faulting and was ignored: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} fehler 22:08:24.678107+0200 stickersd database corruption at line 79182 of [1b37c146ee] fehler 22:08:24.678757+0200 stickersd error: (11) Fatal error. The database at /private/var/mobile/Library/Stickers/stickers.stickerdb is corrupted. SQLite error code:11, 'database disk image is malformed' fehler 22:08:24.678783+0200 stickersd error: exception fetching row for object with ID: Fatal error. The database at /private/var/mobile/Library/Stickers/stickers.stickerdb is corrupted. SQLite error code:11, 'database disk image is malformed' with userInfo of { NSFilePath = "/private/var/mobile/Library/Stickers/stickers.stickerdb"; NSSQLiteErrorDomain = 11; } fehler 22:08:24.678807+0200 stickersd error: Unhandled error occurred during faulting: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} ({ NSFilePath = "/private/var/mobile/Library/Stickers/stickers.stickerdb"; NSSQLiteErrorDomain = 11; }) fehler 22:08:24.678826+0200 stickersd fault: Unhandled error (NSSQLiteErrorDomain, 11) occurred during faulting and was ignored: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} problem 22:08:24.678858+0200 stickersd CoreData: Unhandled error (NSSQLiteErrorDomain, 11) occurred during faulting and was ignored: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} fehler 22:08:24.678878+0200 stickersd database corruption at line 79182 of [1b37c146ee] fehler 22:08:24.678903+0200 stickersd error: (11) Fatal error. The database at /private/var/mobile/Library/Stickers/stickers.stickerdb is corrupted. SQLite error code:11, 'database disk image is malformed' fehler 22:08:24.678931+0200 stickersd error: exception fetching row for object with ID: Fatal error. The database at /private/var/mobile/Library/Stickers/stickers.stickerdb is corrupted. SQLite error code:11, 'database disk image is malformed' with userInfo of { NSFilePath = "/private/var/mobile/Library/Stickers/stickers.stickerdb"; NSSQLiteErrorDomain = 11; } fehler 22:08:24.678953+0200 stickersd error: Unhandled error occurred during faulting: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11} ({ NSFilePath = "/private/var/mobile/Library/Stickers/stickers.stickerdb"; NSSQLiteErrorDomain = 11; }) fehler 22:08:24.678972+0200 stickersd fault: Unhandled error (NSSQLiteErrorDomain, 11) occurred during faulting and was ignored: Error Domain=NSSQLiteErrorDomain Code=11 "(null)" UserInfo={NSFilePath=/private/var/mobile/Library/Stickers/stickers.stickerdb, NSSQLiteErrorDomain=11}
How can I use the same translucent selection style in the sidebar that apps like Finder, Music, and Podcasts use? By default Mac Catalyst apps seem to use the tint color for the selection, which looks out of place with the system apps.
I use UICollectionLayoutListConfiguration by the way.
Is there a way to use SwiftData without automatic iCloud sync? I’d like to do that manually using my own CloudKit solution or CKSyncEngine. SwiftData automatically picks up any CloudKit containers though and I have not seen an option to disable this behavior. Setting cloudKitContainerIdentifier to nil does still pick the first available CloudKit container.
Just in case this is a bug: FB12276416
Sample:
let configuration = ModelConfiguration(cloudKitContainerIdentifier: nil)
let modelContainer = try! ModelContainer(for: [GamesCollection.self], configuration)
print(modelContainer.configurations)
// [SwiftData.ModelConfiguration(url: …, name: …, sharedAppContainerIdentifier: …, cloudKitContainerIdentifier: Optional("iCloud.CloudKit.com.+++")
If you use UISceneDelegate's scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) to handle deep links (such as tapping a widget) you might run into an issue where this callback is called twice in the majority of cases.
If you push a view controller in response to this, you might end up with two pushed view controllers, if you do not mitigate this. This is exclusively an issue in iOS 26.0 and works as expected on iOS 18.
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
/// Add any widget to the home screen that uses the widgetURL modifier and tap them. Most of the time, openURLContexts() will get called twice.
/// If you run this project on iOS 18, it's *always* called once as expected.
print("openURLContexts \(URLContexts)")
}
Filed as FB20301454
I have this very simple PersistenceController setup. It's used in both the main app and widget target.
struct PersistenceController {
static let shared = PersistenceController()
@MainActor
static let preview: PersistenceController = {
let result = PersistenceController(inMemory: true)
let viewContext = result.container.viewContext
return result
}()
let container: NSPersistentContainer
/// The main context.
var context: NSManagedObjectContext {
return container.viewContext
}
init(inMemory: Bool = false) {
container = NSPersistentContainer(name: "Gamery")
if inMemory {
container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")
} else {
do {
let storeURL = try URL.storeURL(forAppGroup: "XXXXXXXXXX", databaseName: "Gamery")
let storeDescription = NSPersistentStoreDescription(url: storeURL)
/// Enable history tracking for cloud syncing purposes.
storeDescription.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey)
print("### Persistent container location: \(storeURL)")
container.persistentStoreDescriptions = [storeDescription]
} catch {
print("Failed to retrieve store URL for app group: \(error)")
}
}
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
Crashlytics.crashlytics().record(error: error)
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
container.viewContext.automaticallyMergesChangesFromParent = true
container.viewContext.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump
#if !WIDGET
if !inMemory {
do {
try container.viewContext.setQueryGenerationFrom(.current)
} catch {
fatalError("###\(#function): Failed to pin viewContext to the current generation: \(error)")
}
}
PersistentHistoryToken.loadToken()
#endif
}
}
I regularly receive crash logs from the widget. I never experienced crashes myself and the widgets work fine.
GameryWidgetExtension/PersistenceController.swift:35:
Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=256 "The file “Gamery.sqlite” couldn’t be opened."
UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/B6A63FE1-ADDC-4A4C-A065-163507E991C6/Gamery.sqlite, NSSQLiteErrorDomain=23},
["NSSQLiteErrorDomain": 23, "NSFilePath": /private/var/mobile/Containers/Shared/AppGroup/B6A63FE1-ADDC-4A4C-A065-163507E991C6/Gamery.sqlite]
I have absolutely no idea what's going on here. Anyone who can help with this?
For over five years, this persistent issue has affected all platforms, and despite submitting numerous feedback reports, my concerns have remained unaddressed.
When utilizing a UIHostingController within a UINavigationController, the toolbar items and title defined in the SwiftUI view manifest with a substantial delay. This delay is particularly noticeable with the introduction of Liquid Glass, resulting in a jarring transition. Although I had nearly lost hope, the issue was resolved in iOS 26 beta 3 when the push occurs from within a UISplitViewController. However, the problem persists outside of this context.
Ultimately, this issue hinders my ability to develop high-quality applications and restricts my use of SwiftUI within my UIKit project for similar purposes. I sincerely hope that this issue can be resolved, enabling me to fully rely on SwiftUI in my project. Please prioritize this matter and make the necessary changes that were already made in UISplitViewController.
This feedback has all the details and a sample project.
FB14000542
Before the push:
During the push:
A second after the push finishes:
In a UIKit-based project, I am attempting to integrate SwiftUI components. However, I encounter a persistent issue that hinders this integration.
This problem arises when pushing a SwiftUI view using UIHostingController and subsequently attempting to push a UIKit view controller using UIViewControllerRepresentable. Not only are the navigation items and title from the view controller disregarded, but more concerningly, my tab bar item title is set to nil. This renders it impossible for me to utilize SwiftUI within my application when I wish to present older UIKit view controllers from there.
This feedback has all the details and a sample project.
FB18956999
So many issues with the new sheet design, I don't think I can ship these. And it's both in UIKit and SwiftUI. Honestly these net sheets seem like a failure from start to finish and I don't believe it will get better for the initial release.
Toolbar buttons in medium detent size have very low contrast and look bad with their opaque appearance
During the transition from medium to large detent the whole sheet flickers and turns transparent for a split moment, creating a very jarring transition (video here: https://mastodon.social/@nicoreese/114938826906689965).
In the large detent the background is always white in light mode making the cells bleed into the background making them indistinguishable from it. I should be able to set a background color for the large detent which smoothly transitions to it. Like: glass in medium and system grouped background in large.
Any interaction with the medium detent sheet makes it scale up. Why? It's okay for single interactions but not for when the user taps something in it rapidly. There needs to be a way to disable this behavior.
In the medium detent List/UICollectionView rows are white in light mode or gray in dark mode. Especially in dark mode it looks very bad against the glass background. Those rows should probably be translucent to better fit the glass.
This needs serious fixing and fast.
FB18919680
FB18919657
FB18919600
FB18919549
FB18919496
FB18919630
At WWDC the scroll edge effect was presented as a variable blur combined with a soft gradient.
Since beta 4 the bottom scroll edge effect has no blur, the top bar sometimes has, but sometimes does not. Even in my own app I have two views with totally different results. This was not changed back in beta 5, so I assume this is not a bug but an intended change.
It's hard to design for such a moving target. Especially the missing bottom blur looks bad in a lot of places in my app and I'm debating not shipping the new design if this does not get resolved.
Is there any guidance how this effect is supposed to look now? At this point it just seems random and there's no way adjust the way it looks.
Phone: Top blur, bottom no blur
Settings: Top blur, bottom no blur
Notes: No blur at all
Music: No blur at all
My own app: No top blur
My own app: Top blur
When using UISearchController, scope buttons never appear. On iPadOS 18 this works fine. This is a showstopper bug for me and my app. Is there anything I can do about it?
Sample project is attached to feedback FB19587622.
When a UISearchController is placed inside a search tab, the scope buttons disappear when dismissing the search bar once. They never return. When using in any regular view controller container, like even another default tab, everything works fine. Is there something I can do to prevent this?
Video: https://mastodon.social/@nicoreese/115017696077771370
FB19587916
let homeTab = UITab(
title: "Home",
image: UIImage(systemName: "house"),
identifier: "Home"
) { _ in
UINavigationController(rootViewController: ViewController())
}
let searchTab = UISearchTab { _ in
UINavigationController(rootViewController: SearchViewController())
}
let tabBarController = UITabBarController(tabs: [
homeTab, searchTab
])
tabBarController.mode = .tabSidebar
class SearchViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = .systemBackground
self.title = "Home"
let searchController = UISearchController(searchResultsController: nil)
searchController.searchBar.scopeButtonTitles = [
"Scope 1", "Scope 2"
]
searchController.searchBar.showsScopeBar = true
self.navigationItem.searchController = searchController
}
}
As of right now Icon Composer does not support creating app icons for visionOS and tvOS. It appears that only system apps can provide glass icons for those platforms. How should developers handle this? In extreme cases, the flat icon on those platforms will look wildly different from their glass counterparts.
From what I have seen visionOS and tvOS also do not apply any automatic treatment like on iOS where legacy icons get a glass effect.
So, third party app icons are just going to look out of place for (hopefully just) a year on those platforms? What is the recommended approach here? You could obviously fake the effect, but I feel like that would be worse.
This app icon features multiple layers with the blend mode set to Screen. iOS fails to render these despite looking perfectly fine in Icon Composer.
This is unacceptable. How can a designer build an icon if they can't rely on it being displayed like the preview on a device?
Filed as FB20052048 with the .icon file attached.
When composing tabs like this and selecting them in the sidebar, only the group's view controller is ever displayed, even when selecting the individual first and second tabs. Their view controllers are just ignored. Am I immensely stupid here or is this a bug in iPadOS 26 beta 3?
// First tab
let firstTab = UITab(
title: "First",
image: UIImage(systemName: "heart"),
identifier: "hello"
) { _ in
UINavigationController(rootViewController: ViewController())
}
// Second tab
let secondTab = UITab(
title: "Second",
image: UIImage(systemName: "heart"),
identifier: "hello2"
) { _ in
UIViewController()
}
// Tab group
let tabGroup = UITabGroup(
title: "Stuff",
image: nil,
identifier: "stuff",
children: [firstTab, secondTab]
) { _ in
ViewController()
}
let tbc = UITabBarController(tabs: [tabGroup])
tbc.mode = .tabSidebar
Topic:
UI Frameworks
SubTopic:
UIKit