Hi everyone,
I’m currently developing a SwiftUI app that uses SwiftData with CloudKit sharing enabled. The app works fine on my own Apple ID, and local syncing with iCloud is functioning correctly — but sharing with other Apple IDs consistently fails.
Setup:
- SwiftUI + SwiftData using a
ModelContainer
with.shared
configuration - Sharing UI is handled via
UICloudSharingController
- iCloud container:
iCloud.com.de.SkerskiDev.FoodGuard
- Proper entitlements enabled (
com.apple.developer.icloud-services
,CloudKit
,com.apple.developer.coredata.cloudkit.containers
, etc.) - Automatic provisioning profiles created by Xcode
Error:<CKError 0x1143a2be0: "Bad Container" (5/1014); "Couldn't get container configuration from the server for container iCloud.com.de.SkerskiDev.FoodGuard">
What I’ve tried:
- Verified the iCloud container is correctly created and enabled in the Apple Developer portal
- Checked bundle identifier and container settings
- Rebuilt and reinstalled the app
- Ensured correct iCloud entitlements and signing capabilities
Questions:
- Why does CloudKit reject the container for sharing while local syncing works fine?
- Are there known issues with SwiftData
.shared
containers and multi-user sharing? - Are additional steps required (App Store Connect, privacy settings) to allow sharing with other Apple IDs?
Any advice, experience, or example projects would be greatly appreciated. 🙏
Thanks!
Sebastian