Post

Replies

Boosts

Views

Activity

iCloud Dashboard returns "Internal Error" when querying records across all containers
Recently, I am experiencing a CKErrorServerRejectedRequest error during my app's iCloud data sync process. I have not modified or migrated the schema recently. To troubleshoot, I logged into the iCloud Dashboard (CloudKit Console) to query the records directly. However, the dashboard also returns a generic "Internal Error" with no additional details whenever I attempt a query. Here is what I have tried so far: Private Database Only: The error only occurs within the Private Database. Querying the Public Database works normally and correctly returns "No records found." Multiple Containers: This issue affects all of my existing containers across both Development and Production environments. New Container Test: I created a brand new container with a new table, verified that the indexes are set to QUERYABLE, and attempted a query. The same "Internal Error" occurs. System Status: I checked the Apple Developer System Status page (https://developer.apple.com/system-status/), and both "CloudKit Console" and "CloudKit Database" are showing green (normal). Is anyone else experiencing this, or is there a known workaround for account-wide dashboard query failures?
2
1
455
6d
SwiftUI sheet with TextField using autocorrectionDisabled() prevents view model deinit after editing
I present a view as a sheet that contains a TextField and a viewModel. The sheet uses .autocorrectionDisabled() on the TextField. If I open the sheet and dismiss it without editing, the viewModel is released as expected. But if I edit the TextField and then dismiss the sheet, the viewModel is not deinitialized (it remains retained). Test Outputs: // # Present 1st time - Correct ✅ TestViewModel - init - 0x0000600000c12ee0 // Dismiss wihtout editing, deinitialized correctly TestViewModel - deinit - 0x0000600000c12ee0 // # Present 2st time - Incorrect ❌ TestViewModel - init - 0x0000600000c006c0 // Edit and dismiss, no deinit here // # Present 3rd time - Incorrect ❌ TestViewModel - init - 0x0000600000c113b0 // Enter text field to edit will deinit previous one TestViewModel - deinit - 0x0000600000c006c0 // Dismiss, no deinit // TestViewModel (0x0000600000c113b0) remains retained ⚠️ Using .autocorrectionDisabled(true) gives the same problem. Removing or commenting out .autocorrectionDisabled() fixes the issue, but I don't want autocorrection enabled. Is this a known SwiftUI bug? Has anyone encountered it and found a workaround? Sample code: @main struct TestApp: App { @State private var isPresentingSheet: Bool = false var body: some Scene { WindowGroup { VStack { Button("Present Sheet") { self.isPresentingSheet = true } } .sheet(isPresented: $isPresentingSheet) { TestTextInputView() } } } } View (check the HERE line): struct TestTextInputView: View { @StateObject private var viewModel = TestTextInputViewModel() @FocusState private var isFocused: Bool @Environment(\.dismiss) private var dismiss var body: some View { NavigationStack { Form { TextField("Name", text: $viewModel.name) .autocorrectionDisabled() // HERE: Comment it out will work without any issue. .focused($isFocused) .submitLabel(.done) .onSubmit { self.isFocused = false } } .toolbar { ToolbarItem(placement: .topBarLeading) { Button("Cancel") { dismiss() } } } } } } View Model: final class TestTextInputViewModel: ObservableObject { @Published var name: String = "" deinit { print("TestViewModel - deinit - \(Unmanaged.passUnretained(self).toOpaque())") } init() { print("TestViewModel - init - \(Unmanaged.passUnretained(self).toOpaque())") } }
Topic: UI Frameworks SubTopic: SwiftUI
1
0
207
Dec ’25
iCloud Dashboard returns "Internal Error" when querying records across all containers
Recently, I am experiencing a CKErrorServerRejectedRequest error during my app's iCloud data sync process. I have not modified or migrated the schema recently. To troubleshoot, I logged into the iCloud Dashboard (CloudKit Console) to query the records directly. However, the dashboard also returns a generic "Internal Error" with no additional details whenever I attempt a query. Here is what I have tried so far: Private Database Only: The error only occurs within the Private Database. Querying the Public Database works normally and correctly returns "No records found." Multiple Containers: This issue affects all of my existing containers across both Development and Production environments. New Container Test: I created a brand new container with a new table, verified that the indexes are set to QUERYABLE, and attempted a query. The same "Internal Error" occurs. System Status: I checked the Apple Developer System Status page (https://developer.apple.com/system-status/), and both "CloudKit Console" and "CloudKit Database" are showing green (normal). Is anyone else experiencing this, or is there a known workaround for account-wide dashboard query failures?
Replies
2
Boosts
1
Views
455
Activity
6d
SwiftUI sheet with TextField using autocorrectionDisabled() prevents view model deinit after editing
I present a view as a sheet that contains a TextField and a viewModel. The sheet uses .autocorrectionDisabled() on the TextField. If I open the sheet and dismiss it without editing, the viewModel is released as expected. But if I edit the TextField and then dismiss the sheet, the viewModel is not deinitialized (it remains retained). Test Outputs: // # Present 1st time - Correct ✅ TestViewModel - init - 0x0000600000c12ee0 // Dismiss wihtout editing, deinitialized correctly TestViewModel - deinit - 0x0000600000c12ee0 // # Present 2st time - Incorrect ❌ TestViewModel - init - 0x0000600000c006c0 // Edit and dismiss, no deinit here // # Present 3rd time - Incorrect ❌ TestViewModel - init - 0x0000600000c113b0 // Enter text field to edit will deinit previous one TestViewModel - deinit - 0x0000600000c006c0 // Dismiss, no deinit // TestViewModel (0x0000600000c113b0) remains retained ⚠️ Using .autocorrectionDisabled(true) gives the same problem. Removing or commenting out .autocorrectionDisabled() fixes the issue, but I don't want autocorrection enabled. Is this a known SwiftUI bug? Has anyone encountered it and found a workaround? Sample code: @main struct TestApp: App { @State private var isPresentingSheet: Bool = false var body: some Scene { WindowGroup { VStack { Button("Present Sheet") { self.isPresentingSheet = true } } .sheet(isPresented: $isPresentingSheet) { TestTextInputView() } } } } View (check the HERE line): struct TestTextInputView: View { @StateObject private var viewModel = TestTextInputViewModel() @FocusState private var isFocused: Bool @Environment(\.dismiss) private var dismiss var body: some View { NavigationStack { Form { TextField("Name", text: $viewModel.name) .autocorrectionDisabled() // HERE: Comment it out will work without any issue. .focused($isFocused) .submitLabel(.done) .onSubmit { self.isFocused = false } } .toolbar { ToolbarItem(placement: .topBarLeading) { Button("Cancel") { dismiss() } } } } } } View Model: final class TestTextInputViewModel: ObservableObject { @Published var name: String = "" deinit { print("TestViewModel - deinit - \(Unmanaged.passUnretained(self).toOpaque())") } init() { print("TestViewModel - init - \(Unmanaged.passUnretained(self).toOpaque())") } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
207
Activity
Dec ’25