mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Revises appPermissions JSON format
• Split into `entitlements` and `privacy` sections • `entitlements` is an array of entitlement keys • `privacy` is a dictionary mapping UsageDescription keys to their descriptions
This commit is contained in:
@@ -23,12 +23,6 @@ public extension StoreApp
|
||||
#endif
|
||||
|
||||
static let dolphinAppID = "me.oatmealdome.dolphinios-njb"
|
||||
|
||||
private struct AppPermissions: Decodable
|
||||
{
|
||||
var entitlements: [AppPermission]?
|
||||
var privacy: [AppPermission]?
|
||||
}
|
||||
}
|
||||
|
||||
@objc
|
||||
@@ -299,10 +293,7 @@ public class StoreApp: NSManagedObject, Decodable, Fetchable
|
||||
|
||||
if let appPermissions = try container.decodeIfPresent(AppPermissions.self, forKey: .permissions)
|
||||
{
|
||||
appPermissions.entitlements?.forEach { $0.type = .entitlement }
|
||||
appPermissions.privacy?.forEach { $0.type = .privacy }
|
||||
|
||||
let allPermissions = (appPermissions.entitlements ?? []) + (appPermissions.privacy ?? [])
|
||||
let allPermissions = appPermissions.entitlements + appPermissions.privacy
|
||||
for permission in allPermissions
|
||||
{
|
||||
permission.appBundleID = self.bundleIdentifier
|
||||
|
||||
Reference in New Issue
Block a user