gh-XcodesOrg-XcodesApp/Xcodes/Frontend/XcodeList/XcodeListCategory.swift
Anand Biligiri 6e64db26fb Disallow changes to managed preferences
- Define enumerations for preferences that can be managed in an enterprise environment using MDM
- Add methods in AppState to check for managed preferences
- Update Advanced, Download, Experiments and Update preference panes to disable controls
  to modify any of the managed preferences
- Update Xcode category list button to be disabled if preference is managed
2024-06-21 07:17:18 +05:30

19 lines
494 B
Swift

import Foundation
enum XcodeListCategory: String, CaseIterable, Identifiable, CustomStringConvertible {
case all
case release
case beta
var id: Self { self }
var description: String {
switch self {
case .all: return localizeString("All")
case .release: return localizeString("Release")
case .beta: return localizeString("Beta")
}
}
var isManaged: Bool { PreferenceKey.xcodeListCategory.isManaged() }
}