Learn how to integrate your app with iCloud for effective data storage.

Documentation

Posts under iCloud subtopic

Post

Replies

Boosts

Views

Activity

CloudKit public database vs Apple-hosted asset packs for a 63 MB data file updated weekly
My iOS app ships a read-only food database inside the app: one SQLite file, about 63 MB, no code. After launch I want to update it about once a week without a new app version. I'm choosing between a CloudKit public database and Apple-hosted asset packs (Background Assets). App Review said these questions are outside its scope. CloudKit public database (1) If the app downloads a new data file from the public database, does each update need App Review? (2) What are the current free limits for public database storage and data transfer? Each subscriber would download about 63 MB a few times a month. (3) What happens past the limit: requests fail, get throttled, or a bill? (4) Is there a size limit per asset? Splitting the file is fine. (5) Updates would go only to subscribers and people in the free trial. Apple's terms say you can't charge for access to iCloud. If the subscription pays for the app as a whole, is limiting the download to subscribers OK? (6) Does reading from the public database change the App Store privacy label? Apple-hosted asset packs (7) Is each new asset pack reviewed, and how long does that usually take? (8) Are there download limits, or a size limit per pack? For a data file that changes weekly, which would you pick? Is anyone running either one in production?
0
0
31
2d
Supported third-party integration for system Apple Account sign-in on macOS
We are assessing an independent macOS client for user-owned physical Macs. The requirement is to initiate and complete a real system Apple Account sign-in, including system account persistence and service activation. This is not Sign in with Apple for signing in to our own application. Our current test machine runs macOS 14.6.1 (23G93). We understand that observations on that version do not establish the supported API surface on current macOS releases. Could Apple clarify: Is there a documented third-party API or Apple-provided broker that supports this workflow? If so, what are its supported OS versions, caller requirements, and completion/result contract? If this requires an approved capability or a specific program, is there a published eligibility and application channel? We are not assuming that ordinary Developer Program membership grants private system-account privileges. If the only supported approach is a handoff to System Settings, can you confirm that boundary and identify any documented completion/status mechanism? A UI-only handoff would be a separate integration and would not fulfill our independent-client requirement. We are asking about supported integration options, not implementation details of internal APIs. We do not have a separate approved backend or a developer-program team at present, and would like to establish feasibility before purchasing membership or attempting account writes. No credentials, account identifiers, tokens, device materials, host addresses, or binary dumps are included.
0
0
18
2d
Apple iCloud Log TimeZone Verification
Hello, I'm using some of the data from apple icloud logs and hoping someone can help from the Apple community. When an app is autimatically updated there is a column called 'Activity Date' in the 'App-Book Re-download and Update History.csv' log file. Can you confirm the timezone? Here is an example date: 2025-02-02T02:13:40. Thank you!
2
0
110
4d
CloudKit public database: unknownItem despite earlier Console visibility — interpreting fetch and authorization diagnostics
We are investigating one completed CloudKit Development test in a separate test container using only synthetic data. Shortly before an iOS client attempted to fetch a record from the public database’s default zone, that synthetic record was visible in CloudKit Console. The native client returned: CKErrorDomain code 11 (unknownItem) Underlying CKInternalErrorDomain code 2003 Sanitized diagnostic: record_not_found No record We verified that the client’s intended container, database, zone and record name matched the reference. A CloudKit Console event showed RecordFetch, operation-level SUCCESS, and approximately 171 ms execution time. However: The event was correlated by context and timestamp, not by a directly matched client operation or request ID. The available event did not expose a per-record result or an authorization decision. Earlier Console visibility does not establish availability or client access at the exact time of the fetch. The cause therefore remains unresolved. We have not established that a permissions restriction caused the error. We understand that Apple documents unknownItem for a nonexistent record and permissionFailure for insufficient permission to fetch or save data. We also understand that operation-level success and per-record fetch success are distinct. Our questions are: Can a public-database read restriction cause an existing record to be reported to a native client as unknownItem, rather than permissionFailure? If so, is this documented behavior? What does operation-level SUCCESS mean specifically for a RecordFetch event in CloudKit Console? Can that event still contain an unsuccessful individual record lookup? Which supported diagnostics can distinguish a missing or unavailable record from an authorization-based visibility restriction? Can Apple determine the authorization outcome of an existing request from retained diagnostics, and which correlation identifiers are required? What evidence is sufficient to verify server-enforced read restrictions in Development while preserving the existing roles and leaving production untouched? We are seeking clarification of the existing evidence, not proposing another reproduction attempt. No customer data, credentials or production records are involved.
3
0
138
5d
CloudKit sync fails in macOS TestFlight build – sandbox denies com.apple.cloudd
I have a macOS SwiftUI app using SwiftData with CloudKit synchronization. Bundle ID: com.mjsapps.PhrasePin CloudKit container: iCloud.com.mjsapps.PhrasePin CloudKit synchronization works when running the app from Xcode using the Development environment. However, synchronization does not work in the TestFlight / Production build. The Production schema has been deployed successfully. The TestFlight build has the expected entitlements, including: com.apple.developer.icloud-container-environment = Production com.apple.developer.icloud-container-identifiers = iCloud.com.mjsapps.PhrasePin com.apple.developer.icloud-services = CloudKit com.apple.security.app-sandbox = true com.apple.security.network.client = true The TestFlight build is signed as: Authority=TestFlight Beta Distribution Identifier=com.mjsapps.PhrasePin TeamIdentifier=8D6TX86CQK CloudKit/Core Data logging shows that the app is trying to use: container=iCloud.com.mjsapps.PhrasePin:Production but synchronization fails with: CKErrorDomain Code=6 Error connecting to CloudKit daemon NSCocoaErrorDomain Code=4099 The macOS sandbox log shows: Sandbox: PhrasePin(...) deny(1) mach-lookup com.apple.cloudd As a result, no com.apple.coredata.cloudkit.zone is created in the Production private database and no SwiftData records are synchronized. The problem has been reproduced on: macOS Sequoia 15.7.7 macOS Sequoia 15.7.9 The same app works with CloudKit in Development when run from Xcode. I have already submitted a Feedback Assistant report, but have not received a response. Has anyone seen this behavior with SwiftData + CloudKit in a sandboxed macOS TestFlight build? Is there an additional entitlement or provisioning requirement needed for access to com.apple.cloudd in Production?
1
0
67
5d
CKKS zone deletions return success but stale 2019 key hierarchy persists; "Delete iCloud Data" not offered (FB25584356)
I filed FB25584356 for this and would appreciate any pointers. Setup: Mac mini on macOS 27.2.1 and an iPhone on iOS 27.2, same Apple Account, HSA2, Advanced Data Protection off. Octagon is healthy (otctl status = Ready, both devices trusted). Symptoms: AirDrop to my own iPhone fails when I pick the device (rapportd: "PairVerify server M2 failed: copy identity"), iPhone Mirroring ends with noCompatiblePhone, and various clients log CKErrorDomain 111 / 5009 "Keychain Sync Incomplete". What I see in CKKS: seven zones (AutoUnlock, LimitedPeersAllowed, Home, Manatee, ApplePay, Health, Engram) still hold a key hierarchy from August 2019. The only TLKShare was issued by a device that left the account years ago, so neither current device can unwrap the TLK ("No trusted TLKShares", CKKSErrorDomain 35). secd then does what I would expect: tlkmissing → "No other devices claim to have the TLK. Resetting zone..." → CKKSDeleteCKZoneOperation → local reset → zones recreated. The delete appears to succeed. With debug logging, cloudd shows status:200 and "RecordZone ... was successfully deleted from the server" for each zone. The next fetch returns the same 2019 records with an identical server change token. Over about 11 hours: 124 reset cycles, 869 zone deletions reported as successful, 182 consecutive AutoUnlock fetches with the same change token. When not throttled it runs roughly every 5 seconds; CloudKit eventually answers "Service Unavailable" (CKError 6/2009) with a ~59 minute retry-after, and all 23 zones are unusable in the meantime. ckksctl -v AutoUnlock reset-cloudkit behaves the same way. Reset path: Support article 120862 describes "Don't know passcode?" → "Forgot all passcodes?" → "More Options" → "Delete iCloud Data". With the Mac signed in but not yet trusted, "Don't know passcode?" only offered Cancel / Try Again Later, in the sign-in flow and in both System Settings follow-ups. After three wrong passcodes the alert had a single "Try Again Later" button, although cdpd logged "Creating recovery option: Reset". Questions: Is a client-side zone delete expected to be a no-op for these zones while the server reports success? Is there a supported way to reach performCKServerUnreadableDataRemoval / "Delete iCloud Data" when another trusted device exists? I am fine with losing the end-to-end encrypted data in those zones. Logs and a sysdiagnose are attached to the Feedback.
0
0
135
6d
SwiftData with CloudKit failing to migrate schema
My app has been in the App Store a few months. In that time I've added a few updates to my SwiftData schema using a MigrationPlan, and things were seemingly going ok. But then I decided to add CloudKit syncing. I needed to modify my models to be compatible. So, I added another migration stage for it, changed the properties as needed (making things optional or adding default values, etc.). In my tests, everything seemed to work smoothly updating from the previous version to the new version with CloudKit. So I released it to my users. But, that's when I started to see the crashes and error reports come in. I think I've narrowed it down to when users update from older versions of the app. I was finally able to reproduce this on my end, and Core Data is throwing an error when loading the ModelContainer saying "CloudKit integration requires that all attributes be optional, or have a default value set." Even though I did this in the latest schema. It’s like it’s trying to load CloudKit before performing the schema migration, and since it can’t, it just fails and won’t load anything. I’m kinda at a loss how to recover from this for these users other than tell them to delete their app and restart, but obviously they’ll lose their data that way. The only other idea I have is to setup some older builds on TestFlight and direct them to update to those first, then update to the newest production version and hope that solves it. Any other ideas? And what can I do to prevent this for future users who maybe reinstall the app from an older version too? There's nothing special about my code for loading the ModelContainer. Just a basic: let container = try ModelContainer( for: Foo.self, Bar.self, migrationPlan: SchemaMigration.self, configurations: ModelConfiguration(cloudKitDatabase: .automatic) )
8
3
3.6k
1w
CloudKit CKShare architecture for family and teacher access with private data separation
Hi everyone, I'm an independent iOS developer currently working on a family sharing feature for an app designed to support children with additional communication and care needs. I'm using CloudKit and CKShare, and I'd really appreciate some architectural guidance before moving into live sharing. The idea is to allow a parent to manage their child's profile and invite family members or teachers to access specific information. For example: Family members could share communication boards, routines and visual supports. Teachers could access school-related information and make authorised changes. Teachers may also need to record daily observations such as toileting, seizures, eating, drinking and sensory events. Parents would control which categories of information teachers can access. Private family wellbeing records and caregiver notes must remain inaccessible unless explicitly shared. I've already successfully tested CloudKit Development connectivity on a physical iPhone, including account status, user identity and private database zone discovery. Before implementing the actual sharing functionality, I'd like to understand the best approach to managing permissions and keeping sensitive information separate. My main questions are: Would separate custom record zones and CKShare relationships be the recommended approach for isolating school-shared data from family-private data? Since CKShare permissions apply at the share level, what's the recommended way to let teachers edit selected information without accessing other sensitive records? For parent-controlled access to individual categories such as toileting or seizure observations, would separate shares or zones per category be advisable? When a parent revokes a teacher's access, what guarantees does CloudKit provide regarding future access, particularly for previously downloaded data? Is there a recommended approach for synchronising school-created observations back into a parent's private history without exposing unrelated family records? My aim is to keep the experience simple for parents and teachers while ensuring that privacy is enforced by the underlying CloudKit architecture rather than relying solely on UI restrictions. I'd really appreciate any advice, recommendations or examples from developers or Apple engineers who have worked with similar sharing requirements. Many thanks!
0
0
80
1w
CloudKit JS with Advanced Data Protection: supported access to private encrypted data?
Does CloudKit JS support private encrypted records and assets when Advanced Data Protection is enabled? Our test account has ADP and iCloud.com web access on. Native CloudKit sync succeeds, but Apple’s browser sign-in reports Authentication Error before our callback. The container, environment, allowed origin and callback have been verified. A separate native-generated web token authenticates one identity request, while a known private-record lookup returns ACCESS_DENIED. Is there a supported trusted-device temporary-approval flow for third-party CloudKit JS, or another supported approach that keeps ADP enabled?
0
1
134
1w
iOS 27.2 beta: "Couldn't Sync iCloud Data" – Resume Data Sync only offers Delete (FB25408294)
Filed as FB25408294 with sysdiagnose attached. After an Apple battery repair (Aug 28, 2026), my iPhone 15 Pro Max was reset and set up as new. Since then, Settings shows "Some iCloud Data Isn't Syncing." Resume Data Sync asks for my iPhone passcode, loads, then shows "Couldn't Sync iCloud Data" with only Cancel or Delete iCloud Data. iOS 27.2 developer beta Advanced Data Protection: OFF Messages in iCloud: 188 GB stored, but "0 messages" / "Not synced" Same error on my Mac; Apple Watch Ultra can't finish setup because of it Tried current and previous device passcode No Recovery Key or Recovery Contact I have NOT deleted any iCloud data and want to recover it rather than reset it. Is anyone from the iCloud / CloudKit / Keychain team able to look at the FB? Has anyone found a way to get a device back into the iCloud Keychain circle without resetting end-to-end encrypted data?
1
0
86
2w
CloudKit subscription pushes keep being delivered to an app that no longer has the container entitlement
We ship two iOS apps from the same team that are designed to work together: App A – uses CloudKit container "Container A" App B – uses CloudKit container "Container B" Until App B version 1.5, App B also had Container A in its com.apple.developer.icloud-container-identifiers entitlement, because it read a few records from App A's container directly. App B called registerForRemoteNotifications() for its own container's subscriptions. App A creates a CKDatabaseSubscription on the shared database (and CKQuerySubscriptions on the private database) with notificationInfo.alertBody set, so that a participant gets a visible push when the owner shares something. Problem: on devices where App B 1.5 (or earlier) had run, every push generated by App A's subscriptions is delivered to both App A and App B. App B shows a banner with App A's alert text under App B's name. This still happens after we shipped App B 1.6, which removed Container A from App B's entitlements entirely (App B 1.6 never touches that container). What we have tried on an affected device, none of which stopped the deliveries to App B: Updating App B to 1.6 (entitlement removed). Deleting App B and reinstalling it from the App Store. In App B, calling unregisterForRemoteNotifications() and then registerForRemoteNotifications() again on next launch. Rebooting the iPhone. Devices that installed App B 1.6 fresh (never ran 1.5) do not receive these pushes, so the behavior seems to come from a registration that was created while App B still had the entitlement and that is not being cleaned up. Questions: Is the association "APNs token of App B ↔ Container A" kept on the CloudKit server side, and is there any way for the app (or for us as the developer) to remove it once the entitlement is gone? If it cannot be removed explicitly, does it expire? Roughly how long after the app stops registering for that container? Is there a recommended way to design this (two apps, one container) so that alert pushes from one app's subscriptions are not shown by the other app? We would rather not switch App A to content-available pushes with local notifications, because silent pushes are not delivered reliably when the app has been force-quit. Environment: iOS 26, App A 4.7.x, App B 1.6.x, Production CloudKit environment. We have also filed a DTS request with the actual identifiers and can provide device logs or a sysdiagnose if helpful. Thank you.
3
0
236
2w
Share access requests (iOS 26) via CloudKit Web Services / CloudKit JS?
iOS/macOS 26 added share access requests: CKShare.allowsAccessRequests, CKShare.requesters, CKShareRequestAccessOperation, and deny/block requesters on CKShare. My app uses this flow on iOS, macOS and watchOS: The owner sets allowsAccessRequests = true and shows the share URL as a QR code. The joiner runs CKShareRequestAccessOperation for that URL. The owner reads requesters and approves (adds a participant), denies or blocks. I'd like to do part of this from the web. I can't find anything about access requests in the CloudKit Web Services reference or the CloudKit JS docs. Is there a supported way to read/set allowsAccessRequests, submit an access request, or list/approve/deny/block requesters through Web Services or CloudKit JS? If not, is there a recommended workaround? I've filed this as a suggestion: FB25372887
0
0
134
3w
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.
5
0
1.2k
3w
CloudKit JS private zone lookup fails authentication while record lookups succeed
I’m investigating an authentication discrepancy in CloudKit’s Development private database, using a Safari Dock web app on macOS 26.5. All records contain fabricated test data. Names below are anonymized. In one signed-in SDK session, records/lookup successfully read a private default-zone marker. The following zones/lookup for TestZone failed with auth-failed/noAccount. Two private reads, zero writes. A separately inspected full-trial zone request returned AUTHENTICATION_FAILED with the reason: “Authentication failed. Please check you have the correct API token for this container.” In a fresh session, records/lookup directly read metadata for TestHead in TestZone and returned revision 1. It used zoneID and non-asset desiredKeys, without zones/lookup. One private read, zero asset downloads, zero writes. The existing website API token was recopied from the selected container, not regenerated. The inspected request Origin matched the configured allowed origin. The app uses a custom fetch adapter and RAM-only authTokenStore. It checks identity before private requests and rebinds only ckWebAuthToken to the token validated by that check. This is not an unmodified SDK request path. Does private zones/lookup have a documented authentication requirement that differs from records/lookup? Could this custom request handling explain these results? The root cause is still unconfirmed.
2
0
267
3w
CKQuerySubscription save fails in Production with CKError 12 “attempting to create a subscription in a production container” (works in Development)
Saving any CKQuerySubscription to the private database fails in the Production environment with CKError 12 (badRequest): “attempting to create a subscription in a production container”. The same subscriptions save fine in Development. The schema, including the needed QUERYABLE index, has been deployed to Production. This looks like the same issue as FB22867235 and Developer Forums thread 826814. Container: iCloud.com.darkstardev.chorecalendar Environment: Production (TestFlight build 0.2 (5)) Device / OS: iPhone18,2, iOS 27.0.1 App: Core Data with NSPersistentCloudKitContainer (private and shared stores), sharing a zone with CKShare Database: privateCloudDatabase of the share owner’s account Zone: the Core Data share zone, com.apple.coredata.cloudkit.share.7653A214-0824-4D0D-BC02-4270E0826376 Subscription: CKQuerySubscription on recordType CD_Mark predicate CD_status == "waiting" options .firesOnRecordCreation and .firesOnRecordUpdate zoneID set to the share zone Schema: CD_Mark has a QUERYABLE index on CD_status in Production, which I verified in the CloudKit Console. All three notificationInfo variants fail the same way in Production. All three succeed in Development: An alert with titleLocalizationKey, alertLocalizationKey and alertLocalizationArgs ["CD_kidName", "CD_choreName"] A plain alert with titleLocalizationKey and alertLocalizationKey, without args A silent subscription with shouldSendContentAvailable = true and desiredKeys Because even the silent subscription is refused, the cause isn’t the alert configuration. Production refuses CKQuerySubscription creation for this container. Steps to reproduce: Install the TestFlight build, signed in as the share owner. Create and share a family record through NSPersistentCloudKitContainer. Turn on the in-app setting that saves the subscription. Expected: the subscription is saved, and a push arrives when a participant creates or updates a waiting CD_Mark record. Actual: all three saves fail. Error text: “Error saving record subscription with id check-ins-com.apple.coredata.cloudkit.share.7653A214-0824-4D0D-BC02-4270E0826376 to server: attempting to create a subscription in a production container” (CKError 12). Already tried: Deploying the schema from Development to Production. Turning the setting off and on again a day later.
4
0
214
3w
FileManager.ubiquityIdentityToken returns nil despite correct entitlements, iCloud sign-in, and app-level iCloud Drive permission
I have a shipped App Store app (bundle ID com.stoolkit.app) using a private iCloud container (iCloud.com.stoolkit.app) purely for file-based backup via FileManager's ubiquity container APIs, not CloudKit database/CKContainer. The availability check is as simple as: FileManager.default.ubiquityIdentityToken != nil This consistently returns nil, even though: the app's embedded provisioning profile (verified by extracting embedded.mobileprovision from the built .ipa and parsing it) correctly includes com.apple.developer.icloud-container-identifiers, com.apple.developer.ubiquity-container-identifiers (both = iCloud.com.stoolkit.app), and com.apple.developer.icloud-services. The app's entitlements plist correctly declares com.apple.developer.icloud-container-identifiers: [iCloud.com.stoolkit.app] and com.apple.developer.icloud-services: [CloudDocuments]. The test device is signed into iCloud. Settings > Apple ID > iCloud > Apps Using iCloud shows the app listed and toggled on. The device-wide iCloud Drive toggle is on. No Content and Privacy / Screen Time restrictions are active. It reproduces identically on two separate physical devices (an iPad via TestFlight, an iPhone via the live App Store), both running the same signed build. Relaunching the app and toggling iCloud Drive off/on device-wide did not change the behavior. I don't currently have access to a Mac/Xcode to produce a verified minimal reproduction project, but the check itself is a single system API call, so I'd expect a fresh single-view app with the same iCloud container entitlement to reproduce it directly. What could cause ubiquityIdentityToken to return nil under these conditions? Is there an account- or container-side initialization step I might be missing beyond registering the container under the App ID's capabilities?
1
0
264
4w
CloudKit CKShare: storage ownership, quota accounting and shared-zone failures
I am evaluating the storage architecture for a native iOS family-organising application using CloudKit. The design is preliminary, and I am seeking clarification before native testing and production deployment. Proposed test scenario Apple Account A owns a custom record zone in its private CloudKit database. Account A creates a root CKRecord and CKShare. Independent Apple Account B accepts the share with read/write permissions. Account B accesses and updates shared records through sharedCloudDatabase. Both accounts initially have separate iCloud storage allocations. 1. Storage ownership and quota accounting Apple's documentation appears to describe shared CloudKit storage using different terminology. The native sharedCloudDatabase documentation references the application's iCloud storage quota, while CKError.Code.quotaExceeded describes a shared-zone write failing when the zone owner's iCloud storage is full. For records, shares, metadata and CKAssets created or modified by Account B in Account A's shared zone: Whose iCloud storage allocation is consumed? Is any additional storage counted against Account B? Does any usage count against a developer-level CloudKit quota or generate operator charges? 2. Storage exhaustion and error behaviour If Account A reaches its iCloud storage limit while Account B has available storage, should B's writes to A's shared zone fail with quotaExceeded? Conversely, if B's storage is full but A has capacity, should B still be able to modify A's shared records? How should the application distinguish quota failures affecting B's private database from failures affecting A's shared zone? Does behaviour change when both accounts use the same Apple Family iCloud storage pool or when an account downgrades its storage plan? 3. Current CloudKit limits and costs Could Apple clarify or identify authoritative documentation for: Current native CloudKit storage, request and data-transfer allowances. Whether 400 records/shares per operation and 2 MB per request remain current guidelines. How change fetches, retries and partial failures are accounted for. Any differences between CloudKit development and production environments. Whether private/shared CloudKit usage can result in developer-billed charges. Where developers can verify the applicable allowances for their own containers before production deployment. I have not yet reproduced a quota-exceeded scenario in a focused Xcode project. I am seeking architectural clarification to design appropriate storage limits, recovery behaviour and native verification tests. Links to authoritative Apple documentation or clarification from an Apple frameworks engineer would be greatly appreciated.
1
0
455
4w
CloudKit – Unable to Assign Custom Security Role to User
Hello Apple Developer Support, I'm developing an iOS application called LuckyWinston that uses CloudKit for its backend. I'm trying to assign a custom CloudKit security role to a specific user in the public database. However, I've encountered the following issues: The built-in Users record type cannot be queried normally. Attempting to fetch the user record directly by its record ID also fails. I haven't found a supported method in the current CloudKit Console for assigning a custom security role to an individual user. I understand that CloudKit restricts queries against its built-in user records, but I would like clarification on how developers are expected to assign custom security roles. My questions are: Is assigning custom security roles to individual CloudKit users still supported? If so, what is the correct procedure using the current CloudKit Console or supported APIs? Is there an alternative supported method for assigning user-specific permissions without exposing sensitive records? If individual custom-role assignments are no longer supported, what architecture does Apple recommend? I want to ensure that LuckyWinston follows Apple's recommended CloudKit security practices before proceeding further. Thank you for your assistance.
1
0
128
4w
CloudKit Console: Deploy Schema Changes to Production fails with HTTP 500 "internal-error"
I'm hitting the same issue. Deploying the Development schema to Production fails every time with HTTP 500 internal-error on the …/schema/<developmentSchemaId>/promote request. It fails from both the "Changes" tab and the "Diff View" tab of the Confirm Deployment dialog. detailedMessage is undefined. Filed as FB25280547, with the container ID, request UUIDs and screenshots. Example requestUuid: 7f4aec62-6ead-4e86-8784-77be751d3622 The diff is purely additive: Core Data / NSPersistentCloudKitContainer fields such as _ckAsset assets, CD_moveReceipt and one new string field, plus QUERYABLE indexes on ___recordID. No type changes and no removals. I tried refreshing, re-signing in, and a private window. It still fails. This blocks our App Store release because the new build writes a field that Production doesn't have yet. Could someone from the CloudKit Console team take a look? Thank you!
1
0
488
4w
Why does CloudKit data field (bytes) take up more (~10 times) iCloud storage than asset field?
I export a small image with size of 100 kilobytes (or less) via CoreData+CloudKit. The image data is then stored in a data field in user's private database. In CloudKit dashboard, it shows that the data size is 100 kilobytes - as it should. The device's local storage increase by 100 kilobytes - as expected. However, I check the user's iCloud storage (in Settings>Apple ID>iCloud>Manage Storage). The app's storage in crease by approximately 1 megabytes. Larger by a factor of 10! I try uploading the same image to a test asset field via CloudKit Dashboard. The user's iCloud storage increase by 100 kilobytes - as expected. Why the data (bytes) field take up more of user's iCloud quota than asset field? I really prefer to directly store as data rather than as a CKAsset. Is this just the way it is... or a bug?
14
5
3.6k
Oct ’26
CloudKit public database vs Apple-hosted asset packs for a 63 MB data file updated weekly
My iOS app ships a read-only food database inside the app: one SQLite file, about 63 MB, no code. After launch I want to update it about once a week without a new app version. I'm choosing between a CloudKit public database and Apple-hosted asset packs (Background Assets). App Review said these questions are outside its scope. CloudKit public database (1) If the app downloads a new data file from the public database, does each update need App Review? (2) What are the current free limits for public database storage and data transfer? Each subscriber would download about 63 MB a few times a month. (3) What happens past the limit: requests fail, get throttled, or a bill? (4) Is there a size limit per asset? Splitting the file is fine. (5) Updates would go only to subscribers and people in the free trial. Apple's terms say you can't charge for access to iCloud. If the subscription pays for the app as a whole, is limiting the download to subscribers OK? (6) Does reading from the public database change the App Store privacy label? Apple-hosted asset packs (7) Is each new asset pack reviewed, and how long does that usually take? (8) Are there download limits, or a size limit per pack? For a data file that changes weekly, which would you pick? Is anyone running either one in production?
Replies
0
Boosts
0
Views
31
Activity
2d
Supported third-party integration for system Apple Account sign-in on macOS
We are assessing an independent macOS client for user-owned physical Macs. The requirement is to initiate and complete a real system Apple Account sign-in, including system account persistence and service activation. This is not Sign in with Apple for signing in to our own application. Our current test machine runs macOS 14.6.1 (23G93). We understand that observations on that version do not establish the supported API surface on current macOS releases. Could Apple clarify: Is there a documented third-party API or Apple-provided broker that supports this workflow? If so, what are its supported OS versions, caller requirements, and completion/result contract? If this requires an approved capability or a specific program, is there a published eligibility and application channel? We are not assuming that ordinary Developer Program membership grants private system-account privileges. If the only supported approach is a handoff to System Settings, can you confirm that boundary and identify any documented completion/status mechanism? A UI-only handoff would be a separate integration and would not fulfill our independent-client requirement. We are asking about supported integration options, not implementation details of internal APIs. We do not have a separate approved backend or a developer-program team at present, and would like to establish feasibility before purchasing membership or attempting account writes. No credentials, account identifiers, tokens, device materials, host addresses, or binary dumps are included.
Replies
0
Boosts
0
Views
18
Activity
2d
Apple iCloud Log TimeZone Verification
Hello, I'm using some of the data from apple icloud logs and hoping someone can help from the Apple community. When an app is autimatically updated there is a column called 'Activity Date' in the 'App-Book Re-download and Update History.csv' log file. Can you confirm the timezone? Here is an example date: 2025-02-02T02:13:40. Thank you!
Replies
2
Boosts
0
Views
110
Activity
4d
CloudKit public database: unknownItem despite earlier Console visibility — interpreting fetch and authorization diagnostics
We are investigating one completed CloudKit Development test in a separate test container using only synthetic data. Shortly before an iOS client attempted to fetch a record from the public database’s default zone, that synthetic record was visible in CloudKit Console. The native client returned: CKErrorDomain code 11 (unknownItem) Underlying CKInternalErrorDomain code 2003 Sanitized diagnostic: record_not_found No record We verified that the client’s intended container, database, zone and record name matched the reference. A CloudKit Console event showed RecordFetch, operation-level SUCCESS, and approximately 171 ms execution time. However: The event was correlated by context and timestamp, not by a directly matched client operation or request ID. The available event did not expose a per-record result or an authorization decision. Earlier Console visibility does not establish availability or client access at the exact time of the fetch. The cause therefore remains unresolved. We have not established that a permissions restriction caused the error. We understand that Apple documents unknownItem for a nonexistent record and permissionFailure for insufficient permission to fetch or save data. We also understand that operation-level success and per-record fetch success are distinct. Our questions are: Can a public-database read restriction cause an existing record to be reported to a native client as unknownItem, rather than permissionFailure? If so, is this documented behavior? What does operation-level SUCCESS mean specifically for a RecordFetch event in CloudKit Console? Can that event still contain an unsuccessful individual record lookup? Which supported diagnostics can distinguish a missing or unavailable record from an authorization-based visibility restriction? Can Apple determine the authorization outcome of an existing request from retained diagnostics, and which correlation identifiers are required? What evidence is sufficient to verify server-enforced read restrictions in Development while preserving the existing roles and leaving production untouched? We are seeking clarification of the existing evidence, not proposing another reproduction attempt. No customer data, credentials or production records are involved.
Replies
3
Boosts
0
Views
138
Activity
5d
CloudKit sync fails in macOS TestFlight build – sandbox denies com.apple.cloudd
I have a macOS SwiftUI app using SwiftData with CloudKit synchronization. Bundle ID: com.mjsapps.PhrasePin CloudKit container: iCloud.com.mjsapps.PhrasePin CloudKit synchronization works when running the app from Xcode using the Development environment. However, synchronization does not work in the TestFlight / Production build. The Production schema has been deployed successfully. The TestFlight build has the expected entitlements, including: com.apple.developer.icloud-container-environment = Production com.apple.developer.icloud-container-identifiers = iCloud.com.mjsapps.PhrasePin com.apple.developer.icloud-services = CloudKit com.apple.security.app-sandbox = true com.apple.security.network.client = true The TestFlight build is signed as: Authority=TestFlight Beta Distribution Identifier=com.mjsapps.PhrasePin TeamIdentifier=8D6TX86CQK CloudKit/Core Data logging shows that the app is trying to use: container=iCloud.com.mjsapps.PhrasePin:Production but synchronization fails with: CKErrorDomain Code=6 Error connecting to CloudKit daemon NSCocoaErrorDomain Code=4099 The macOS sandbox log shows: Sandbox: PhrasePin(...) deny(1) mach-lookup com.apple.cloudd As a result, no com.apple.coredata.cloudkit.zone is created in the Production private database and no SwiftData records are synchronized. The problem has been reproduced on: macOS Sequoia 15.7.7 macOS Sequoia 15.7.9 The same app works with CloudKit in Development when run from Xcode. I have already submitted a Feedback Assistant report, but have not received a response. Has anyone seen this behavior with SwiftData + CloudKit in a sandboxed macOS TestFlight build? Is there an additional entitlement or provisioning requirement needed for access to com.apple.cloudd in Production?
Replies
1
Boosts
0
Views
67
Activity
5d
CKKS zone deletions return success but stale 2019 key hierarchy persists; "Delete iCloud Data" not offered (FB25584356)
I filed FB25584356 for this and would appreciate any pointers. Setup: Mac mini on macOS 27.2.1 and an iPhone on iOS 27.2, same Apple Account, HSA2, Advanced Data Protection off. Octagon is healthy (otctl status = Ready, both devices trusted). Symptoms: AirDrop to my own iPhone fails when I pick the device (rapportd: "PairVerify server M2 failed: copy identity"), iPhone Mirroring ends with noCompatiblePhone, and various clients log CKErrorDomain 111 / 5009 "Keychain Sync Incomplete". What I see in CKKS: seven zones (AutoUnlock, LimitedPeersAllowed, Home, Manatee, ApplePay, Health, Engram) still hold a key hierarchy from August 2019. The only TLKShare was issued by a device that left the account years ago, so neither current device can unwrap the TLK ("No trusted TLKShares", CKKSErrorDomain 35). secd then does what I would expect: tlkmissing → "No other devices claim to have the TLK. Resetting zone..." → CKKSDeleteCKZoneOperation → local reset → zones recreated. The delete appears to succeed. With debug logging, cloudd shows status:200 and "RecordZone ... was successfully deleted from the server" for each zone. The next fetch returns the same 2019 records with an identical server change token. Over about 11 hours: 124 reset cycles, 869 zone deletions reported as successful, 182 consecutive AutoUnlock fetches with the same change token. When not throttled it runs roughly every 5 seconds; CloudKit eventually answers "Service Unavailable" (CKError 6/2009) with a ~59 minute retry-after, and all 23 zones are unusable in the meantime. ckksctl -v AutoUnlock reset-cloudkit behaves the same way. Reset path: Support article 120862 describes "Don't know passcode?" → "Forgot all passcodes?" → "More Options" → "Delete iCloud Data". With the Mac signed in but not yet trusted, "Don't know passcode?" only offered Cancel / Try Again Later, in the sign-in flow and in both System Settings follow-ups. After three wrong passcodes the alert had a single "Try Again Later" button, although cdpd logged "Creating recovery option: Reset". Questions: Is a client-side zone delete expected to be a no-op for these zones while the server reports success? Is there a supported way to reach performCKServerUnreadableDataRemoval / "Delete iCloud Data" when another trusted device exists? I am fine with losing the end-to-end encrypted data in those zones. Logs and a sysdiagnose are attached to the Feedback.
Replies
0
Boosts
0
Views
135
Activity
6d
SwiftData with CloudKit failing to migrate schema
My app has been in the App Store a few months. In that time I've added a few updates to my SwiftData schema using a MigrationPlan, and things were seemingly going ok. But then I decided to add CloudKit syncing. I needed to modify my models to be compatible. So, I added another migration stage for it, changed the properties as needed (making things optional or adding default values, etc.). In my tests, everything seemed to work smoothly updating from the previous version to the new version with CloudKit. So I released it to my users. But, that's when I started to see the crashes and error reports come in. I think I've narrowed it down to when users update from older versions of the app. I was finally able to reproduce this on my end, and Core Data is throwing an error when loading the ModelContainer saying "CloudKit integration requires that all attributes be optional, or have a default value set." Even though I did this in the latest schema. It’s like it’s trying to load CloudKit before performing the schema migration, and since it can’t, it just fails and won’t load anything. I’m kinda at a loss how to recover from this for these users other than tell them to delete their app and restart, but obviously they’ll lose their data that way. The only other idea I have is to setup some older builds on TestFlight and direct them to update to those first, then update to the newest production version and hope that solves it. Any other ideas? And what can I do to prevent this for future users who maybe reinstall the app from an older version too? There's nothing special about my code for loading the ModelContainer. Just a basic: let container = try ModelContainer( for: Foo.self, Bar.self, migrationPlan: SchemaMigration.self, configurations: ModelConfiguration(cloudKitDatabase: .automatic) )
Replies
8
Boosts
3
Views
3.6k
Activity
1w
CloudKit CKShare architecture for family and teacher access with private data separation
Hi everyone, I'm an independent iOS developer currently working on a family sharing feature for an app designed to support children with additional communication and care needs. I'm using CloudKit and CKShare, and I'd really appreciate some architectural guidance before moving into live sharing. The idea is to allow a parent to manage their child's profile and invite family members or teachers to access specific information. For example: Family members could share communication boards, routines and visual supports. Teachers could access school-related information and make authorised changes. Teachers may also need to record daily observations such as toileting, seizures, eating, drinking and sensory events. Parents would control which categories of information teachers can access. Private family wellbeing records and caregiver notes must remain inaccessible unless explicitly shared. I've already successfully tested CloudKit Development connectivity on a physical iPhone, including account status, user identity and private database zone discovery. Before implementing the actual sharing functionality, I'd like to understand the best approach to managing permissions and keeping sensitive information separate. My main questions are: Would separate custom record zones and CKShare relationships be the recommended approach for isolating school-shared data from family-private data? Since CKShare permissions apply at the share level, what's the recommended way to let teachers edit selected information without accessing other sensitive records? For parent-controlled access to individual categories such as toileting or seizure observations, would separate shares or zones per category be advisable? When a parent revokes a teacher's access, what guarantees does CloudKit provide regarding future access, particularly for previously downloaded data? Is there a recommended approach for synchronising school-created observations back into a parent's private history without exposing unrelated family records? My aim is to keep the experience simple for parents and teachers while ensuring that privacy is enforced by the underlying CloudKit architecture rather than relying solely on UI restrictions. I'd really appreciate any advice, recommendations or examples from developers or Apple engineers who have worked with similar sharing requirements. Many thanks!
Replies
0
Boosts
0
Views
80
Activity
1w
CloudKit JS with Advanced Data Protection: supported access to private encrypted data?
Does CloudKit JS support private encrypted records and assets when Advanced Data Protection is enabled? Our test account has ADP and iCloud.com web access on. Native CloudKit sync succeeds, but Apple’s browser sign-in reports Authentication Error before our callback. The container, environment, allowed origin and callback have been verified. A separate native-generated web token authenticates one identity request, while a known private-record lookup returns ACCESS_DENIED. Is there a supported trusted-device temporary-approval flow for third-party CloudKit JS, or another supported approach that keeps ADP enabled?
Replies
0
Boosts
1
Views
134
Activity
1w
iOS 27.2 beta: "Couldn't Sync iCloud Data" – Resume Data Sync only offers Delete (FB25408294)
Filed as FB25408294 with sysdiagnose attached. After an Apple battery repair (Aug 28, 2026), my iPhone 15 Pro Max was reset and set up as new. Since then, Settings shows "Some iCloud Data Isn't Syncing." Resume Data Sync asks for my iPhone passcode, loads, then shows "Couldn't Sync iCloud Data" with only Cancel or Delete iCloud Data. iOS 27.2 developer beta Advanced Data Protection: OFF Messages in iCloud: 188 GB stored, but "0 messages" / "Not synced" Same error on my Mac; Apple Watch Ultra can't finish setup because of it Tried current and previous device passcode No Recovery Key or Recovery Contact I have NOT deleted any iCloud data and want to recover it rather than reset it. Is anyone from the iCloud / CloudKit / Keychain team able to look at the FB? Has anyone found a way to get a device back into the iCloud Keychain circle without resetting end-to-end encrypted data?
Replies
1
Boosts
0
Views
86
Activity
2w
CloudKit subscription pushes keep being delivered to an app that no longer has the container entitlement
We ship two iOS apps from the same team that are designed to work together: App A – uses CloudKit container "Container A" App B – uses CloudKit container "Container B" Until App B version 1.5, App B also had Container A in its com.apple.developer.icloud-container-identifiers entitlement, because it read a few records from App A's container directly. App B called registerForRemoteNotifications() for its own container's subscriptions. App A creates a CKDatabaseSubscription on the shared database (and CKQuerySubscriptions on the private database) with notificationInfo.alertBody set, so that a participant gets a visible push when the owner shares something. Problem: on devices where App B 1.5 (or earlier) had run, every push generated by App A's subscriptions is delivered to both App A and App B. App B shows a banner with App A's alert text under App B's name. This still happens after we shipped App B 1.6, which removed Container A from App B's entitlements entirely (App B 1.6 never touches that container). What we have tried on an affected device, none of which stopped the deliveries to App B: Updating App B to 1.6 (entitlement removed). Deleting App B and reinstalling it from the App Store. In App B, calling unregisterForRemoteNotifications() and then registerForRemoteNotifications() again on next launch. Rebooting the iPhone. Devices that installed App B 1.6 fresh (never ran 1.5) do not receive these pushes, so the behavior seems to come from a registration that was created while App B still had the entitlement and that is not being cleaned up. Questions: Is the association "APNs token of App B ↔ Container A" kept on the CloudKit server side, and is there any way for the app (or for us as the developer) to remove it once the entitlement is gone? If it cannot be removed explicitly, does it expire? Roughly how long after the app stops registering for that container? Is there a recommended way to design this (two apps, one container) so that alert pushes from one app's subscriptions are not shown by the other app? We would rather not switch App A to content-available pushes with local notifications, because silent pushes are not delivered reliably when the app has been force-quit. Environment: iOS 26, App A 4.7.x, App B 1.6.x, Production CloudKit environment. We have also filed a DTS request with the actual identifiers and can provide device logs or a sysdiagnose if helpful. Thank you.
Replies
3
Boosts
0
Views
236
Activity
2w
Share access requests (iOS 26) via CloudKit Web Services / CloudKit JS?
iOS/macOS 26 added share access requests: CKShare.allowsAccessRequests, CKShare.requesters, CKShareRequestAccessOperation, and deny/block requesters on CKShare. My app uses this flow on iOS, macOS and watchOS: The owner sets allowsAccessRequests = true and shows the share URL as a QR code. The joiner runs CKShareRequestAccessOperation for that URL. The owner reads requesters and approves (adds a participant), denies or blocks. I'd like to do part of this from the web. I can't find anything about access requests in the CloudKit Web Services reference or the CloudKit JS docs. Is there a supported way to read/set allowsAccessRequests, submit an access request, or list/approve/deny/block requesters through Web Services or CloudKit JS? If not, is there a recommended workaround? I've filed this as a suggestion: FB25372887
Replies
0
Boosts
0
Views
134
Activity
3w
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
5
Boosts
0
Views
1.2k
Activity
3w
CloudKit JS private zone lookup fails authentication while record lookups succeed
I’m investigating an authentication discrepancy in CloudKit’s Development private database, using a Safari Dock web app on macOS 26.5. All records contain fabricated test data. Names below are anonymized. In one signed-in SDK session, records/lookup successfully read a private default-zone marker. The following zones/lookup for TestZone failed with auth-failed/noAccount. Two private reads, zero writes. A separately inspected full-trial zone request returned AUTHENTICATION_FAILED with the reason: “Authentication failed. Please check you have the correct API token for this container.” In a fresh session, records/lookup directly read metadata for TestHead in TestZone and returned revision 1. It used zoneID and non-asset desiredKeys, without zones/lookup. One private read, zero asset downloads, zero writes. The existing website API token was recopied from the selected container, not regenerated. The inspected request Origin matched the configured allowed origin. The app uses a custom fetch adapter and RAM-only authTokenStore. It checks identity before private requests and rebinds only ckWebAuthToken to the token validated by that check. This is not an unmodified SDK request path. Does private zones/lookup have a documented authentication requirement that differs from records/lookup? Could this custom request handling explain these results? The root cause is still unconfirmed.
Replies
2
Boosts
0
Views
267
Activity
3w
CKQuerySubscription save fails in Production with CKError 12 “attempting to create a subscription in a production container” (works in Development)
Saving any CKQuerySubscription to the private database fails in the Production environment with CKError 12 (badRequest): “attempting to create a subscription in a production container”. The same subscriptions save fine in Development. The schema, including the needed QUERYABLE index, has been deployed to Production. This looks like the same issue as FB22867235 and Developer Forums thread 826814. Container: iCloud.com.darkstardev.chorecalendar Environment: Production (TestFlight build 0.2 (5)) Device / OS: iPhone18,2, iOS 27.0.1 App: Core Data with NSPersistentCloudKitContainer (private and shared stores), sharing a zone with CKShare Database: privateCloudDatabase of the share owner’s account Zone: the Core Data share zone, com.apple.coredata.cloudkit.share.7653A214-0824-4D0D-BC02-4270E0826376 Subscription: CKQuerySubscription on recordType CD_Mark predicate CD_status == "waiting" options .firesOnRecordCreation and .firesOnRecordUpdate zoneID set to the share zone Schema: CD_Mark has a QUERYABLE index on CD_status in Production, which I verified in the CloudKit Console. All three notificationInfo variants fail the same way in Production. All three succeed in Development: An alert with titleLocalizationKey, alertLocalizationKey and alertLocalizationArgs ["CD_kidName", "CD_choreName"] A plain alert with titleLocalizationKey and alertLocalizationKey, without args A silent subscription with shouldSendContentAvailable = true and desiredKeys Because even the silent subscription is refused, the cause isn’t the alert configuration. Production refuses CKQuerySubscription creation for this container. Steps to reproduce: Install the TestFlight build, signed in as the share owner. Create and share a family record through NSPersistentCloudKitContainer. Turn on the in-app setting that saves the subscription. Expected: the subscription is saved, and a push arrives when a participant creates or updates a waiting CD_Mark record. Actual: all three saves fail. Error text: “Error saving record subscription with id check-ins-com.apple.coredata.cloudkit.share.7653A214-0824-4D0D-BC02-4270E0826376 to server: attempting to create a subscription in a production container” (CKError 12). Already tried: Deploying the schema from Development to Production. Turning the setting off and on again a day later.
Replies
4
Boosts
0
Views
214
Activity
3w
FileManager.ubiquityIdentityToken returns nil despite correct entitlements, iCloud sign-in, and app-level iCloud Drive permission
I have a shipped App Store app (bundle ID com.stoolkit.app) using a private iCloud container (iCloud.com.stoolkit.app) purely for file-based backup via FileManager's ubiquity container APIs, not CloudKit database/CKContainer. The availability check is as simple as: FileManager.default.ubiquityIdentityToken != nil This consistently returns nil, even though: the app's embedded provisioning profile (verified by extracting embedded.mobileprovision from the built .ipa and parsing it) correctly includes com.apple.developer.icloud-container-identifiers, com.apple.developer.ubiquity-container-identifiers (both = iCloud.com.stoolkit.app), and com.apple.developer.icloud-services. The app's entitlements plist correctly declares com.apple.developer.icloud-container-identifiers: [iCloud.com.stoolkit.app] and com.apple.developer.icloud-services: [CloudDocuments]. The test device is signed into iCloud. Settings > Apple ID > iCloud > Apps Using iCloud shows the app listed and toggled on. The device-wide iCloud Drive toggle is on. No Content and Privacy / Screen Time restrictions are active. It reproduces identically on two separate physical devices (an iPad via TestFlight, an iPhone via the live App Store), both running the same signed build. Relaunching the app and toggling iCloud Drive off/on device-wide did not change the behavior. I don't currently have access to a Mac/Xcode to produce a verified minimal reproduction project, but the check itself is a single system API call, so I'd expect a fresh single-view app with the same iCloud container entitlement to reproduce it directly. What could cause ubiquityIdentityToken to return nil under these conditions? Is there an account- or container-side initialization step I might be missing beyond registering the container under the App ID's capabilities?
Replies
1
Boosts
0
Views
264
Activity
4w
CloudKit CKShare: storage ownership, quota accounting and shared-zone failures
I am evaluating the storage architecture for a native iOS family-organising application using CloudKit. The design is preliminary, and I am seeking clarification before native testing and production deployment. Proposed test scenario Apple Account A owns a custom record zone in its private CloudKit database. Account A creates a root CKRecord and CKShare. Independent Apple Account B accepts the share with read/write permissions. Account B accesses and updates shared records through sharedCloudDatabase. Both accounts initially have separate iCloud storage allocations. 1. Storage ownership and quota accounting Apple's documentation appears to describe shared CloudKit storage using different terminology. The native sharedCloudDatabase documentation references the application's iCloud storage quota, while CKError.Code.quotaExceeded describes a shared-zone write failing when the zone owner's iCloud storage is full. For records, shares, metadata and CKAssets created or modified by Account B in Account A's shared zone: Whose iCloud storage allocation is consumed? Is any additional storage counted against Account B? Does any usage count against a developer-level CloudKit quota or generate operator charges? 2. Storage exhaustion and error behaviour If Account A reaches its iCloud storage limit while Account B has available storage, should B's writes to A's shared zone fail with quotaExceeded? Conversely, if B's storage is full but A has capacity, should B still be able to modify A's shared records? How should the application distinguish quota failures affecting B's private database from failures affecting A's shared zone? Does behaviour change when both accounts use the same Apple Family iCloud storage pool or when an account downgrades its storage plan? 3. Current CloudKit limits and costs Could Apple clarify or identify authoritative documentation for: Current native CloudKit storage, request and data-transfer allowances. Whether 400 records/shares per operation and 2 MB per request remain current guidelines. How change fetches, retries and partial failures are accounted for. Any differences between CloudKit development and production environments. Whether private/shared CloudKit usage can result in developer-billed charges. Where developers can verify the applicable allowances for their own containers before production deployment. I have not yet reproduced a quota-exceeded scenario in a focused Xcode project. I am seeking architectural clarification to design appropriate storage limits, recovery behaviour and native verification tests. Links to authoritative Apple documentation or clarification from an Apple frameworks engineer would be greatly appreciated.
Replies
1
Boosts
0
Views
455
Activity
4w
CloudKit – Unable to Assign Custom Security Role to User
Hello Apple Developer Support, I'm developing an iOS application called LuckyWinston that uses CloudKit for its backend. I'm trying to assign a custom CloudKit security role to a specific user in the public database. However, I've encountered the following issues: The built-in Users record type cannot be queried normally. Attempting to fetch the user record directly by its record ID also fails. I haven't found a supported method in the current CloudKit Console for assigning a custom security role to an individual user. I understand that CloudKit restricts queries against its built-in user records, but I would like clarification on how developers are expected to assign custom security roles. My questions are: Is assigning custom security roles to individual CloudKit users still supported? If so, what is the correct procedure using the current CloudKit Console or supported APIs? Is there an alternative supported method for assigning user-specific permissions without exposing sensitive records? If individual custom-role assignments are no longer supported, what architecture does Apple recommend? I want to ensure that LuckyWinston follows Apple's recommended CloudKit security practices before proceeding further. Thank you for your assistance.
Replies
1
Boosts
0
Views
128
Activity
4w
CloudKit Console: Deploy Schema Changes to Production fails with HTTP 500 "internal-error"
I'm hitting the same issue. Deploying the Development schema to Production fails every time with HTTP 500 internal-error on the …/schema/<developmentSchemaId>/promote request. It fails from both the "Changes" tab and the "Diff View" tab of the Confirm Deployment dialog. detailedMessage is undefined. Filed as FB25280547, with the container ID, request UUIDs and screenshots. Example requestUuid: 7f4aec62-6ead-4e86-8784-77be751d3622 The diff is purely additive: Core Data / NSPersistentCloudKitContainer fields such as _ckAsset assets, CD_moveReceipt and one new string field, plus QUERYABLE indexes on ___recordID. No type changes and no removals. I tried refreshing, re-signing in, and a private window. It still fails. This blocks our App Store release because the new build writes a field that Production doesn't have yet. Could someone from the CloudKit Console team take a look? Thank you!
Replies
1
Boosts
0
Views
488
Activity
4w
Why does CloudKit data field (bytes) take up more (~10 times) iCloud storage than asset field?
I export a small image with size of 100 kilobytes (or less) via CoreData+CloudKit. The image data is then stored in a data field in user's private database. In CloudKit dashboard, it shows that the data size is 100 kilobytes - as it should. The device's local storage increase by 100 kilobytes - as expected. However, I check the user's iCloud storage (in Settings>Apple ID>iCloud>Manage Storage). The app's storage in crease by approximately 1 megabytes. Larger by a factor of 10! I try uploading the same image to a test asset field via CloudKit Dashboard. The user's iCloud storage increase by 100 kilobytes - as expected. Why the data (bytes) field take up more of user's iCloud quota than asset field? I really prefer to directly store as data rather than as a CKAsset. Is this just the way it is... or a bug?
Replies
14
Boosts
5
Views
3.6k
Activity
Oct ’26