Asks user for permission before installing apps with private entitlements

This commit is contained in:
Riley Testut
2020-05-02 22:06:57 -07:00
parent 6cdbe8e9ff
commit bab1fcb7bc
5 changed files with 169 additions and 2 deletions

View File

@@ -25,3 +25,18 @@ extension NSError
return error
}
}
protocol ALTLocalizedError: LocalizedError, CustomNSError
{
var errorFailure: String? { get }
}
extension ALTLocalizedError
{
var errorUserInfo: [String : Any] {
let userInfo = [NSLocalizedDescriptionKey: self.errorDescription,
NSLocalizedFailureReasonErrorKey: self.failureReason,
NSLocalizedFailureErrorKey: self.errorFailure].compactMapValues { $0 }
return userInfo
}
}