mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[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:
@@ -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
|
||||
|
||||
@@ -112,6 +112,9 @@ NSErrorUserInfoKey const ALTProvisioningProfileBundleIDErrorKey = @"bundleIdenti
|
||||
case ALTServerErrorPluginNotFound:
|
||||
return NSLocalizedString(@"Make sure Mail is running and the plug-in is enabled in Mail's preferences.", @"");
|
||||
|
||||
case ALTServerErrorMaximumFreeAppLimitReached:
|
||||
return NSLocalizedString(@"Make sure “Offload Unused Apps” is disabled in Settings > iTunes & App Stores, then install or delete all offloaded apps.", @"");
|
||||
|
||||
default:
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -212,6 +212,10 @@ private extension AppDelegate
|
||||
{
|
||||
alert.informativeText = underlyingError.localizedDescription
|
||||
}
|
||||
else if let recoverySuggestion = error.localizedRecoverySuggestion
|
||||
{
|
||||
alert.informativeText = error.localizedDescription + "\n\n" + recoverySuggestion
|
||||
}
|
||||
else
|
||||
{
|
||||
alert.informativeText = error.localizedDescription
|
||||
|
||||
Reference in New Issue
Block a user