Question on PCS Zone corruption recovery

Hi all - figured I would kick off with a CloudKit question. Recently in development of a multi-device app I got into a state where all iOS devices could not write to the (production) CloudKit container - however macOS could still write (multi-device SwiftUI code). After ruling out a lot of other things it seemed like there had been some corruption in the production zone's PCS key chain.

The only fix was deleting the zone from the CloudKit Console (safe for my pre-release beta data, but destructive). Is there a safer or developer-accessible recovery path for PCS chain corruption? Is this situation detectable earlier, or is there guidance on avoiding it during pre-release testing?

The error in the logs in this scenario had "overallStatus":"USER_ERROR", "error":"BAD_REQUEST", "returnedRecordTypes":"_pcs_data".

Answered by Apple Staff in 890699022

Can you elaborate where this log come from. Is this from CKWS?

"The error in the logs in this scenario had "overallStatus":"USER_ERROR", "error":"BAD_REQUEST", "returnedRecordTypes":"_pcs_data"."?

In general there is no way for the app to recover from encryption failures, since it's a system field and not modifiable externally. For a definitive root cause analysis, we would need to capture a sysdiagnose on the iOS device (the macOS sysdiagnose may also help too, for comparison). The profile can be found at https://developer.apple.com/feedback-assistant/profiles-and-logs/?name=CloudKit

Once the sysdiagnoses are captured, feel free to file a feedback and we can investigate from there.

Can you elaborate where this log come from. Is this from CKWS?

"The error in the logs in this scenario had "overallStatus":"USER_ERROR", "error":"BAD_REQUEST", "returnedRecordTypes":"_pcs_data"."?

In general there is no way for the app to recover from encryption failures, since it's a system field and not modifiable externally. For a definitive root cause analysis, we would need to capture a sysdiagnose on the iOS device (the macOS sysdiagnose may also help too, for comparison). The profile can be found at https://developer.apple.com/feedback-assistant/profiles-and-logs/?name=CloudKit

Once the sysdiagnoses are captured, feel free to file a feedback and we can investigate from there.

Question on PCS Zone corruption recovery
 
 
Q