[AltStoreCore] Adds some common ALTPrivacyPermissions

* Apple Music
* Bluetooth
* Calendars
* Camera
* Face ID
* Local Network
* Microphone
* Photos
This commit is contained in:
Riley Testut
2023-05-26 19:38:19 -05:00
committed by Magesh K
parent 2afaf73fc5
commit ea0564126e
3 changed files with 47 additions and 2 deletions

View File

@@ -75,9 +75,36 @@ extension ALTEntitlement: ALTAppPermission
extension ALTAppPrivacyPermission: ALTAppPermission
{
public var type: ALTAppPermissionType { .privacy }
public var symbolName: String? { nil }
public var localizedName: String? { nil }
public var localizedName: String? {
switch self
{
case .photos: return NSLocalizedString("Photos", comment: "")
case .camera: return NSLocalizedString("Camera", comment: "")
case .faceID: return NSLocalizedString("Face ID", comment: "")
case .appleMusic: return NSLocalizedString("Apple Music", comment: "")
case .localNetwork: return NSLocalizedString("Local Network", comment: "")
case .bluetooth: return NSLocalizedString("Bluetooth (Always)", comment: "")
case .calendars: return NSLocalizedString("Calendars", comment: "")
case .microphone: return NSLocalizedString("Microphone", comment: "")
default: return nil
}
}
public var symbolName: String? {
switch self
{
case .photos: return "photo"
case .camera: return "camera"
case .faceID: return "faceid"
case .appleMusic: return "music.note"
case .localNetwork: return "wifi"
case .bluetooth: return "dot.radiowaves.forward"
case .calendars: return "calendar"
case .microphone: return "mic"
default: return nil
}
}
}
extension ALTAppBackgroundMode: ALTAppPermission