[AltServer] Improves error handling when installing apps

This commit is contained in:
Riley Testut
2019-09-13 14:25:26 -07:00
parent e3cf7b203c
commit 07746174d4
4 changed files with 39 additions and 18 deletions

View File

@@ -13,19 +13,20 @@ extern NSErrorDomain const AltServerInstallationErrorDomain;
typedef NS_ERROR_ENUM(AltServerErrorDomain, ALTServerError)
{
ALTServerErrorUnknown,
ALTServerErrorConnectionFailed,
ALTServerErrorLostConnection,
ALTServerErrorUnknown = 0,
ALTServerErrorConnectionFailed = 1,
ALTServerErrorLostConnection = 2,
ALTServerErrorDeviceNotFound,
ALTServerErrorDeviceWriteFailed,
ALTServerErrorDeviceNotFound = 3,
ALTServerErrorDeviceWriteFailed = 4,
ALTServerErrorInvalidRequest,
ALTServerErrorInvalidResponse,
ALTServerErrorInvalidRequest = 5,
ALTServerErrorInvalidResponse = 6,
ALTServerErrorInvalidApp,
ALTServerErrorInstallationFailed,
ALTServerErrorMaximumFreeAppLimitReached,
ALTServerErrorInvalidApp = 7,
ALTServerErrorInstallationFailed = 8,
ALTServerErrorMaximumFreeAppLimitReached = 9,
ALTServerErrorUnsupportediOSVersion = 10,
};
NS_ASSUME_NONNULL_BEGIN

View File

@@ -58,6 +58,9 @@ NSErrorDomain const AltServerInstallationErrorDomain = @"com.rileytestut.AltServ
case ALTServerErrorMaximumFreeAppLimitReached:
return NSLocalizedString(@"You have reached the limit of 3 apps per device.", @"");
case ALTServerErrorUnsupportediOSVersion:
return NSLocalizedString(@"Your device must be running iOS 12.2 or later to install AltStore.", @"");
}
}