Removes support for “background mode” permissions

This commit is contained in:
Riley Testut
2023-05-26 14:58:52 -05:00
parent b662b90ea7
commit 4ed40cd544
7 changed files with 5 additions and 47 deletions

View File

@@ -23,7 +23,6 @@ public class AppPermission: NSManagedObject, Decodable, Fetchable
{
case .entitlement: return ALTEntitlement(rawValue: self._permission)
case .privacy: return ALTAppPrivacyPermission(rawValue: self._permission)
case .backgroundMode: return ALTAppBackgroundMode(rawValue: self._permission)
default: return UnknownAppPermission(rawValue: self._permission)
}
}
@@ -44,7 +43,6 @@ public class AppPermission: NSManagedObject, Decodable, Fetchable
{
case entitlement
case privacyType = "privacy"
case backgroundMode = "background"
case usageDescription
}
@@ -71,11 +69,6 @@ public class AppPermission: NSManagedObject, Decodable, Fetchable
self._permission = privacyType
self.type = .privacy
}
else if let backgroundMode = try container.decodeIfPresent(String.self, forKey: .backgroundMode)
{
self._permission = backgroundMode
self.type = .backgroundMode
}
else
{
self._permission = ""

View File

@@ -16,7 +16,6 @@ public extension ALTAppPermissionType
case .unknown: return NSLocalizedString("Permission", comment: "")
case .entitlement: return NSLocalizedString("Entitlement", comment: "")
case .privacy: return NSLocalizedString("Privacy Permission", comment: "")
case .backgroundMode: return NSLocalizedString("Background Mode", comment: "")
default: return nil
}
}
@@ -150,14 +149,3 @@ extension ALTAppPrivacyPermission: ALTAppPermission
}
}
}
extension ALTAppBackgroundMode: ALTAppPermission
{
public var type: ALTAppPermissionType { .backgroundMode }
public var symbolName: String? { nil }
public var localizedName: String? { nil }
public var synthesizedName: String? { nil }
public var localizedDescription: String? { nil }
}

View File

@@ -12,11 +12,8 @@ typedef NSString *ALTAppPermissionType NS_TYPED_EXTENSIBLE_ENUM;
extern ALTAppPermissionType const ALTAppPermissionTypeUnknown;
extern ALTAppPermissionType const ALTAppPermissionTypeEntitlement;
extern ALTAppPermissionType const ALTAppPermissionTypePrivacy;
extern ALTAppPermissionType const ALTAppPermissionTypeBackgroundMode;
typedef NSString *ALTAppPrivacyPermission NS_TYPED_EXTENSIBLE_ENUM;
typedef NSString *ALTAppBackgroundMode NS_TYPED_EXTENSIBLE_ENUM;
extern ALTAppPrivacyPermission const ALTAppPrivacyPermissionAppleMusic;
extern ALTAppPrivacyPermission const ALTAppPrivacyPermissionBluetooth;
extern ALTAppPrivacyPermission const ALTAppPrivacyPermissionCalendars;

View File

@@ -11,7 +11,6 @@
ALTAppPermissionType const ALTAppPermissionTypeUnknown = @"unknown";
ALTAppPermissionType const ALTAppPermissionTypeEntitlement = @"entitlement";
ALTAppPermissionType const ALTAppPermissionTypePrivacy = @"privacy";
ALTAppPermissionType const ALTAppPermissionTypeBackgroundMode = @"background";
ALTAppPrivacyPermission const ALTAppPrivacyPermissionAppleMusic = @"AppleMusic";
ALTAppPrivacyPermission const ALTAppPrivacyPermissionBluetooth = @"BluetoothAlways";