Commit Graph

38 Commits

Author SHA1 Message Date
Riley Testut
dd761daed6 [AltServer] Supports enabling JIT on devices running iOS 17
AltServer embeds the AltJIT CLI tool in its app bundle and runs it as an admin subprocess.
2023-09-08 14:15:55 -05:00
Riley Testut
223495cdb9 [AltServer] Throws coder CocoaErrors if source JSON is invalid
Uses same error code with different debug descriptions. These errors should never be thrown in production so no need for unique codes, but if they do get thrown then they include enough technical information to debug.

Replaces OperationError.appNotFound
2023-01-24 15:06:12 -06:00
Riley Testut
4278e7db2b [AltServer] Fixes installation alerts not using device name
As of iOS 16, iOS apps can no longer read the device name. This means devices registered with AltStore (not AltServer) have generic names, so we should prefer using the name of provided ALTDevice rather than the name of device returned from server to ensure it’s correct.
2023-01-24 15:03:09 -06:00
Riley Testut
d5f4f4c625 [AltServer] Removes explicit AltStore download URL 2023-01-24 15:03:09 -06:00
Riley Testut
579885acd6 [AltServer] Downloads latest supported AltStore version for device OS version
Asks user to install latest compatible version instead if latest AltStore version does not support their device’s OS version.
2023-01-24 15:03:09 -06:00
Riley Testut
3b38d725d7 [Shared] Refactors error handling based on ALTLocalizedError protocol (#1115)
* [Shared] Revises ALTLocalizedError protocol

* Refactors errors to conform to revised ALTLocalizedError protocol

* [Missing Commit] Remaining changes for ALTLocalizedError

* [AltServer] Refactors errors to conform to revised ALTLocalizedError protocol

* [Missing Commit] Declares ALTLocalizedTitleErrorKey + ALTLocalizedDescriptionKey

* Updates Objective-C errors to match revised ALTLocalizedError

* [Missing Commit] Unnecessary ALTLocalizedDescription logic

* [Shared] Refactors NSError.withLocalizedFailure to properly support ALTLocalizedError

* [Shared] Supports adding localized titles to errors via NSError.withLocalizedTitle()

* Revises ErrorResponse logic to support arbitrary errors and user info values

* [Missed Commit] Renames CodableServerError to CodableError

* Merges ConnectionError into OperationError

* [Missed Commit] Doesn’t check ALTWrappedError’s userInfo for localizedDescription

* [Missed] Fixes incorrect errorDomain for ALTErrorEnums

* [Missed] Removes nonexistent ALTWrappedError.h

* Includes source file and line number in OperationError.unknown failureReason

* Adds localizedTitle to AppManager operation errors

* Fixes adding localizedTitle + localizedFailure to ALTWrappedError

* Updates ToastView to use error’s localizedTitle as title

* [Shared] Adds NSError.formattedDetailedDescription(with:)

Returns formatted NSAttributedString containing all user info values intended for displaying to the user.

* [Shared] Updates Error.localizedErrorCode to say “code” instead of “error”

* Conforms ALTLocalizedError to CustomStringConvertible

* Adds “View More Details” option to Error Log context menu to view detailed error description

* [Shared] Fixes NSError.formattedDetailedDescription appearing black in dark mode

* [AltServer] Updates error alert to match revised error logic

Uses error’s localizedTitle as alert title.

* [AltServer] Adds “View More Details” button to error alert to view detailed error info

* [AltServer] Renames InstallError to OperationError and conforms to ALTErrorEnum

* [Shared] Removes CodableError support for Date user info values

Not currently used, and we don’t want to accidentally parse a non-Date as a Date in the meantime.

* [Shared] Includes dynamic UserInfoValueProvider values in NSError.formattedDetailedDescription()

* [Shared] Includes source file + line in NSError.formattedDetailedDescription()

Automatically captures source file + line when throwing ALTErrorEnums.

* [Shared] Captures source file + line for unknown errors

* Removes sourceFunction from OperationError

* Adds localizedTitle to AuthenticationViewController errors

* [Shared] Moves nested ALTWrappedError logic to ALTWrappedError initializer

* [AltServer] Removes now-redundant localized failure from JIT errors

All JIT errors now have a localizedTitle which effectively says the same thing.

* Makes OperationError.Code start at 1000

“Connection errors” subsection starts at 1200.

* [Shared] Updates Error domains to revised [Source].[ErrorType] format

* Updates ALTWrappedError.localizedDescription to prioritize using wrapped NSLocalizedDescription as failure reason

* Makes ALTAppleAPIError codes start at 3000

* [AltServer] Adds relevant localizedFailures to ALTDeviceManager.installApplication() errors

* Revises OperationError failureReasons and recovery suggestions

All failure reasons now read correctly when preceded by a failure reason and “because”.

* Revises ALTServerError error messages
All failure reasons now read correctly when preceded by a failure reason and “because”.

* Most failure reasons now read correctly when preceded by a failure reason and “because”.
* ALTServerErrorUnderlyingError forwards all user info provider calls to underlying error.

* Revises error messages for ALTAppleAPIErrorIncorrectCredentials

* [Missed] Removes NSError+AltStore.swift from AltStore target

* [Shared] Updates AltServerErrorDomain to revised [Source].[ErrorType] format

* [Shared] Removes “code” from Error.localizedErrorCode

* [Shared] Makes ALTServerError codes (appear to) start at 2000

We can’t change the actual error codes without breaking backwards compatibility, so instead we just add 2000 whenever we display ALTServerError codes to the user.

* Moves VerificationError.errorFailure to VerifyAppOperation

* Supports custom failure reason for OperationError.unknown

* [Shared] Changes AltServerErrorDomain to “AltServer.ServerError”

* [Shared] Converts ALTWrappedError to Objective-C class

NSError subclasses must be written in ObjC for Swift.Error <-> NSError bridging to work correctly.

# Conflicts:
#	AltStore.xcodeproj/project.pbxproj

* Fixes decoding CodableError nested user info values
2023-01-24 13:56:41 -06:00
Riley Testut
a04a27c1e3 Disables app group feature if app has no app groups
We can’t remove all app groups from an App ID once one has been assigned, but we _can_ disable app groups completely for effectively the same result.

This fixes some apps having permanant access to AltStore’s own app group after being (de-)activated.
2022-03-31 12:50:50 -07:00
Riley Testut
7a547c70e3 [AltServer] Fixes “App Group does not exist” error 2022-03-29 19:51:54 -07:00
Riley Testut
b0abf0e7a5 [AltServer] Replaces lock with semaphore when updating app groups
Locks can’t be unlocked from a separate thread than they were locked on…whoops.
2022-03-29 19:51:17 -07:00
Riley Testut
48c49c6ec7 [AltServer] Embeds ALTServerID in Info.plist if app uses AltKit 2022-03-29 19:34:47 -07:00
Riley Testut
37b00d670b [AltServer] Ignores incompatible cached developer disks
Fixes issue where AltServer would always use cached developer disk, even if it isn’t compatible with the device’s operating system version.
2022-03-01 16:03:03 -08:00
Riley Testut
5231ea1c1e [AltServer] Prefers revoking existing AltStore certificate (if it exists) 2021-10-04 15:51:16 -07:00
Riley Testut
35ae81c76c [AltServer] Fixes duplicate "Revoke Development Certificate" alerts 2021-10-04 15:43:31 -07:00
Riley Testut
a4d7d94301 [AltServer] Fixes not ignoring InstallationError.cancelled when installing app
Allows InstallationError to be bridged back from NSError, which lets us match InstallationError against NSError's via pattern matching.
2021-10-04 15:36:16 -07:00
Cameron Bates
0570f2cd5b [AltServer] Include ALTDeviceID on install of apps (#822)
* Add ALTDeviceID to plist file on install
* Only add if deviceid key is present

Co-authored-by: Cameron Bates <cameronbates@camerons-mbp-2.lan>
2021-09-13 14:11:53 -07:00
Riley Testut
558a3fc865 [AltServer] Improves error messages 2021-06-04 14:57:32 -07:00
Riley Testut
8857ccbf86 [AltServer] Installs Developer disk image before installing AltStore
Allows AltServer to programmatically initiate a debug session with AltStore, which can be used to start a background refresh or enable JIT on demand.

[AltServer] Renames ALTDevice variable name
2021-06-04 14:56:27 -07:00
Riley Testut
95eeafa06b [AltServer] Fixes missing embedded certificate when using cached certificate 2020-12-17 14:45:03 -06:00
Riley Testut
915eed3a69 [AltServer] Prefers paid developer teams over free teams 2020-12-03 16:06:04 -06:00
Riley Testut
f7a2c9f9f0 [AltServer] Supports multiple devices with same Apple ID
AltServer now caches certificates for each Apple ID used to install AltStore, and will re-use them for future installations rather than revoke + create new ones each time (if possible).
2020-12-03 16:06:04 -06:00
Riley Testut
1ce9731465 [AltServer] Supports sideloading apps to Apple TV 2020-12-03 16:06:04 -06:00
Riley Testut
bb3b039672 [AltServer] Supports sideloading .ipa files directly to iOS devices 2020-11-11 17:40:28 -08:00
Riley Testut
fb3946aad5 [AltServer] Supports installing apps with app extensions 2020-10-15 11:37:58 -07:00
Riley Testut
7262a6a1a0 [AltServer] Uses actual app bundle ID when installing app 2020-07-24 12:21:42 -07:00
Riley Testut
f564fc5190 [AltServer] Supports app groups when installing AltStore
Necessary for (de-)activation to work as expected in AltStore 1.3.4.
2020-05-19 18:30:53 -07:00
Riley Testut
06fed802b1 [AltServer] Manages active/inactive profiles when installing apps 2020-03-11 13:51:39 -07:00
Riley Testut
345862c770 [AltServer] Fixes session expiring when downloading apps on slow connection 2020-01-16 16:00:35 -08:00
Riley Testut
438fc7cfa0 [AltServer] Uses GrandSlam Authentication
Uses Mail.app plug-in to retrieve the computer’s anisette data, which is necessary for GSA.
2019-11-18 14:17:57 -08:00
Riley Testut
3ba1669e51 [AltServer] Adds STAGING flag to conditionally download Delta version 2019-11-13 11:35:37 -08:00
Riley Testut
1bde885b17 [AltServer] Embeds encrypted certificate in AltStore app bundle 2019-10-28 12:53:56 -07:00
Riley Testut
1d740500f7 Updates AltSign 2019-09-30 13:59:17 -07:00
Riley Testut
7fc822948c [AltServer] Displays warning about revoking certificates when using developer Apple ID 2019-09-27 14:29:23 -07:00
Riley Testut
997376938a [AltServer] Updates AltStore download URL 2019-09-19 22:25:07 -07:00
Riley Testut
e6fc491f6a [AltServer] Shows alert when installing AltStore onto second device 2019-09-14 11:29:34 -07:00
Riley Testut
7536b09c4a [AltServer] Deletes downloaded AltStore.ipa after installing to device 2019-09-13 14:48:12 -07:00
Riley Testut
deff48f9c3 [AltServer] Prefer free/individual teams over organization teams 2019-09-13 14:26:21 -07:00
Riley Testut
a1c9049b4b [AltServer] Advertises unique server ID + writes to AltStore Info.plist
AltServer adds its own server ID to AltStore’s Info.plist when resigning. This allows AltStore to prefer the server it was installed with.
2019-08-01 10:45:54 -07:00
Riley Testut
b795b6a0aa [AltServer] Turns AltServer into menu bar app 2019-07-01 15:19:22 -07:00