mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Merge branch 'rileytestut:develop' into develop
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
{
|
||||
_device = [device copy];
|
||||
_connection = connection;
|
||||
|
||||
self.connected = YES;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
@@ -144,5 +144,10 @@ private extension WirelessConnectionHandler
|
||||
connection.disconnect()
|
||||
|
||||
self.disconnectionHandler?(connection)
|
||||
|
||||
if let networkConnection = connection as? NetworkConnection
|
||||
{
|
||||
networkConnection.nwConnection.stateUpdateHandler = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1199,28 +1199,35 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
|
||||
return finish([NSError errorWithMobileImageMounterError:err device:altDevice]);
|
||||
}
|
||||
|
||||
if (result)
|
||||
plist_t errorDescriptionNode = plist_dict_get_item(result, "DetailedError");
|
||||
if (errorDescriptionNode != NULL)
|
||||
{
|
||||
char *errorDescription = NULL;
|
||||
plist_get_string_val(errorDescriptionNode, &errorDescription);
|
||||
|
||||
NSString *nsErrorDescription = @(errorDescription);
|
||||
plist_free(result);
|
||||
}
|
||||
|
||||
// Verify the installed developer disk is compatible with altDevice's operating system version.
|
||||
ALTDebugConnection *testConnection = [[ALTDebugConnection alloc] initWithDevice:altDevice];
|
||||
[testConnection connectWithCompletionHandler:^(BOOL success, NSError * _Nullable error) {
|
||||
[testConnection disconnect];
|
||||
NSError *returnError = nil;
|
||||
|
||||
if (success)
|
||||
if ([nsErrorDescription containsString:@"Failed to verify"])
|
||||
{
|
||||
// Connection succeeded, so we assume the developer disk is compatible.
|
||||
finish(nil);
|
||||
// iOS device needs to be rebooted in order to mount disk to /Developer.
|
||||
NSString *recoverySuggestion = [NSString stringWithFormat:NSLocalizedString(@"Please reboot %@ and try again.", @""), altDevice.name];
|
||||
|
||||
// ALTServerErrorUnderlyingError uses its underlying error's failure reason as its error description (if one exists),
|
||||
// so assign our recovery suggestion to NSLocalizedFailureReasonErrorKey to make sure it's always displayed on client.
|
||||
NSError *underlyingError = [NSError errorWithDomain:AltServerConnectionErrorDomain code:ALTServerConnectionErrorUnknown userInfo:@{NSLocalizedFailureReasonErrorKey: recoverySuggestion}];
|
||||
|
||||
returnError = [NSError errorWithDomain:AltServerErrorDomain code:ALTServerErrorUnderlyingError userInfo:@{NSUnderlyingErrorKey: underlyingError}];
|
||||
}
|
||||
else if ([error.domain isEqualToString:AltServerConnectionErrorDomain] && error.code == ALTServerConnectionErrorUnknown)
|
||||
else
|
||||
{
|
||||
// Connection failed with .unknown error code, so we assume the developer disk is NOT compatible.
|
||||
// Installation failed, so we assume the developer disk is NOT compatible with this iOS version.
|
||||
|
||||
NSMutableDictionary *userInfo = [@{
|
||||
ALTOperatingSystemVersionErrorKey: NSStringFromOperatingSystemVersion(altDevice.osVersion),
|
||||
NSFilePathErrorKey: diskURL.path,
|
||||
NSUnderlyingErrorKey: error,
|
||||
} mutableCopy];
|
||||
|
||||
NSString *osName = ALTOperatingSystemNameForDeviceType(altDevice.type);
|
||||
@@ -1229,8 +1236,22 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT
|
||||
userInfo[ALTOperatingSystemNameErrorKey] = osName;
|
||||
}
|
||||
|
||||
NSError *returnError = [NSError errorWithDomain:AltServerErrorDomain code:ALTServerErrorIncompatibleDeveloperDisk userInfo:userInfo];
|
||||
finish(returnError);
|
||||
returnError = [NSError errorWithDomain:AltServerErrorDomain code:ALTServerErrorIncompatibleDeveloperDisk userInfo:userInfo];
|
||||
}
|
||||
|
||||
return finish(returnError);
|
||||
}
|
||||
|
||||
plist_free(result);
|
||||
|
||||
// Verify that the developer disk has been successfully installed.
|
||||
ALTDebugConnection *testConnection = [[ALTDebugConnection alloc] initWithDevice:altDevice];
|
||||
[testConnection connectWithCompletionHandler:^(BOOL success, NSError * _Nullable error) {
|
||||
[testConnection disconnect];
|
||||
|
||||
if (success)
|
||||
{
|
||||
finish(nil);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -66,10 +66,11 @@ class PluginManager
|
||||
do
|
||||
{
|
||||
// If Mail plug-in is not yet installed, then there is no update available.
|
||||
guard let bundle = Bundle(url: pluginURL) else { return completionHandler(.success(false)) }
|
||||
var isDirectory: ObjCBool = false
|
||||
guard FileManager.default.fileExists(atPath: pluginURL.path, isDirectory: &isDirectory), isDirectory.boolValue else { return completionHandler(.success(false)) }
|
||||
|
||||
// Load Info.plist from disk because Bundle.infoDictionary is cached by system.
|
||||
let infoDictionaryURL = bundle.bundleURL.appendingPathComponent("Contents/Info.plist")
|
||||
let infoDictionaryURL = pluginURL.appendingPathComponent("Contents/Info.plist")
|
||||
guard let infoDictionary = NSDictionary(contentsOf: infoDictionaryURL) as? [String: Any],
|
||||
let localVersion = infoDictionary["CFBundleShortVersionString"] as? String
|
||||
else { throw CocoaError(.fileReadCorruptFile, userInfo: [NSURLErrorKey: infoDictionaryURL]) }
|
||||
|
||||
@@ -2814,7 +2814,7 @@
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 65;
|
||||
CURRENT_PROJECT_VERSION = 66;
|
||||
DEVELOPMENT_TEAM = 6XVY5G3U44;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -2847,7 +2847,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14.4;
|
||||
MARKETING_VERSION = 1.5;
|
||||
MARKETING_VERSION = 1.5.1b;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.AltServer;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
@@ -2867,7 +2867,7 @@
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 65;
|
||||
CURRENT_PROJECT_VERSION = 66;
|
||||
DEVELOPMENT_TEAM = 6XVY5G3U44;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -2900,7 +2900,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.14.4;
|
||||
MARKETING_VERSION = 1.5;
|
||||
MARKETING_VERSION = 1.5.1b;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.AltServer;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
@@ -3371,8 +3371,8 @@
|
||||
"$(PROJECT_DIR)/Dependencies/fragmentzip",
|
||||
"$(PROJECT_DIR)/Dependencies/libcurl",
|
||||
);
|
||||
MARKETING_VERSION = 1.5;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.AltStore;
|
||||
MARKETING_VERSION = 1.5.1b;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "AltStore/AltStore-Bridging-Header.h";
|
||||
@@ -3405,8 +3405,8 @@
|
||||
"$(PROJECT_DIR)/Dependencies/fragmentzip",
|
||||
"$(PROJECT_DIR)/Dependencies/libcurl",
|
||||
);
|
||||
MARKETING_VERSION = 1.5;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.AltStore;
|
||||
MARKETING_VERSION = 1.5.1b;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "AltStore/AltStore-Bridging-Header.h";
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<key>ALTDeviceID</key>
|
||||
<string>00008110-000A68390A82801E</string>
|
||||
<key>ALTServerID</key>
|
||||
<string>1AAAB6FD-E8CE-4B70-8F26-4073215C03B0</string>
|
||||
<string>1F7D5B55-79CE-4546-A029-D4DDC4AF3B6D</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
|
||||
@@ -49,6 +49,7 @@ class AuthenticationOperation: ResultOperation<(ALTTeam, ALTCertificate, ALTAppl
|
||||
|
||||
private lazy var storyboard = UIStoryboard(name: "Authentication", bundle: nil)
|
||||
|
||||
private var appleIDEmailAddress: String?
|
||||
private var appleIDPassword: String?
|
||||
private var shouldShowInstructions = false
|
||||
|
||||
@@ -174,6 +175,13 @@ class AuthenticationOperation: ResultOperation<(ALTTeam, ALTCertificate, ALTAppl
|
||||
}
|
||||
|
||||
account.update(account: altTeam.account)
|
||||
|
||||
if let providedEmailAddress = self.appleIDEmailAddress
|
||||
{
|
||||
// Save the user's provided email address instead of the one associated with their account (which may be outdated).
|
||||
account.appleID = providedEmailAddress
|
||||
}
|
||||
|
||||
team.update(team: altTeam)
|
||||
|
||||
try context.save()
|
||||
@@ -242,7 +250,7 @@ class AuthenticationOperation: ResultOperation<(ALTTeam, ALTCertificate, ALTAppl
|
||||
try context.save()
|
||||
|
||||
// Update keychain
|
||||
Keychain.shared.appleIDEmailAddress = altTeam.account.appleID
|
||||
Keychain.shared.appleIDEmailAddress = self.appleIDEmailAddress ?? altTeam.account.appleID // Prefer the user's provided email address over the one associated with their account (which may be outdated).
|
||||
Keychain.shared.appleIDPassword = self.appleIDPassword
|
||||
|
||||
Keychain.shared.signingCertificate = altCertificate.p12Data()
|
||||
@@ -359,6 +367,8 @@ private extension AuthenticationOperation
|
||||
|
||||
func authenticate(appleID: String, password: String, completionHandler: @escaping (Result<(ALTAccount, ALTAppleAPISession), Swift.Error>) -> Void)
|
||||
{
|
||||
self.appleIDEmailAddress = appleID
|
||||
|
||||
let fetchAnisetteDataOperation = FetchAnisetteDataOperation(context: self.context)
|
||||
fetchAnisetteDataOperation.resultHandler = { (result) in
|
||||
switch result
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
"bundleIdentifier": "com.rileytestut.AltStore.Beta",
|
||||
"developerName": "Riley Testut",
|
||||
"subtitle": "An alternative App Store for iOS.",
|
||||
"version": "1.5rc",
|
||||
"versionDate": "2022-04-19T13:00:00-07:00",
|
||||
"versionDescription": "**AltStore 1.5 Release Candidate**\n\nTRUSTED SOURCES*\nTrusted Sources are sources that we've personally reviewed to make sure they meet our safety standards. You can view all Trusted Sources from the Sources page and add them with a single tap.\n\nIMPROVEMENTS\n• Loads “Friend Tier” Patrons much faster on Patreon screen.\n\n*Adding “untrusted” sources via the + button is still supported.",
|
||||
"downloadURL": "https://cdn.altstore.io/file/altstore/apps/altstore/1_5_rc.ipa",
|
||||
"version": "1.5.1b",
|
||||
"versionDate": "2022-05-27T12:00:00-07:00",
|
||||
"versionDescription": "This beta fixes the following issues:\n\n• Using Apple IDs that contain capital letters\n• Using Apple IDs with 2FA enabled without any trusted devices\n• Repeatedly asking some users to sign in every refresh\n• \"Incorrect Apple ID or password\" error after changing Apple ID email address\n• “Application is missing application-identifier” error when sideloading or (de-)activating certain apps",
|
||||
"downloadURL": "https://cdn.altstore.io/file/altstore/apps/altstore/1_5_1_b.ipa",
|
||||
"localizedDescription": "AltStore is an alternative app store for non-jailbroken devices. \n\nThis beta release of AltStore adds support for 3rd party sources, allowing you to download apps from other developers directly through AltStore.",
|
||||
"iconURL": "https://user-images.githubusercontent.com/705880/65270980-1eb96f80-dad1-11e9-9367-78ccd25ceb02.png",
|
||||
"tintColor": "018084",
|
||||
"size": 5458029,
|
||||
"size": 5464776,
|
||||
"beta": true,
|
||||
"screenshotURLs": [
|
||||
"https://user-images.githubusercontent.com/705880/78942028-acf54300-7a6d-11ea-821c-5bb7a9b3e73a.PNG",
|
||||
|
||||
2
Dependencies/AltSign
vendored
2
Dependencies/AltSign
vendored
Submodule Dependencies/AltSign updated: b1116d5dc6...3d6fbeac25
@@ -145,6 +145,8 @@ NSErrorUserInfoKey const ALTOperatingSystemVersionErrorKey = @"ALTOperatingSyste
|
||||
return failureReason;
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (nullable NSString *)altserver_localizedRecoverySuggestion
|
||||
|
||||
Reference in New Issue
Block a user