CloudKit

RSS for tag

Store structured app and user data in iCloud containers that can be shared by all users of your app using CloudKit.

Posts under CloudKit tag

145 Posts

Post

Replies

Boosts

Views

Activity

iOS Feature Proposal: iCloud KeySync
iCloud KeySyc is a privacy-focused feature that securely syncs a user’s personalized keyboard learning across all Apple devices through iCloud. Today, when users upgrade to a new iPhone or begin using a new iPad or Mac, the keyboard often loses much of the personalization it has developed over time. Users must re-teach autocorrect, rebuild custom vocabulary, and wait for the keyboard to relearn their typing habits. iCloud KeySync would allow users to move seamlessly between devices while keeping the keyboard experience familiar from day one. Problem Statement Apple’s keyboard becomes more useful over time as it learns: Frequently used words and phrases Personal slang and abbreviations Emoji preferences Autocorrect adjustments Writing patterns and typing habits When users switch devices, much of this personalization is lost or takes time to rebuild. This creates friction during device upgrades and reduces the feeling of continuity within the Apple ecosystem. Proposed Solution iCloud KeySync securely synchronizes keyboard personalization data across Apple devices. The feature would: Learn and store personalized keyboard behavior on-device. Encrypt and sync personalization data through iCloud. Restore keyboard preferences automatically when signing into a new device. Keep keyboard learning consistent across iPhone, iPad, and Mac. Key Features Personalized Vocabulary Sync Synchronizes user-added words, nicknames, slang, and frequently used phrases. Emoji Preference Sync Maintains commonly used emoji patterns across devices. Autocorrect Learning Sync Preserves learned corrections and accepted custom spellings. Typing Behavior Continuity Allows devices to share keyboard learning so users receive familiar suggestions regardless of which Apple device they use. User Controls Enable or disable iCloud KeySync. Reset keyboard learning at any time. View privacy information and storage usage. Privacy and Security Privacy should remain the foundation of the feature. All keyboard learning occurs on-device. Personalization data is end-to-end encrypted. Raw message content is never uploaded. Users retain full control over synchronization settings. Security protections match the standards used by iCloud Keychain. User Benefits New devices feel familiar immediately. Less time correcting autocorrect mistakes. Faster onboarding after device upgrades. Consistent typing experience across the Apple ecosystem. Improved customer satisfaction and retention. Example User Scenario A user upgrades from an older iPhone to a new iPhone. After signing into iCloud and restoring their device, the keyboard immediately recognizes their commonly used phrases, preferred emoji, custom words, and learned typing patterns. The new device feels personalized from the first message typed, without requiring weeks of retraining Business Value Improves the upgrade experience. Strengthens ecosystem continuity. Reinforces Apple’s privacy-first approach to AI and machine learning. Creates a subtle but meaningful quality-of-life improvement for millions of users. Switch phones. Keep your vibe.
1
0
27
5h
SwiftData Predicate for optional to-many (as required by CloudKit) relationships crashes
Fails with "to-many key not allowed here" // parent.children?.contains(where: { // $0.name == "Abbiejean" // }) != nil parent.children.flatMap { children in children.contains(where: { $0.name == "Abbijean" }) } == true How are we supposed to query on relationships? This is a huge problem. This is a major limitation blocking migration of CoreData to SwiftData. We can do this with NSPredicate: let moodAnalysis = NSPredicate(format: "ANY moodAnalysis.labels.title == %@", label.description) let stateOfMinds = NSPredicate(format: "SUBQUERY(stateOfMinds, $x, SUBQUERY($x.labels, $y, $y.title == %@).@count > 0).@count > 0", label.description) The accepted answer on stack overflow is: you can't Document says that optionals are allowed in predicates The SwiftData team has made a big show of saying that we can use idiomatic swift for our predicates. But we cannot even filter on relationships when the container is backed by CloudKit... That should be a HUGE warning in the documentation. "For those of you who are considering a costly refactor from CoreData to SwiftData, and are currently using CloudKit, all relationships are mandatory optional arrays, and you can't write predicates on them"
4
0
305
13h
CKSyncEngine doesn't send changes until app restarts
I've noticed that new record saves added using add(pendingRecordZoneChanges:) while handling events such as sentRecordZoneChanges or fetchedRecordZoneChanges aren't processed by CKSyncEngine until the app restarts, i.e. the app process has to be terminated and started again for CKSyncEngine to actually attempt to send the pending record saves. This started happening ever since I updated iOS and macOS to 26.5. Is this by design or a bug I should report?
1
0
69
1d
Apple Sign in Freeze
I was experiencing a weird sign in error when using apple sign in with my app and wanted to put it here for anyone else who might experience it in the future, and so apple can make this requirement more clear. I was using CloudKit and apple sign in. If you are not using both this probably does not apply to you. Every time I would go to sign in in the iOS simulator I would enter my password, hit "sign in", and everything just froze. The very odd reason for this is if you are using iCloudKit and apple sign in you need to go to specifically the "identifiers" in the "Certificates, Identifiers & Profiles" menu (https://developer.apple.com/account/resources/identifiers/list). And from there you specifically need an App ID Configuration with apple sign in enabled. From there you have to have the same exact bundle identifier in Xcode under project settings(not an upper tab just click your project in the left panel). And that should allow you to both pass validation and have your sign in work. Hope this helps!
1
0
332
1d
iCloud LiveSharing link to colaborate
Hi there!, I have been developing an app where you can create a collection and I want to add a new feature where you can share an iCloud link from that collection and collaborate with your family or friends who you share the link to complete that collection. Like Apple does with the notes app or some other apps. The problem I have encountered is programming in swift does not allow you to do that and I need to do it I Core Data... Do you think with all the new stuff announced during the WWDC26 It could be done in Swift or I have to change coding?? Thanks community for any help
1
0
54
2d
CloudKit queries failing, need reindexing
See FB22358865. I have a formerly working app. From within the app, Queries to 4 'Record Types' work fine. Queries to one Record Type return only some records. When I 'Query Records' from the CloudKit dashboard I get 100-300 records downloaded for this Record Type. If I repeat 'Query Records' I get an additional 100-300 records. There are more than 4000 records. Apple Developer Technical Support has stated 'the index in your CloudKit container gets in a bad state." How can I fix this?
0
0
38
3d
iCloud Database Errors and Limits
We are currently implementing a custom iCloud sync for our macOS and iOS apps using CloudKit. Syncing works fine as long as the number of record sends is relatively small. But when we test with a large number of changes ( 80,000+ CKRecords ) we start running into problems. Our sending strategy is very conservative to avoid rate limits: We send records sequentially in batches of 250 records With about 2 seconds pause between operations Records are small and contain no assets (assets are uploaded separately) At some point we start receiving: “Database commit size exceeds limit” After that, CloudKit begins returning rate-limit errors with retryAfter-Information in the error. We wait for the retry time and try again, but from this moment on, nothing progresses anymore. Every subsequent attempt fails. We could not find anything in the official documentation regarding such a “commit size” limit or what triggers this failure state. So my questions are: Are there undocumented limits on the total number of records that can exist in an iCloud database (private or shared)? Is there a maximum volume of record modifications a container can accept within a certain timeframe, even if operations are split into small batches with pauses? Is it possible that sending large numbers of records in a row can temporarily or permanently “stall” a CloudKit container? Any insights or experiences would be greatly appreciated. Thank you!
1
1
264
6d
Can a developer sponsor app-specific privateCloudDatabase storage for users?
Hi, We are developing an iOS/watchOS app that uses CloudKit private database and CKShare to let athletes share training data with their coaches. Current architecture: Each athlete owns their data in their privateCloudDatabase. The athlete can share selected records with a coach using CKShare. The coach accesses the shared data through the sharedCloudDatabase. This works very well for privacy, ownership, and permission management. The issue: Many athletes do not have enough available personal iCloud storage. When their iCloud storage is full, our app cannot save/sync/share new records in their privateCloudDatabase. This breaks the coach-athlete sharing flow, even if the coach is paying for a subscription in our app. Question: Is there any Apple-supported way for an app developer, or a coach/team organization using our app, to sponsor, allocate, or purchase additional iCloud storage specifically for a user’s app-specific CloudKit private database data? What we would like to preserve: Records stay in the athlete’s privateCloudDatabase. The athlete remains the owner of the data. CKShare continues to manage sharing permissions and consent. The app or coach organization covers the storage cost, instead of requiring every athlete to upgrade their personal iCloud+ plan. I understand that: privateCloudDatabase data counts against the user’s personal iCloud storage quota. publicCloudDatabase data counts against the app/container quota. CloudKit Database app can be used to manage the app’s CloudKit containers. However, moving this data to publicCloudDatabase would require us to rebuild part of the permission and sharing model ourselves, and it would not be equivalent to user-owned private records shared via CKShare. So I would like to confirm: Is there any way to sponsor or allocate app-specific privateCloudDatabase storage for selected users? Is there any Apple Business, Managed Apple Account, enterprise, or developer program option that supports this for sports teams or organizations? If this is not supported, are the only Apple-native alternatives: asking users to upgrade iCloud+, moving shared/team data to publicCloudDatabase, or using a third-party/app-managed backend? Use case: Our app is used in strength training. A coach may manage many athletes. The coach is willing to pay for the subscription and storage, but athletes often do not want to pay for additional iCloud storage individually. Thanks.
2
0
213
1w
CloudKit Query (and Dashboard) returns only a few records
When I query, an existing database with over 10,000 records from an Objective C app (i.e. CKQueryOperation) I get only N x 100 records returned where N varies each time between 0 and about 10 (i.e. never more than 1000 records and always an even multiple of 100). When I do a “Query Records” on the CloudKit Dashboard I get a similar number of pages of records downloaded (i.e. 0-10). If I tap “Query Records” multiple times I will get more pages of records until the full 10,000 are downloaded. This had been working fine until recently, both from the app and the Dashboard. There are multiple Record Types in the database. Only one Record Type is erroring. The other Record Types continue to work both from the app and the Dashboard. In particular, the Users Record Type has many many records and they all download to many pages with a single tap of “Query Records”. I have posted this to the Feedback Assistant under FB22358865. Here is my code: NSPredicate *predicate =[NSPredicate predicateWithFormat:@"modificationDate>%@",dateLastSynched]; CKRecordType theRecordName=[NSString stringWithString:@"Notices”]; // I also try this for @“Links” and @“Messages” and @“EventMessages" CKQuery *query = [[CKQuery alloc] initWithRecordType:theRecordName predicate:predicate]; CKQueryOperation *theOperation=[[CKQueryOperation alloc] initWithQuery:query]; [self startAQueryOperation:(CKQueryOperation *)theOperation theName:(NSString *)recordName]; -(void)startAQueryOperation:(CKQueryOperation *)theOperation theName:(NSString *)recordName{ theOperation.recordFetchedBlock=^(CKRecord *theRecord){ NSLog(@"XXXjust downloaded a %@",recordName); }; theOperation.queryCompletionBlock=^(CKQueryCursor *theCursor, NSError *error){ if(error){ NSLog(@"XXXerror %@",error); } if(theCursor){ CKQueryOperation *anotherOperation=[[CKQueryOperation alloc] initWithCursor:theCursor]; [self startAQueryOperation:anotherOperation theName:recordName]; } }; CKDatabase *publicDatabase = [[CKContainer defaultContainer] publicCloudDatabase]; [publicDatabase addOperation:theOperation]; } When I run this code in the app I get no “XXXerror” from the NSLogs. I get the expected number of “XXXjust downloaded a” EventMessages (435) and Messages (594) and Links (15) but I get varying amounts, 100 or 400 or 500 “xxjust downloaded a” for the Notices when I should get 10,118 records. Thinking that 10,000 records is too much, if I alter “dateLastSynched” for Notices I still get only 100 or 200, not the expected number. Note that the number is always a multiple of 100. This seems to be consistent with the typical number of records I get on the CloudKit dashboard each time I tap “Query Records”.
4
0
485
1w
Clarification on Current CloudKit CKAsset File Size Limits
Hi, I’m trying to find an authoritative and up-to-date answer regarding the maximum file size supported by CKAsset uploads in CloudKit. I know Apple documentation has historically referenced a 50 MB limit in some places, but from what I can tell, that limit appears to specifically apply to CloudKit Web Services rather than native CloudKit framework usage through CKAsset. At the same time, I frequently see reports from developers claiming they are successfully uploading significantly larger assets through CloudKit, sometimes well beyond 50 MB. However, I haven’t been able to find clear documentation confirming whether this behavior is officially supported, recommended, or simply tolerated under certain conditions. My use case involves potentially syncing assets larger than 50 MB, and I need to determine whether: CloudKit officially supports larger CKAsset uploads today There is a documented hard limit for native CloudKit CKAsset uploads Uploading larger assets is considered reliable/safe for production apps I should instead design around chunked uploads and reconstruction logic I’m specifically interested in current practical and documented limits for CKAsset in 2026, especially for private database usage on Apple platforms. If anyone from Apple or developers with production experience can clarify this, I’d appreciate it. I also opened a DTS incident regarding this question and was advised to ask on the forums so the answer can benefit other developers. Thanks. (I also opened a DTS incident regarding this question and was advised to ask on the forums so the answer can benefit other developers.)
2
0
317
2w
iCloud Sync not working with iPhone, works fine for Mac.
I've been working on an app. It uses iCloud syncing. 48 hours ago everything was working 100%. Make a change on the iPhone it immediately changed on the Mac. Change on the Mac, it immediately changed on the iPhone. I didn't work on it yesterday. I updated to iOS26.4 on the iPhone and 26.4 on the Mac yesterday instead. Today, I pull up the project again. I made NO changes to the code or settings. Make a change on the iPhone it immediately updates on the Mac. Make a change on the Mac, nothing happens on the iPhone. I've waited an hour, and the change never happens. If you leave the iPhone app, then return, it updates as it should. It appears that iCloud's silent notification is to being received by the iPhone. Anyone else having the issue? Is there something new with iOS 26.4 that needs to be adjusted to get this to work? Again, works flawlessly with the Mac, just not with the iPhone.
37
17
9.2k
2w
CKQuerySubscription on public database failing with BAD_REQUEST in Production — distinct from iOS 26.4 silent-push regression
Hello, I'm hitting a persistent CKQuerySubscription save failure on the public database in my Production CloudKit container. I want to flag this is NOT the iOS 26.4 silent-push regression resolved in 26.4.1 (I've confirmed it manifests differently and on devices that predate that bug). App: Win 10 Min (com.luiz.PandaApp) Container: iCloud.com.luiz.PandaApp Current shipping version: 3.2.1 build 420 (approved 2026-05-19) Public database THE ERROR (captured from CKError.userInfo) CKErrorCode 12 (badRequest) CKInternalErrorDomain code 2006 ("BadSyntax") ServerErrorDescription: "attempting to create a subscription in a production container" Execution time per failed attempt: 45-90ms (gateway-level rejection, not data validation). CODE let subscription = CKQuerySubscription( recordType: "GuardianRequest", predicate: NSPredicate(format: "guardianRecordName == %@", me), subscriptionID: "guardian-incoming-(me)", options: [.firesOnRecordCreation] ) let info = CKSubscription.NotificationInfo() info.shouldSendContentAvailable = true subscription.notificationInfo = info try await container.publicCloudDatabase.save(subscription) The .save() throws every time. REPRODUCES ACROSS iPhone on iOS 26.4.2 (i.e., has the 26.4.1 CloudKit regression fix) iPhone on iOS 18.6.x (predates the 26.4 regression entirely) Multiple distinct Apple IDs / userId hashes Fresh installs via TestFlight Updated installs from production CONSISTENTLY: USER_ERROR / BAD_REQUEST. Same error every time. WHY THIS ISN'T THE iOS 26.4 REGRESSION (Thread 820562) That regression caused silent notifications to be DROPPED client-side AFTER successful subscription creation. Our failure is SubscriptionCreate itself being rejected by the CloudKit server before any subscription exists. Different layer, different symptom. iOS 18.6.x devices also fail (they never had the 26.4 token-validation regression code). CLOUDKIT CONSOLE LOGS (sample request UUIDs Apple engineers can lookup) EB30E9D0-8C97-4685-BD16-3E79B3328D6F (2026-05-17 8:08 UTC) EEAA0606-5B50-4640-A950-EEA33B790B8E (2026-05-17, captured in-app) EB4C90CE-9172-4942-B00F-DE4A28388FBA (2026-05-19 7:18 UTC, iOS 18.6.x) F2DF69D9-2339-437A-B59B-7FBD4D57442F (2026-05-19 7:51 UTC, iOS 26.4.x) CloudKit Console → Production → Subscriptions: 0 entries despite 70+ attempts since 2026-05-11. WHAT I'VE VERIFIED / TRIED Schema: GuardianRequest.guardianRecordName and GuardianResponse.requesterRecordName both have QUERYABLE indexes in the Production schema (confirmed in Console). Field types: all STRING. aps-environment entitlement: "production" (changed from "development" in build 420; no change in error pattern). Push Notifications capability: enabled on App ID in Developer Portal AND in Xcode Signing & Capabilities for the main app target. UIBackgroundModes: includes "remote-notification". Re-deployed Production schema from Development on 2026-05-19 (Console reported "no changes"; failure pattern unchanged). Tried with and without info.desiredKeys = []. RecordQuery operations on the same fields and record types in the same container succeed consistently. QUESTIONS Is there a known infrastructure issue affecting public database CKQuerySubscription creation that is distinct from the iOS 26.4 regression (thread 820562)? Is there a per-container configuration that may be in an unexpected state, and if so what should I check? Are there workarounds beyond schema redeployment that have helped other developers in similar situations? Thanks for any guidance.
4
0
339
3w
CloudKit console truncates the rows when there are too many
I believe the CloudKit console has an issue when displaying a large number of rows (around 1,677). If I don't perform any filtering and make sure I am on page one (by scrolling to the bottom and ensuring there is only a 'next' button and no 'previous' button), sorting by 'Created' only shows records up to the year 2024. However, if I apply a text filter to search for the latest record, my 2026 records appear correctly. I have attached a screenshot for your reference. I am testing it under Development environment. I am looking at the private database / com.apple.coredata.cloudkit.zone. I had to add the recordName index to browse this data
1
0
254
3w
SwiftData with CloudKit Error: Error updating background task request
Hi, Overview I have a SwiftData project which automatically syncs with CloudKit. When I run the app, I see the following error in Xcode logs. Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 "(null)" My attempt I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist Questions How can I resolve this? If I should enable background processing, what are the BGTaskSchedulerPermittedIdentifiers to add in Info.plist?
18
0
1.1k
3w
CloudKit CKRecordZone Deletion Issue
CloudKit CKRecordZone Deletion Issue Problem: CloudKit record zones deleted via CKDatabase.modifyRecordZones(deleting:) or CKModifyRecordZonesOperation are successfully removed but then reappear. I suspect they are automatically reinstated by CloudKit sync, despite successful deletion confirmation. Environment: SwiftData with CloudKit integration Custom CloudKit zones created for legacy zone-based sharing Observed Behavior: Create custom zone (e.g., "TestZone1") via CKDatabase.modifyRecordZones(saving:) Copy records to zone for sharing purposes Delete zone using any CloudKit deletion API - returns success, no errors Immediate verification: Zone is gone from database.allRecordZones() After SwiftData/CloudKit sync or app restart: Zone reappears Reproduction: Tested with three different deletion methods - all exhibit same behaviour: modifyRecordZones(deleting:) async API CKModifyRecordZonesOperation (fire-and-forget) CKModifyRecordZonesOperation with result callbacks Zone deletion succeeds, change tokens (used to track updates to shared records) cleaned up But zones are restored presumably by CloudKit background sync Expected: Deleted zones should remain deleted Actual: Zones are reinstated, creating orphaned zones
2
0
315
May ’26
iOS Feature Proposal: iCloud KeySync
iCloud KeySyc is a privacy-focused feature that securely syncs a user’s personalized keyboard learning across all Apple devices through iCloud. Today, when users upgrade to a new iPhone or begin using a new iPad or Mac, the keyboard often loses much of the personalization it has developed over time. Users must re-teach autocorrect, rebuild custom vocabulary, and wait for the keyboard to relearn their typing habits. iCloud KeySync would allow users to move seamlessly between devices while keeping the keyboard experience familiar from day one. Problem Statement Apple’s keyboard becomes more useful over time as it learns: Frequently used words and phrases Personal slang and abbreviations Emoji preferences Autocorrect adjustments Writing patterns and typing habits When users switch devices, much of this personalization is lost or takes time to rebuild. This creates friction during device upgrades and reduces the feeling of continuity within the Apple ecosystem. Proposed Solution iCloud KeySync securely synchronizes keyboard personalization data across Apple devices. The feature would: Learn and store personalized keyboard behavior on-device. Encrypt and sync personalization data through iCloud. Restore keyboard preferences automatically when signing into a new device. Keep keyboard learning consistent across iPhone, iPad, and Mac. Key Features Personalized Vocabulary Sync Synchronizes user-added words, nicknames, slang, and frequently used phrases. Emoji Preference Sync Maintains commonly used emoji patterns across devices. Autocorrect Learning Sync Preserves learned corrections and accepted custom spellings. Typing Behavior Continuity Allows devices to share keyboard learning so users receive familiar suggestions regardless of which Apple device they use. User Controls Enable or disable iCloud KeySync. Reset keyboard learning at any time. View privacy information and storage usage. Privacy and Security Privacy should remain the foundation of the feature. All keyboard learning occurs on-device. Personalization data is end-to-end encrypted. Raw message content is never uploaded. Users retain full control over synchronization settings. Security protections match the standards used by iCloud Keychain. User Benefits New devices feel familiar immediately. Less time correcting autocorrect mistakes. Faster onboarding after device upgrades. Consistent typing experience across the Apple ecosystem. Improved customer satisfaction and retention. Example User Scenario A user upgrades from an older iPhone to a new iPhone. After signing into iCloud and restoring their device, the keyboard immediately recognizes their commonly used phrases, preferred emoji, custom words, and learned typing patterns. The new device feels personalized from the first message typed, without requiring weeks of retraining Business Value Improves the upgrade experience. Strengthens ecosystem continuity. Reinforces Apple’s privacy-first approach to AI and machine learning. Creates a subtle but meaningful quality-of-life improvement for millions of users. Switch phones. Keep your vibe.
Replies
1
Boosts
0
Views
27
Activity
5h
Consistent login issues in Cloudkit console "Act as iCloud Account"
I have been having this weird issue. Whenever I tap on "Act as iCloud Account" in cloudkit console, my login never works. I have been having this issue for more than 6 months now. ANy one have any insights on this?
Replies
0
Boosts
0
Views
9
Activity
11h
SwiftData Predicate for optional to-many (as required by CloudKit) relationships crashes
Fails with "to-many key not allowed here" // parent.children?.contains(where: { // $0.name == "Abbiejean" // }) != nil parent.children.flatMap { children in children.contains(where: { $0.name == "Abbijean" }) } == true How are we supposed to query on relationships? This is a huge problem. This is a major limitation blocking migration of CoreData to SwiftData. We can do this with NSPredicate: let moodAnalysis = NSPredicate(format: "ANY moodAnalysis.labels.title == %@", label.description) let stateOfMinds = NSPredicate(format: "SUBQUERY(stateOfMinds, $x, SUBQUERY($x.labels, $y, $y.title == %@).@count > 0).@count > 0", label.description) The accepted answer on stack overflow is: you can't Document says that optionals are allowed in predicates The SwiftData team has made a big show of saying that we can use idiomatic swift for our predicates. But we cannot even filter on relationships when the container is backed by CloudKit... That should be a HUGE warning in the documentation. "For those of you who are considering a costly refactor from CoreData to SwiftData, and are currently using CloudKit, all relationships are mandatory optional arrays, and you can't write predicates on them"
Replies
4
Boosts
0
Views
305
Activity
13h
CKSyncEngine doesn't send changes until app restarts
I've noticed that new record saves added using add(pendingRecordZoneChanges:) while handling events such as sentRecordZoneChanges or fetchedRecordZoneChanges aren't processed by CKSyncEngine until the app restarts, i.e. the app process has to be terminated and started again for CKSyncEngine to actually attempt to send the pending record saves. This started happening ever since I updated iOS and macOS to 26.5. Is this by design or a bug I should report?
Replies
1
Boosts
0
Views
69
Activity
1d
Apple Sign in Freeze
I was experiencing a weird sign in error when using apple sign in with my app and wanted to put it here for anyone else who might experience it in the future, and so apple can make this requirement more clear. I was using CloudKit and apple sign in. If you are not using both this probably does not apply to you. Every time I would go to sign in in the iOS simulator I would enter my password, hit "sign in", and everything just froze. The very odd reason for this is if you are using iCloudKit and apple sign in you need to go to specifically the "identifiers" in the "Certificates, Identifiers & Profiles" menu (https://developer.apple.com/account/resources/identifiers/list). And from there you specifically need an App ID Configuration with apple sign in enabled. From there you have to have the same exact bundle identifier in Xcode under project settings(not an upper tab just click your project in the left panel). And that should allow you to both pass validation and have your sign in work. Hope this helps!
Replies
1
Boosts
0
Views
332
Activity
1d
Control Logging of CloudKit in Xcode
I often struggle to see my own log data with the heavy stream of CloudKit updates. Is there an easy way to filter that our or turn it on/off?
Replies
3
Boosts
0
Views
94
Activity
2d
How can I reliably refresh WidgetKit widgets across devices after SwiftData + CloudKit synchronization?
Moved to WWDC26 iCloud & CloudKit Q&A: https://developer.apple.com/forums/thread/830698
Replies
0
Boosts
0
Views
118
Activity
2d
Strategy for Limiting CloudKit Activity / Refreshing
Are there good ways to guide an app to pause iCloud syncing if the app is busy with an intensive activity? Also, is there a way to suggest that it check iCloud for updates?
Replies
1
Boosts
0
Views
72
Activity
2d
iCloud LiveSharing link to colaborate
Hi there!, I have been developing an app where you can create a collection and I want to add a new feature where you can share an iCloud link from that collection and collaborate with your family or friends who you share the link to complete that collection. Like Apple does with the notes app or some other apps. The problem I have encountered is programming in swift does not allow you to do that and I need to do it I Core Data... Do you think with all the new stuff announced during the WWDC26 It could be done in Swift or I have to change coding?? Thanks community for any help
Replies
1
Boosts
0
Views
54
Activity
2d
CloudKit queries failing, need reindexing
See FB22358865. I have a formerly working app. From within the app, Queries to 4 'Record Types' work fine. Queries to one Record Type return only some records. When I 'Query Records' from the CloudKit dashboard I get 100-300 records downloaded for this Record Type. If I repeat 'Query Records' I get an additional 100-300 records. There are more than 4000 records. Apple Developer Technical Support has stated 'the index in your CloudKit container gets in a bad state." How can I fix this?
Replies
0
Boosts
0
Views
38
Activity
3d
iCloud Database Errors and Limits
We are currently implementing a custom iCloud sync for our macOS and iOS apps using CloudKit. Syncing works fine as long as the number of record sends is relatively small. But when we test with a large number of changes ( 80,000+ CKRecords ) we start running into problems. Our sending strategy is very conservative to avoid rate limits: We send records sequentially in batches of 250 records With about 2 seconds pause between operations Records are small and contain no assets (assets are uploaded separately) At some point we start receiving: “Database commit size exceeds limit” After that, CloudKit begins returning rate-limit errors with retryAfter-Information in the error. We wait for the retry time and try again, but from this moment on, nothing progresses anymore. Every subsequent attempt fails. We could not find anything in the official documentation regarding such a “commit size” limit or what triggers this failure state. So my questions are: Are there undocumented limits on the total number of records that can exist in an iCloud database (private or shared)? Is there a maximum volume of record modifications a container can accept within a certain timeframe, even if operations are split into small batches with pauses? Is it possible that sending large numbers of records in a row can temporarily or permanently “stall” a CloudKit container? Any insights or experiences would be greatly appreciated. Thank you!
Replies
1
Boosts
1
Views
264
Activity
6d
Advanced Data Protection and CloudKit Console.
I enabled Advanced Data Protection for my developer account, and this (understandably) broke access to my private records in CloudKit Console. I disabled Advanced Data Protection but CloudKit Console still cannot connect. In the database popup the "Click here to retry..." option always fails silently. Does anyone know a workaround?
Replies
5
Boosts
1
Views
1.5k
Activity
1w
Can a developer sponsor app-specific privateCloudDatabase storage for users?
Hi, We are developing an iOS/watchOS app that uses CloudKit private database and CKShare to let athletes share training data with their coaches. Current architecture: Each athlete owns their data in their privateCloudDatabase. The athlete can share selected records with a coach using CKShare. The coach accesses the shared data through the sharedCloudDatabase. This works very well for privacy, ownership, and permission management. The issue: Many athletes do not have enough available personal iCloud storage. When their iCloud storage is full, our app cannot save/sync/share new records in their privateCloudDatabase. This breaks the coach-athlete sharing flow, even if the coach is paying for a subscription in our app. Question: Is there any Apple-supported way for an app developer, or a coach/team organization using our app, to sponsor, allocate, or purchase additional iCloud storage specifically for a user’s app-specific CloudKit private database data? What we would like to preserve: Records stay in the athlete’s privateCloudDatabase. The athlete remains the owner of the data. CKShare continues to manage sharing permissions and consent. The app or coach organization covers the storage cost, instead of requiring every athlete to upgrade their personal iCloud+ plan. I understand that: privateCloudDatabase data counts against the user’s personal iCloud storage quota. publicCloudDatabase data counts against the app/container quota. CloudKit Database app can be used to manage the app’s CloudKit containers. However, moving this data to publicCloudDatabase would require us to rebuild part of the permission and sharing model ourselves, and it would not be equivalent to user-owned private records shared via CKShare. So I would like to confirm: Is there any way to sponsor or allocate app-specific privateCloudDatabase storage for selected users? Is there any Apple Business, Managed Apple Account, enterprise, or developer program option that supports this for sports teams or organizations? If this is not supported, are the only Apple-native alternatives: asking users to upgrade iCloud+, moving shared/team data to publicCloudDatabase, or using a third-party/app-managed backend? Use case: Our app is used in strength training. A coach may manage many athletes. The coach is willing to pay for the subscription and storage, but athletes often do not want to pay for additional iCloud storage individually. Thanks.
Replies
2
Boosts
0
Views
213
Activity
1w
CloudKit Query (and Dashboard) returns only a few records
When I query, an existing database with over 10,000 records from an Objective C app (i.e. CKQueryOperation) I get only N x 100 records returned where N varies each time between 0 and about 10 (i.e. never more than 1000 records and always an even multiple of 100). When I do a “Query Records” on the CloudKit Dashboard I get a similar number of pages of records downloaded (i.e. 0-10). If I tap “Query Records” multiple times I will get more pages of records until the full 10,000 are downloaded. This had been working fine until recently, both from the app and the Dashboard. There are multiple Record Types in the database. Only one Record Type is erroring. The other Record Types continue to work both from the app and the Dashboard. In particular, the Users Record Type has many many records and they all download to many pages with a single tap of “Query Records”. I have posted this to the Feedback Assistant under FB22358865. Here is my code: NSPredicate *predicate =[NSPredicate predicateWithFormat:@"modificationDate>%@",dateLastSynched]; CKRecordType theRecordName=[NSString stringWithString:@"Notices”]; // I also try this for @“Links” and @“Messages” and @“EventMessages" CKQuery *query = [[CKQuery alloc] initWithRecordType:theRecordName predicate:predicate]; CKQueryOperation *theOperation=[[CKQueryOperation alloc] initWithQuery:query]; [self startAQueryOperation:(CKQueryOperation *)theOperation theName:(NSString *)recordName]; -(void)startAQueryOperation:(CKQueryOperation *)theOperation theName:(NSString *)recordName{ theOperation.recordFetchedBlock=^(CKRecord *theRecord){ NSLog(@"XXXjust downloaded a %@",recordName); }; theOperation.queryCompletionBlock=^(CKQueryCursor *theCursor, NSError *error){ if(error){ NSLog(@"XXXerror %@",error); } if(theCursor){ CKQueryOperation *anotherOperation=[[CKQueryOperation alloc] initWithCursor:theCursor]; [self startAQueryOperation:anotherOperation theName:recordName]; } }; CKDatabase *publicDatabase = [[CKContainer defaultContainer] publicCloudDatabase]; [publicDatabase addOperation:theOperation]; } When I run this code in the app I get no “XXXerror” from the NSLogs. I get the expected number of “XXXjust downloaded a” EventMessages (435) and Messages (594) and Links (15) but I get varying amounts, 100 or 400 or 500 “xxjust downloaded a” for the Notices when I should get 10,118 records. Thinking that 10,000 records is too much, if I alter “dateLastSynched” for Notices I still get only 100 or 200, not the expected number. Note that the number is always a multiple of 100. This seems to be consistent with the typical number of records I get on the CloudKit dashboard each time I tap “Query Records”.
Replies
4
Boosts
0
Views
485
Activity
1w
Clarification on Current CloudKit CKAsset File Size Limits
Hi, I’m trying to find an authoritative and up-to-date answer regarding the maximum file size supported by CKAsset uploads in CloudKit. I know Apple documentation has historically referenced a 50 MB limit in some places, but from what I can tell, that limit appears to specifically apply to CloudKit Web Services rather than native CloudKit framework usage through CKAsset. At the same time, I frequently see reports from developers claiming they are successfully uploading significantly larger assets through CloudKit, sometimes well beyond 50 MB. However, I haven’t been able to find clear documentation confirming whether this behavior is officially supported, recommended, or simply tolerated under certain conditions. My use case involves potentially syncing assets larger than 50 MB, and I need to determine whether: CloudKit officially supports larger CKAsset uploads today There is a documented hard limit for native CloudKit CKAsset uploads Uploading larger assets is considered reliable/safe for production apps I should instead design around chunked uploads and reconstruction logic I’m specifically interested in current practical and documented limits for CKAsset in 2026, especially for private database usage on Apple platforms. If anyone from Apple or developers with production experience can clarify this, I’d appreciate it. I also opened a DTS incident regarding this question and was advised to ask on the forums so the answer can benefit other developers. Thanks. (I also opened a DTS incident regarding this question and was advised to ask on the forums so the answer can benefit other developers.)
Replies
2
Boosts
0
Views
317
Activity
2w
iCloud Sync not working with iPhone, works fine for Mac.
I've been working on an app. It uses iCloud syncing. 48 hours ago everything was working 100%. Make a change on the iPhone it immediately changed on the Mac. Change on the Mac, it immediately changed on the iPhone. I didn't work on it yesterday. I updated to iOS26.4 on the iPhone and 26.4 on the Mac yesterday instead. Today, I pull up the project again. I made NO changes to the code or settings. Make a change on the iPhone it immediately updates on the Mac. Make a change on the Mac, nothing happens on the iPhone. I've waited an hour, and the change never happens. If you leave the iPhone app, then return, it updates as it should. It appears that iCloud's silent notification is to being received by the iPhone. Anyone else having the issue? Is there something new with iOS 26.4 that needs to be adjusted to get this to work? Again, works flawlessly with the Mac, just not with the iPhone.
Replies
37
Boosts
17
Views
9.2k
Activity
2w
CKQuerySubscription on public database failing with BAD_REQUEST in Production — distinct from iOS 26.4 silent-push regression
Hello, I'm hitting a persistent CKQuerySubscription save failure on the public database in my Production CloudKit container. I want to flag this is NOT the iOS 26.4 silent-push regression resolved in 26.4.1 (I've confirmed it manifests differently and on devices that predate that bug). App: Win 10 Min (com.luiz.PandaApp) Container: iCloud.com.luiz.PandaApp Current shipping version: 3.2.1 build 420 (approved 2026-05-19) Public database THE ERROR (captured from CKError.userInfo) CKErrorCode 12 (badRequest) CKInternalErrorDomain code 2006 ("BadSyntax") ServerErrorDescription: "attempting to create a subscription in a production container" Execution time per failed attempt: 45-90ms (gateway-level rejection, not data validation). CODE let subscription = CKQuerySubscription( recordType: "GuardianRequest", predicate: NSPredicate(format: "guardianRecordName == %@", me), subscriptionID: "guardian-incoming-(me)", options: [.firesOnRecordCreation] ) let info = CKSubscription.NotificationInfo() info.shouldSendContentAvailable = true subscription.notificationInfo = info try await container.publicCloudDatabase.save(subscription) The .save() throws every time. REPRODUCES ACROSS iPhone on iOS 26.4.2 (i.e., has the 26.4.1 CloudKit regression fix) iPhone on iOS 18.6.x (predates the 26.4 regression entirely) Multiple distinct Apple IDs / userId hashes Fresh installs via TestFlight Updated installs from production CONSISTENTLY: USER_ERROR / BAD_REQUEST. Same error every time. WHY THIS ISN'T THE iOS 26.4 REGRESSION (Thread 820562) That regression caused silent notifications to be DROPPED client-side AFTER successful subscription creation. Our failure is SubscriptionCreate itself being rejected by the CloudKit server before any subscription exists. Different layer, different symptom. iOS 18.6.x devices also fail (they never had the 26.4 token-validation regression code). CLOUDKIT CONSOLE LOGS (sample request UUIDs Apple engineers can lookup) EB30E9D0-8C97-4685-BD16-3E79B3328D6F (2026-05-17 8:08 UTC) EEAA0606-5B50-4640-A950-EEA33B790B8E (2026-05-17, captured in-app) EB4C90CE-9172-4942-B00F-DE4A28388FBA (2026-05-19 7:18 UTC, iOS 18.6.x) F2DF69D9-2339-437A-B59B-7FBD4D57442F (2026-05-19 7:51 UTC, iOS 26.4.x) CloudKit Console → Production → Subscriptions: 0 entries despite 70+ attempts since 2026-05-11. WHAT I'VE VERIFIED / TRIED Schema: GuardianRequest.guardianRecordName and GuardianResponse.requesterRecordName both have QUERYABLE indexes in the Production schema (confirmed in Console). Field types: all STRING. aps-environment entitlement: "production" (changed from "development" in build 420; no change in error pattern). Push Notifications capability: enabled on App ID in Developer Portal AND in Xcode Signing & Capabilities for the main app target. UIBackgroundModes: includes "remote-notification". Re-deployed Production schema from Development on 2026-05-19 (Console reported "no changes"; failure pattern unchanged). Tried with and without info.desiredKeys = []. RecordQuery operations on the same fields and record types in the same container succeed consistently. QUESTIONS Is there a known infrastructure issue affecting public database CKQuerySubscription creation that is distinct from the iOS 26.4 regression (thread 820562)? Is there a per-container configuration that may be in an unexpected state, and if so what should I check? Are there workarounds beyond schema redeployment that have helped other developers in similar situations? Thanks for any guidance.
Replies
4
Boosts
0
Views
339
Activity
3w
CloudKit console truncates the rows when there are too many
I believe the CloudKit console has an issue when displaying a large number of rows (around 1,677). If I don't perform any filtering and make sure I am on page one (by scrolling to the bottom and ensuring there is only a 'next' button and no 'previous' button), sorting by 'Created' only shows records up to the year 2024. However, if I apply a text filter to search for the latest record, my 2026 records appear correctly. I have attached a screenshot for your reference. I am testing it under Development environment. I am looking at the private database / com.apple.coredata.cloudkit.zone. I had to add the recordName index to browse this data
Replies
1
Boosts
0
Views
254
Activity
3w
SwiftData with CloudKit Error: Error updating background task request
Hi, Overview I have a SwiftData project which automatically syncs with CloudKit. When I run the app, I see the following error in Xcode logs. Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 "(null)" My attempt I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist Questions How can I resolve this? If I should enable background processing, what are the BGTaskSchedulerPermittedIdentifiers to add in Info.plist?
Replies
18
Boosts
0
Views
1.1k
Activity
3w
CloudKit CKRecordZone Deletion Issue
CloudKit CKRecordZone Deletion Issue Problem: CloudKit record zones deleted via CKDatabase.modifyRecordZones(deleting:) or CKModifyRecordZonesOperation are successfully removed but then reappear. I suspect they are automatically reinstated by CloudKit sync, despite successful deletion confirmation. Environment: SwiftData with CloudKit integration Custom CloudKit zones created for legacy zone-based sharing Observed Behavior: Create custom zone (e.g., "TestZone1") via CKDatabase.modifyRecordZones(saving:) Copy records to zone for sharing purposes Delete zone using any CloudKit deletion API - returns success, no errors Immediate verification: Zone is gone from database.allRecordZones() After SwiftData/CloudKit sync or app restart: Zone reappears Reproduction: Tested with three different deletion methods - all exhibit same behaviour: modifyRecordZones(deleting:) async API CKModifyRecordZonesOperation (fire-and-forget) CKModifyRecordZonesOperation with result callbacks Zone deletion succeeds, change tokens (used to track updates to shared records) cleaned up But zones are restored presumably by CloudKit background sync Expected: Deleted zones should remain deleted Actual: Zones are reinstated, creating orphaned zones
Replies
2
Boosts
0
Views
315
Activity
May ’26