Revert "hogar compartido: colaboracion entre cuentas sobre Firestore"
El hogar compartido cambia donde viven los datos, asi que se va a la 3.0 y la 2.x queda para correcciones. El trabajo sigue vivo en la rama 3.0.0 (163fd60). Importante para esta rama: esto tambien retira el entitlement com.apple.developer.applesignin, que sin la capability marcada en el App ID habria roto la firma al subir la 2.1.1 a TestFlight. This reverts commit163fd60. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013su1ttRiMeMYxkZJ1Y3246
This commit is contained in:
@@ -49,25 +49,17 @@ struct MealMoodApp: App {
|
||||
ShoppingItem.self
|
||||
])
|
||||
|
||||
// 2.2: inside a household the data lives in Firestore (shared with the
|
||||
// other members, reachable from Android) and the store stays local.
|
||||
// Running CloudKit on top would mean two mirrors writing the same
|
||||
// objects. See docs/household-sync.md.
|
||||
HouseholdRuntime.isHouseholdStore = HouseholdRuntime.householdId != nil
|
||||
|
||||
// 2.0: CloudKit private-database sync (multi-device, same Apple ID).
|
||||
// Falls back to the local-only store when CloudKit isn't available
|
||||
// (signed-out iCloud, missing entitlement in dev builds, etc.).
|
||||
if !HouseholdRuntime.isHouseholdStore {
|
||||
let cloudConfiguration = ModelConfiguration(cloudKitDatabase: .automatic)
|
||||
do {
|
||||
let container = try ModelContainer(for: schema, configurations: [cloudConfiguration])
|
||||
CloudSyncRuntime.isCloudKitActive = true
|
||||
return container
|
||||
} catch {
|
||||
CrashlyticsService.record(error, context: "cloudkit_container")
|
||||
print("CloudKit container unavailable, using local store: \(error)")
|
||||
}
|
||||
let cloudConfiguration = ModelConfiguration(cloudKitDatabase: .automatic)
|
||||
do {
|
||||
let container = try ModelContainer(for: schema, configurations: [cloudConfiguration])
|
||||
CloudSyncRuntime.isCloudKitActive = true
|
||||
return container
|
||||
} catch {
|
||||
CrashlyticsService.record(error, context: "cloudkit_container")
|
||||
print("CloudKit container unavailable, using local store: \(error)")
|
||||
}
|
||||
|
||||
let configuration = ModelConfiguration(cloudKitDatabase: .none)
|
||||
|
||||
Reference in New Issue
Block a user