mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-10 23:33:29 +01:00
Disables permission verification for DEBUG builds
This commit is contained in:
@@ -62,6 +62,8 @@ public extension UserDefaults
|
||||
// Including "MacDirtyCow" in name triggers false positives with malware detectors 🤷♂️
|
||||
@NSManaged var isCowExploitSupported: Bool
|
||||
|
||||
@NSManaged var permissionCheckingDisabled: Bool
|
||||
|
||||
class func registerDefaults()
|
||||
{
|
||||
let ios13_5 = OperatingSystemVersion(majorVersion: 13, minorVersion: 5, patchVersion: 0)
|
||||
@@ -80,6 +82,12 @@ public extension UserDefaults
|
||||
(ProcessInfo.processInfo.isOperatingSystemAtLeast(ios14) && !ProcessInfo.processInfo.isOperatingSystemAtLeast(ios15_7_2)) ||
|
||||
(ProcessInfo.processInfo.isOperatingSystemAtLeast(ios16) && !ProcessInfo.processInfo.isOperatingSystemAtLeast(ios16_2))
|
||||
|
||||
#if DEBUG
|
||||
let permissionCheckingDisabled = true
|
||||
#else
|
||||
let permissionCheckingDisabled = false
|
||||
#endif
|
||||
|
||||
let defaults = [
|
||||
#keyPath(UserDefaults.isBackgroundRefreshEnabled): true,
|
||||
#keyPath(UserDefaults.isLegacyDeactivationSupported): isLegacyDeactivationSupported,
|
||||
@@ -88,6 +96,7 @@ public extension UserDefaults
|
||||
#keyPath(UserDefaults.requiresAppGroupMigration): true,
|
||||
#keyPath(UserDefaults.ignoreActiveAppsLimit): false,
|
||||
#keyPath(UserDefaults.isCowExploitSupported): isMacDirtyCowSupported,
|
||||
#keyPath(UserDefaults.permissionCheckingDisabled): permissionCheckingDisabled,
|
||||
]
|
||||
|
||||
UserDefaults.standard.register(defaults: defaults)
|
||||
|
||||
Reference in New Issue
Block a user