diff --git a/Tusker/LocalData.swift b/Tusker/LocalData.swift index 821b3955..5c9f51e0 100644 --- a/Tusker/LocalData.swift +++ b/Tusker/LocalData.swift @@ -30,7 +30,20 @@ class LocalData: ObservableObject { ] } } else { - defaults = UserDefaults() + defaults = UserDefaults(suiteName: "group.space.vaccor.Tusker")! + tryMigrateOldDefaults() + } + } + + // TODO: remove me before public beta + private func tryMigrateOldDefaults() { + let old = UserDefaults() + if let accounts = old.array(forKey: accountsKey) as? [[String: String]], + let mostRecentAccount = old.string(forKey: mostRecentAccountKey) { + defaults.setValue(accounts, forKey: accountsKey) + defaults.setValue(mostRecentAccount, forKey: mostRecentAccountKey) + old.removeObject(forKey: accountsKey) + old.removeObject(forKey: mostRecentAccountKey) } } diff --git a/Tusker/Tusker.entitlements b/Tusker/Tusker.entitlements new file mode 100644 index 00000000..ad0d7a74 --- /dev/null +++ b/Tusker/Tusker.entitlements @@ -0,0 +1,20 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.application-groups + + group.space.vaccor.Tusker + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + com.apple.security.network.client + + com.apple.security.personal-information.photos-library + + +