diff --git a/Tusker/LocalData.swift b/Tusker/LocalData.swift index 821b395587..5c9f51e0c5 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 0000000000..ad0d7a7480 --- /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 + + +