Skip to content

Commit

Permalink
revert CNContactStore.authorizationStatus changes for Xcode15 building
Browse files Browse the repository at this point in the history
  • Loading branch information
paulplant committed Oct 14, 2024
1 parent 324d0b6 commit 71243de
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class SettingsViewContactImageSettingsViewModel: SettingsViewModelProtocol {
case .notDetermined:
return .none

case .restricted, .limited:
case .restricted:
// by clicking row, show what it means to be restricted, according to Apple doc
return .disclosureIndicator

Expand Down Expand Up @@ -153,10 +153,6 @@ class SettingsViewContactImageSettingsViewModel: SettingsViewModelProtocol {
trace("in SettingsViewContactImageSettingsViewModel, CNContactStore access restricted, according to apple doc 'possibly due to active restrictions such as parental controls being in place'", log: self.log, category: ConstantsLog.categoryRootView, type: .error)
UserDefaults.standard.enableContactImage = false

case .limited:
trace("in SettingsViewContactImageSettingsViewModel, CNContactStore access limited, ask the user to give full access", log: self.log, category: ConstantsLog.categoryRootView, type: .error)
UserDefaults.standard.enableContactImage = false

case .denied:
trace("in SettingsViewContactImageSettingsViewModel, CNContactStore access denied by user", log: self.log, category: ConstantsLog.categoryRootView, type: .error)
UserDefaults.standard.enableContactImage = false
Expand Down Expand Up @@ -229,10 +225,6 @@ class SettingsViewContactImageSettingsViewModel: SettingsViewModelProtocol {
// by clicking row, show what it means to be restricted, according to Apple doc
return SettingsSelectedRowAction.showInfoText(title: Texts_Common.warning, message: Texts_SettingsView.infoContactsAccessRestricted)

case .limited:
// by clicking row, show what it means to be limited, according to Apple doc
return SettingsSelectedRowAction.showInfoText(title: Texts_Common.warning, message: Texts_SettingsView.infoContactsAccessLimited)

@unknown default:
trace("in SettingsViewContactImageSettingsViewModel, unknown case returned when authorizing CNContactStore ", log: self.log, category: ConstantsLog.categoryRootView, type: .error)

Expand Down

0 comments on commit 71243de

Please sign in to comment.