fix(desktop,mobile): locale-safe handling of missing CloudKit record types#331
Open
joshuaferris wants to merge 1 commit intodongdongbh:mainfrom
Open
fix(desktop,mobile): locale-safe handling of missing CloudKit record types#331joshuaferris wants to merge 1 commit intodongdongbh:mainfrom
joshuaferris wants to merge 1 commit intodongdongbh:mainfrom
Conversation
…types On first sync, CloudKit record types don't exist yet in the container schema. The macOS ObjC bridge previously matched the English text "Did not find record type" in localizedDescription, which fails on non-English installs. Changes: - macOS: replace locale-dependent string match with NSUnderlyingError code check (2003 = UNKNOWN_RECORD_TYPE), named constant with provenance comment, isKindOfClass guard on underlying error - iOS: add the same missing-record-type handling to fetchAllRecords (was missing entirely — first sync would fail on iOS too) - Remove dead CKPartialErrorsByItemIDKey fallback that could never trigger on a CKQueryOperation error path Co-Authored-By: Claude Opus 4.6 <[email protected]>
5338639 to
1960738
Compare
dongdongbh
requested changes
Mar 30, 2026
Owner
dongdongbh
left a comment
There was a problem hiding this comment.
Blocked on validation
- The locale-safe direction looks right, but this PR changes native CloudKit behavior on both macOS and iOS and I cannot validate first-run schema creation from the current environment.
- Please test first-run CloudKit sync on non-English macOS and on iOS with an empty Development schema, then report the result in this PR.
- If the mobile change stays, please update the PR scope/title to reflect that it also changes iOS behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
localizedDescriptionstring match ("Did not find record type") withNSUnderlyingErrorcode2003(UNKNOWN_RECORD_TYPE)CKErrorUnknownItemhandling unchangedSplit out from #326 per review feedback.
Test plan
🤖 Generated with Claude Code