Post

Replies

Boosts

Views

Activity

Reply to SwiftData migration error: NSCloudKitMirroringDelegate are not reusable
Trying different things with my project, I discovered that the problem only occurs when CloudKit syncing is enabled. Turning off syncing by passing cloudKitDatabase: .none to ModelConfiguration or by unchecking the CloudKit option in Signing & Capabilities makes the problem go away. But then of course iCloud syncing doesn't work. Makes sense considering the error message I get. I was able to reproduce the problem easily with a new project based on the SwiftData Xcode template. I don't think it's doing anything out of the ordinary but I'm looking forward to find out. The project can be found here: https://www.icloud.com/iclouddrive/0a5WkBaQRA1N-FOLGjKukV8Ag#MigrationSample There are actually two projects, one for schema v1 and one for schema v2. To reproduce the error I get: Open the MigrationSampleV1 project, build and run. In the running app, create some data. Open the MigrationSampleV2 project, build and run. Expected result: The migration kicks in and the app opens. Actual result: A crash occurs before the migration's didMigrate.
6d
Reply to SwiftUI Toolbar… bug?
Such a weird bug. Still happening two years later with iOS 16.4. struct ContentView: View { var body: some View { NavigationView { List { NavigationLink("Go to detail view") { Text("Detail view") .toolbar { ToolbarItem(placement: .bottomBar) { Button(action: { print("tap") }) { Image(systemName: "square.and.arrow.up") } } } } } } // Without this, toolbar is either empty or doesn't appear in detail view .navigationViewStyle(.stack) } }
May ’23