[AltServer] Adds ALTDebugConnection to “debug” sideloaded apps

Allows AltServer to programmatically enable JIT execution in sideloaded apps.
This commit is contained in:
Riley Testut
2021-05-20 14:16:05 -07:00
parent 8857ccbf86
commit 52fe74fbea
8 changed files with 341 additions and 0 deletions

View File

@@ -46,6 +46,8 @@ typedef NS_ERROR_ENUM(AltServerErrorDomain, ALTServerError)
ALTServerErrorProfileNotFound = 15,
ALTServerErrorAppDeletionFailed = 16,
ALTServerErrorRequestedAppNotRunning = 100,
};
typedef NS_ERROR_ENUM(AltServerConnectionErrorDomain, ALTServerConnectionError)

View File

@@ -124,6 +124,13 @@ NSErrorUserInfoKey const ALTDeviceNameErrorKey = @"deviceName";
case ALTServerErrorAppDeletionFailed:
return NSLocalizedString(@"An error occured while removing the app.", @"");
case ALTServerErrorRequestedAppNotRunning:
{
NSString *appName = self.userInfo[ALTAppNameErrorKey] ?: NSLocalizedString(@"The requested app", @"");
NSString *deviceName = self.userInfo[ALTDeviceNameErrorKey] ?: NSLocalizedString(@"the device", @"");
return [NSString stringWithFormat:NSLocalizedString(@"%@ is not currently running on %@.", ""), appName, deviceName];
}
}
}
@@ -141,6 +148,12 @@ NSErrorUserInfoKey const ALTDeviceNameErrorKey = @"deviceName";
case ALTServerErrorMaximumFreeAppLimitReached:
return NSLocalizedString(@"Make sure “Offload Unused Apps” is disabled in Settings > iTunes & App Stores, then install or delete all offloaded apps.", @"");
case ALTServerErrorRequestedAppNotRunning:
{
NSString *deviceName = self.userInfo[ALTDeviceNameErrorKey] ?: NSLocalizedString(@"your device", @"");
return [NSString stringWithFormat:NSLocalizedString(@"Make sure the app is running in the foreground on %@ then try again.", @""), deviceName];
}
default:
return nil;
}