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

200 Posts

Post

Replies

Boosts

Views

Activity

Good Morning, NSPersistentCloudKitContainer – Error 134060 When Sharing Independent Core Data Object Graphs Across CloudKit Zones
Good Morning NSPersistentCloudKitContainer – Error 134060 When Sharing Independent Core Data Object Graphs Across CloudKit Zones We are seeking guidance on the supported Core Data architecture for independently sharing multiple records using NSPersistentCloudKitContainer. Application Architecture Our iOS application allows users to manage a vessel and multiple cruises. Each cruise can be shared independently with different participants and permissions. Our Core Data model includes: CruiseEvents.vessel — optional relationship to Vessel Vessel.cruises — inverse relationship to CruiseEvents New cruises are automatically associated with the owner's primary vessel. Existing local cruises may also have this relationship populated. Our requirement is: Share each cruise independently using NSPersistentCloudKitContainer. Problem When preparing a share, we pass the selected CruiseEvents object as the root. However, Core Data appears to encounter conflicts when multiple independently shared cruises reference the same vessel. We receive Core Data error 134060, including: Object graph corruption detected … related objects assigned to multiple zones Subsequent CloudKit mirroring operations may also report error 134406. Our read-only diagnostic traversed the persisted Core Data relationships and identified multiple cruise roots connected through the same Vessel object. Locally available share metadata associates those cruise roots with different CloudKit share zones. This suggests that the shared vessel relationship may be connecting object graphs that Core Data expects to remain isolated within their respective sharing zones. We have not yet established whether this is the sole cause. The issue also occurs on a physical device, not just Simulator. Owner and recipient testing uses separate iCloud accounts. Questions 1. Independent Sharing and Relationships Is a Core Data relationship from multiple independently shared CruiseEvents objects to the same Vessel incompatible with NSPersistentCloudKitContainer sharing when those cruises belong to different share zones? 2. Relationship Traversal When Core Data determines the object graph for a share, does it traverse both directions of inverse relationships? Specifically, could the following path cause additional cruises to become part of the same connected graph? CruiseEvents.vessel → Vessel.cruises → Other CruiseEvents 3. Diagnostics Which logs, metadata, or diagnostic techniques would Apple recommend to distinguish between: An application-created relationship spanning independently shared graphs Stale or inconsistent CloudKit sharing metadata An NSPersistentCloudKitContainer framework issue Environment One affected test environment: iOS: 26.2 Simulator The issue has also been reproduced on a physical device. We can provide the exact device and OS details, diagnostic logs, and a minimal reproduction project if needed. Current Status Our primary question is whether independently shared Core Data objects must have completely isolated relationship graphs, and how Apple recommends modeling references to private objects that are logically shared across those graphs. Thank you for any guidance.
0
0
63
1d
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
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
Apple thought it was impossible
Apple thought it was impossible. I made it possible. No server. Just an iPhone. LUMEN-JEV OS v3.0 — On-device OS using Pyto + iCloud Drive + Obsidian Architecture: Pyto runtime = server: Persistent loop, 922 tickers scanned, 502.6 ev/s, 12ms latency, sub-2ms cache iCloud Drive = bus: Writes JEV-BUS.md every 15s, shared working directory Obsidian = OS window manager: 00-JEV-DASHBOARD-main 48 nodes live Vault: 11/11 LOCKED, Factory Complete Anchor: 572b9df5e8e1f101365f8316ba7b34da4aa54ff89a2dcdb68ed20b126e8cabed Chain: REAL-EXCHANGE-PUBLIC-WS -> 8-MODULE-DEMO -> DEMO-TERMINATED -> NO EXECUTION Feed: real-public-readonly / public_ticker_only Modules (8-MODULE-v1px): WARREN-WATCHDOG, KEEPER-BOX, NODE-MODE-SYNC, VAULT-MULT, SCOUT-SCAN, SIREN-FILTER, FOCUS-SIGNAL-20K, ORACLE-PRICE-FEED, RELAY-ROUTER, AKE-ARBITRAGE, YIELD-BACK-4, MEDUSAs: 03 DYNAMIC OBSERVER-SPACE Context: Built in 33hrs over 11 nights, day job, single dad, solo dev, on iPhone only. Pyto working directory set to iCloud Drive. No Mac backend, no CloudKit function, no external server. Why this matters for iOS: Apple's sandbox says you can't run a persistent OS-like loop with live file sync on iOS. Pyto + iCloud Drive persistence proves you can. iPhone becomes the server. Proof: 48 NODES LIVE canvas PROOF CHAIN 11/11 FLAT VIEW VAULT LOCKED Jev.py V2.6 CLEAN BUS log (checked 50/100/150/200 -> 922/922 passes) Anchor hash matches zip JEV-OS-v3.0-572b9df5-40files.zip Requesting: Guidance on showcasing this as an iOS innovation + Ask Apple office hours. X proof pinned: @Activepython007
23
1
1.5k
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
Sending a user-approved summary derived from HealthKit data to a third-party AI service (Guideline 5.1.3(i), DPLA 3.3.3(H))?
An optional coaching feature in my planned app would, after explicit opt-in, send a short text summary (for example sleep duration or heart rate variability over the last week) to a third-party AI service to generate advice for that same user. The data is not used for advertising, marketing or data mining. Guideline 5.1.3(i) allows disclosure of HealthKit-derived data only "for improving health management, or for the purpose of health research, and then only with permission", and DPLA 3.3.3(H) allows disclosure to a third party only with prior express consent and only to provide health, motion or fitness services. Is a per-user coaching feature like this within what 5.1.3(i) and 3.3.3(H) permit? Does it matter whether the summarised values were entered manually (and stored in HealthKit) or measured by a device? I understand this is not a pre-approval; I would like to know how the rule is meant to be read. Thank you.
0
0
308
1w
Guideline 5.1.3(ii) and DPLA 3.3.3(D): private CloudKit for meal logs and workout logs (no HealthKit values)?
I am planning an iOS app for strength training, nutrition and sleep. Before I build the data layer I would like to understand how Apple reads the following rules. Planned design: Body measurements and sleep values live in HealthKit only and are never written to iCloud or CloudKit. Training sessions and meal entries (food, calories, macronutrients, entered manually or by barcode scan) are stored on the device and in the user's private CloudKit database. Nothing is stored on our own servers. The app also caches packaged food products the user has scanned (name, ingredients, allergens, nutrition facts from the public Open Food Facts database) in the same private CloudKit database. Guideline 5.1.3(ii) says apps "may not store personal health information in iCloud", and DPLA 3.3.3(D) restricts using iCloud or CloudKit for "sensitive, individually-identifiable health information" unless Apple permits it in writing. Questions: Does a meal log or a product cache in the user's private CloudKit database count as "personal health information" in this sense, as long as no HealthKit values are stored there? Is the answer different if the private CloudKit data is end-to-end encrypted (encryptedValues)? I understand that App Review cannot pre-approve an app. I am only asking how the rule is meant to be read. Thank you.
0
0
273
1w
SwiftData + CloudKit unified logs to debug syncing
I was following the instructions of TN3163: Understanding the synchronization of NSPersistentCloudKitContainer to get a sysdiagnose from my machine (after installing the CloudKit profile for macOS) Then, I found an error message that looked interesting in the log, but it looked like this CoreData+CloudKit: -[NSCloudKitMirroringDelegate _exportFinishedWithResult:exporter:](1492): <private>: Export failed with error: Error Domain=CKErrorDomain Code=2 UserInfo={ContainerID=<private>, NSDebugDescription=<private>, CKPartialErrors=<private>, RequestUUID=<private>, NSLocalizedDescription=<private>, CKErrorDescription=<private>, NSUnderlyingError=0x768ff1ca50 {Error Domain=CKInternalErrorDomain Code=1011 UserInfo={CKErrorDescription=<private>, NSLocalizedDescription=<private>, CKPartialErrors=<private>}}}There is some problems mentioned in <private>. Those logs where from subsystem = com.apple.coredata and category = CloudKit Looking at the profile from Apple to debug this i see the subsystem com.apple.coredata was not in there. I could finally get the logs by adding to my Info.plist <key>OSLogPreferences</key> <dict> <key>com.apple.coredata</key> <dict> <key>CloudKit</key> <dict> <key>Enable-Private-Data</key> <true/> </dict> </dict> </dict>as explained in Recording Private Data in the System Log Still, it surprises me this is a problem to begin with. Should i report to Apple an incomplete debugging profile? Is it safe to keep the OSLogPreferences on for coredata/cloudkit for my app?
2
0
173
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
Simulator Apple Account sign-in fails with GsService2/postdata 401 (-22411 / -42023) after 2FA, Xcode 27.1
On 25 October 2026, signing in to an Apple Account in the Simulator (Settings > Apple Account > Sign in Manually) fails on iOS 27.0 and iOS 26.5 runtimes (Xcode 27.1, macOS 27.0.1, Apple silicon), for a new account (SMS second factor) and for an established account (trusted-device second factor). The password and second-factor steps complete; then akd logs "Will check in with IDMS" and POST gsas.apple.com/grandslam/GsService2/postdata returns HTTP 401 with ec -22411, sec -42023 ("This action cannot be completed at this time"), followed by "Failed to check in with IDMS! ... AKAuthenticationError Code=-7026". Settings then says the account or password is incorrect. The host Mac checks in with IDMS successfully, and the account works on icloud.com. I need a second account in the Simulator to test CloudKit share acceptance. Is this a known issue, and is there a workaround? Feedback: FB25318712.
0
0
169
3w
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
Good Morning, NSPersistentCloudKitContainer – Error 134060 When Sharing Independent Core Data Object Graphs Across CloudKit Zones
Good Morning NSPersistentCloudKitContainer – Error 134060 When Sharing Independent Core Data Object Graphs Across CloudKit Zones We are seeking guidance on the supported Core Data architecture for independently sharing multiple records using NSPersistentCloudKitContainer. Application Architecture Our iOS application allows users to manage a vessel and multiple cruises. Each cruise can be shared independently with different participants and permissions. Our Core Data model includes: CruiseEvents.vessel — optional relationship to Vessel Vessel.cruises — inverse relationship to CruiseEvents New cruises are automatically associated with the owner's primary vessel. Existing local cruises may also have this relationship populated. Our requirement is: Share each cruise independently using NSPersistentCloudKitContainer. Problem When preparing a share, we pass the selected CruiseEvents object as the root. However, Core Data appears to encounter conflicts when multiple independently shared cruises reference the same vessel. We receive Core Data error 134060, including: Object graph corruption detected … related objects assigned to multiple zones Subsequent CloudKit mirroring operations may also report error 134406. Our read-only diagnostic traversed the persisted Core Data relationships and identified multiple cruise roots connected through the same Vessel object. Locally available share metadata associates those cruise roots with different CloudKit share zones. This suggests that the shared vessel relationship may be connecting object graphs that Core Data expects to remain isolated within their respective sharing zones. We have not yet established whether this is the sole cause. The issue also occurs on a physical device, not just Simulator. Owner and recipient testing uses separate iCloud accounts. Questions 1. Independent Sharing and Relationships Is a Core Data relationship from multiple independently shared CruiseEvents objects to the same Vessel incompatible with NSPersistentCloudKitContainer sharing when those cruises belong to different share zones? 2. Relationship Traversal When Core Data determines the object graph for a share, does it traverse both directions of inverse relationships? Specifically, could the following path cause additional cruises to become part of the same connected graph? CruiseEvents.vessel → Vessel.cruises → Other CruiseEvents 3. Diagnostics Which logs, metadata, or diagnostic techniques would Apple recommend to distinguish between: An application-created relationship spanning independently shared graphs Stale or inconsistent CloudKit sharing metadata An NSPersistentCloudKitContainer framework issue Environment One affected test environment: iOS: 26.2 Simulator The issue has also been reproduced on a physical device. We can provide the exact device and OS details, diagnostic logs, and a minimal reproduction project if needed. Current Status Our primary question is whether independently shared Core Data objects must have completely isolated relationship graphs, and how Apple recommends modeling references to private objects that are logically shared across those graphs. Thank you for any guidance.
Replies
0
Boosts
0
Views
63
Activity
1d
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
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
Apple thought it was impossible
Apple thought it was impossible. I made it possible. No server. Just an iPhone. LUMEN-JEV OS v3.0 — On-device OS using Pyto + iCloud Drive + Obsidian Architecture: Pyto runtime = server: Persistent loop, 922 tickers scanned, 502.6 ev/s, 12ms latency, sub-2ms cache iCloud Drive = bus: Writes JEV-BUS.md every 15s, shared working directory Obsidian = OS window manager: 00-JEV-DASHBOARD-main 48 nodes live Vault: 11/11 LOCKED, Factory Complete Anchor: 572b9df5e8e1f101365f8316ba7b34da4aa54ff89a2dcdb68ed20b126e8cabed Chain: REAL-EXCHANGE-PUBLIC-WS -> 8-MODULE-DEMO -> DEMO-TERMINATED -> NO EXECUTION Feed: real-public-readonly / public_ticker_only Modules (8-MODULE-v1px): WARREN-WATCHDOG, KEEPER-BOX, NODE-MODE-SYNC, VAULT-MULT, SCOUT-SCAN, SIREN-FILTER, FOCUS-SIGNAL-20K, ORACLE-PRICE-FEED, RELAY-ROUTER, AKE-ARBITRAGE, YIELD-BACK-4, MEDUSAs: 03 DYNAMIC OBSERVER-SPACE Context: Built in 33hrs over 11 nights, day job, single dad, solo dev, on iPhone only. Pyto working directory set to iCloud Drive. No Mac backend, no CloudKit function, no external server. Why this matters for iOS: Apple's sandbox says you can't run a persistent OS-like loop with live file sync on iOS. Pyto + iCloud Drive persistence proves you can. iPhone becomes the server. Proof: 48 NODES LIVE canvas PROOF CHAIN 11/11 FLAT VIEW VAULT LOCKED Jev.py V2.6 CLEAN BUS log (checked 50/100/150/200 -> 922/922 passes) Anchor hash matches zip JEV-OS-v3.0-572b9df5-40files.zip Requesting: Guidance on showcasing this as an iOS innovation + Ask Apple office hours. X proof pinned: @Activepython007
Replies
23
Boosts
1
Views
1.5k
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
Sending a user-approved summary derived from HealthKit data to a third-party AI service (Guideline 5.1.3(i), DPLA 3.3.3(H))?
An optional coaching feature in my planned app would, after explicit opt-in, send a short text summary (for example sleep duration or heart rate variability over the last week) to a third-party AI service to generate advice for that same user. The data is not used for advertising, marketing or data mining. Guideline 5.1.3(i) allows disclosure of HealthKit-derived data only "for improving health management, or for the purpose of health research, and then only with permission", and DPLA 3.3.3(H) allows disclosure to a third party only with prior express consent and only to provide health, motion or fitness services. Is a per-user coaching feature like this within what 5.1.3(i) and 3.3.3(H) permit? Does it matter whether the summarised values were entered manually (and stored in HealthKit) or measured by a device? I understand this is not a pre-approval; I would like to know how the rule is meant to be read. Thank you.
Replies
0
Boosts
0
Views
308
Activity
1w
Guideline 5.1.3(ii) and DPLA 3.3.3(D): private CloudKit for meal logs and workout logs (no HealthKit values)?
I am planning an iOS app for strength training, nutrition and sleep. Before I build the data layer I would like to understand how Apple reads the following rules. Planned design: Body measurements and sleep values live in HealthKit only and are never written to iCloud or CloudKit. Training sessions and meal entries (food, calories, macronutrients, entered manually or by barcode scan) are stored on the device and in the user's private CloudKit database. Nothing is stored on our own servers. The app also caches packaged food products the user has scanned (name, ingredients, allergens, nutrition facts from the public Open Food Facts database) in the same private CloudKit database. Guideline 5.1.3(ii) says apps "may not store personal health information in iCloud", and DPLA 3.3.3(D) restricts using iCloud or CloudKit for "sensitive, individually-identifiable health information" unless Apple permits it in writing. Questions: Does a meal log or a product cache in the user's private CloudKit database count as "personal health information" in this sense, as long as no HealthKit values are stored there? Is the answer different if the private CloudKit data is end-to-end encrypted (encryptedValues)? I understand that App Review cannot pre-approve an app. I am only asking how the rule is meant to be read. Thank you.
Replies
0
Boosts
0
Views
273
Activity
1w
SwiftData + CloudKit unified logs to debug syncing
I was following the instructions of TN3163: Understanding the synchronization of NSPersistentCloudKitContainer to get a sysdiagnose from my machine (after installing the CloudKit profile for macOS) Then, I found an error message that looked interesting in the log, but it looked like this CoreData+CloudKit: -[NSCloudKitMirroringDelegate _exportFinishedWithResult:exporter:](1492): <private>: Export failed with error: Error Domain=CKErrorDomain Code=2 UserInfo={ContainerID=<private>, NSDebugDescription=<private>, CKPartialErrors=<private>, RequestUUID=<private>, NSLocalizedDescription=<private>, CKErrorDescription=<private>, NSUnderlyingError=0x768ff1ca50 {Error Domain=CKInternalErrorDomain Code=1011 UserInfo={CKErrorDescription=<private>, NSLocalizedDescription=<private>, CKPartialErrors=<private>}}}There is some problems mentioned in <private>. Those logs where from subsystem = com.apple.coredata and category = CloudKit Looking at the profile from Apple to debug this i see the subsystem com.apple.coredata was not in there. I could finally get the logs by adding to my Info.plist <key>OSLogPreferences</key> <dict> <key>com.apple.coredata</key> <dict> <key>CloudKit</key> <dict> <key>Enable-Private-Data</key> <true/> </dict> </dict> </dict>as explained in Recording Private Data in the System Log Still, it surprises me this is a problem to begin with. Should i report to Apple an incomplete debugging profile? Is it safe to keep the OSLogPreferences on for coredata/cloudkit for my app?
Replies
2
Boosts
0
Views
173
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
Simulator Apple Account sign-in fails with GsService2/postdata 401 (-22411 / -42023) after 2FA, Xcode 27.1
On 25 October 2026, signing in to an Apple Account in the Simulator (Settings > Apple Account > Sign in Manually) fails on iOS 27.0 and iOS 26.5 runtimes (Xcode 27.1, macOS 27.0.1, Apple silicon), for a new account (SMS second factor) and for an established account (trusted-device second factor). The password and second-factor steps complete; then akd logs "Will check in with IDMS" and POST gsas.apple.com/grandslam/GsService2/postdata returns HTTP 401 with ec -22411, sec -42023 ("This action cannot be completed at this time"), followed by "Failed to check in with IDMS! ... AKAuthenticationError Code=-7026". Settings then says the account or password is incorrect. The host Mac checks in with IDMS successfully, and the account works on icloud.com. I need a second account in the Simulator to test CloudKit share acceptance. Is this a known issue, and is there a workaround? Feedback: FB25318712.
Replies
0
Boosts
0
Views
169
Activity
3w
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