Use standard format: iCloud.BUNDLE_ID (ro.xdev.HealthProbe) Matches iOS bundle identifier format. Container must be created in Apple Developer Portal. For development/testing: use the iOS Simulator (local-only, no CloudKit). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@@ -74,10 +74,12 @@ struct HealthProbeApp: App {
|
||
| 74 | 74 |
cloudKitDatabase: .none |
| 75 | 75 |
) |
| 76 | 76 |
#else |
| 77 |
+ // For production, set up the CloudKit container in Apple Developer Portal. |
|
| 78 |
+ // Container must be: "iCloud." + PRODUCT_BUNDLE_IDENTIFIER |
|
| 77 | 79 |
cloudConfig = ModelConfiguration( |
| 78 | 80 |
"cloud", |
| 79 | 81 |
schema: cloudKitModels, |
| 80 |
- cloudKitDatabase: .private("iCloud.ro.xdev.healthprobe")
|
|
| 82 |
+ cloudKitDatabase: .private("iCloud.ro.xdev.HealthProbe")
|
|
| 81 | 83 |
) |
| 82 | 84 |
#endif |
| 83 | 85 |
|