[AltDaemon] Fixes certificate becoming untrusted after refreshing

This commit is contained in:
Riley Testut
2020-06-11 16:15:45 -07:00
parent 4d9fad5d53
commit 2b00ea5107

View File

@@ -15,6 +15,11 @@ private extension URL
static let profilesDirectoryURL = URL(fileURLWithPath: "/var/MobileDevice/ProvisioningProfiles", isDirectory: true)
}
private extension CFNotificationName
{
static let updatedProvisioningProfiles = CFNotificationName("MISProvisioningProfileRemoved" as CFString)
}
struct AppManager
{
static let shared = AppManager()
@@ -94,6 +99,9 @@ struct AppManager
{
completionHandler(.failure(error))
}
// Notify system to prevent accidentally untrusting developer certificate.
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), .updatedProvisioningProfiles, nil, nil, true)
}
}
@@ -121,6 +129,9 @@ struct AppManager
{
completionHandler(.failure(error))
}
// Notify system to prevent accidentally untrusting developer certificate.
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), .updatedProvisioningProfiles, nil, nil, true)
}
}
}