[AltServer] Suggests disabling “Offload Unused Apps” in error message

iOS 13.5 counts offloaded apps as active sideloaded apps (for some reason), so improve error messages to mention this.
This commit is contained in:
Riley Testut
2020-05-21 21:00:05 -07:00
parent 64f8983d29
commit 2411cca51f
3 changed files with 14 additions and 1 deletions

View File

@@ -30,7 +30,13 @@ struct CodableServerError: Codable
{
self.errorCode = error.code
let userInfo = error.userInfo.compactMapValues { $0 as? String }
var userInfo = error.userInfo.compactMapValues { $0 as? String }
if let localizedRecoverySuggestion = (error as NSError).localizedRecoverySuggestion
{
userInfo[NSLocalizedRecoverySuggestionErrorKey] = localizedRecoverySuggestion
}
if !userInfo.isEmpty
{
self.userInfo = userInfo