Supports sideloading more than 3 apps via MacDirtyCow exploit

The MacDirtyCow exploit allows users to remove the 3 active apps limit on iOS 16.1.2 and earlier. To support this, we’ve added a new (hidden) “Enforce 3-App Limit” setting that can be disabled to allow sideloading more than 3 apps.
This commit is contained in:
Riley Testut
2023-02-06 17:36:05 -06:00
parent 90b4fa7605
commit eeea64f780
7 changed files with 118 additions and 11 deletions

View File

@@ -41,6 +41,7 @@ public extension UserDefaults
@NSManaged var trustedSourceIDs: [String]?
@nonobjc
var activeAppsLimit: Int? {
get {
return self._activeAppsLimit?.intValue
@@ -58,6 +59,8 @@ public extension UserDefaults
}
@NSManaged @objc(activeAppsLimit) private var _activeAppsLimit: NSNumber?
@NSManaged var ignoreActiveAppsLimit: Bool
class func registerDefaults()
{
let ios13_5 = OperatingSystemVersion(majorVersion: 13, minorVersion: 5, patchVersion: 0)
@@ -72,7 +75,8 @@ public extension UserDefaults
#keyPath(UserDefaults.isLegacyDeactivationSupported): isLegacyDeactivationSupported,
#keyPath(UserDefaults.activeAppLimitIncludesExtensions): activeAppLimitIncludesExtensions,
#keyPath(UserDefaults.localServerSupportsRefreshing): localServerSupportsRefreshing,
#keyPath(UserDefaults.requiresAppGroupMigration): true
#keyPath(UserDefaults.requiresAppGroupMigration): true,
#keyPath(UserDefaults.ignoreActiveAppsLimit): false,
]
UserDefaults.standard.register(defaults: defaults)