Skip to content

fix(ios): pin iCloud Sync to the Production CloudKit environment#1632

Merged
datlechin merged 1 commit into
mainfrom
fix/ios-cloudkit-production-environment
Jun 9, 2026
Merged

fix(ios): pin iCloud Sync to the Production CloudKit environment#1632
datlechin merged 1 commit into
mainfrom
fix/ios-cloudkit-production-environment

Conversation

@datlechin

Copy link
Copy Markdown
Member

Problem

iCloud Sync between the iPhone and Mac apps reports success on both devices but moves no data. Logs show the Mac pulling 0 changed and both sides logging "Sync completed successfully".

Root cause

The Mac app pins com.apple.developer.icloud-container-environment = Production (added in 5dcb668c). The iOS app's entitlements never got that key. Per Apple's docs, a development-signed build with the key absent defaults to the Development CloudKit environment, while the Mac (and any TestFlight/App Store build) uses Production.

Same Apple ID, same container iCloud.com.TablePro, same zone TableProSync, but two separate backing databases. Each device creates the zone, pushes, and pulls successfully against its own environment, so each reports success while nothing crosses between Development and Production.

Fix

Add the missing key to the iOS entitlements, mirroring the Mac. App Store/TestFlight builds are unaffected (they were always Production); development iPhone builds now use Production too.

Test

EntitlementsEnvironmentParityTests parses both entitlement plists and asserts each pins Production. It fails if either app drifts. Runs without CloudKit or a network. Passing locally.

Migration note

After updating, reinstall the iOS build. If the iPhone still shows nothing, toggle iCloud Sync off/on once on the Mac to force-push existing data into Production.

@datlechin datlechin merged commit 2f95239 into main Jun 9, 2026
5 of 7 checks passed
@datlechin datlechin deleted the fix/ios-cloudkit-production-environment branch June 9, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant