mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2025-12-25 12:14:17 +01:00
- 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
20 lines
482 B
Swift
20 lines
482 B
Swift
import Foundation
|
|
|
|
public enum DataSource: String, CaseIterable, Identifiable, CustomStringConvertible {
|
|
case apple
|
|
case xcodeReleases
|
|
|
|
public var id: Self { self }
|
|
|
|
public static var `default` = DataSource.xcodeReleases
|
|
|
|
public var description: String {
|
|
switch self {
|
|
case .apple: return "Apple"
|
|
case .xcodeReleases: return "Xcode Releases"
|
|
}
|
|
}
|
|
|
|
var isManaged: Bool { PreferenceKey.dataSource.isManaged() }
|
|
}
|