Commit Graph

484 Commits

Author SHA1 Message Date
Riley Testut
ac8fb8851f Supports optional @Managed properties 2023-01-24 15:03:09 -06:00
Riley Testut
b181b2e7a4 Supports non-NSManagedObjects for @Managed properties
This allows us to use @Managed with properties that may or may not be NSManagedObjects at runtime (e.g. protocols). If they are, Managed will keep strong reference to context like before.
2023-01-24 15:03:09 -06:00
Riley Testut
8609209821 Conforms OperatingSystemVersion to Comparable
# Conflicts:
#	AltStore.xcodeproj/project.pbxproj
2023-01-24 15:01:42 -06:00
Riley Testut
7ea1ad5af0 Replaces StoreApp.latestVersion with latestSupportedVersion + latestAvailableVersion
We now store the latest supported version as a relationship on StoreApp, rather than the latest available version. This allows us to reference the latest supported version in predicates and sort descriptors.

However, we kept the underlying Core Data property name the same to avoid extra migration.
2023-01-24 15:00:31 -06:00
Riley Testut
cf9d577050 [Apps] Updates Delta beta to 1.4b4 2023-01-24 14:39:42 -06:00
Riley Testut
9f91db9642 Skips logging OperationError.cancelled errors 2023-01-24 14:23:42 -06:00
Riley Testut
f445467598 [Apps] Updates AltStore beta to 1.6b3 2023-01-24 14:23:42 -06:00
Riley Testut
1ce7681a31 Fixes typo when printing MyAppsViewController.deactivate() error 2023-01-24 14:23:42 -06:00
Riley Testut
d8a7f8cb54 Fixes incorrect AuthenticationViewController ToastView color 2023-01-24 14:23:42 -06:00
Riley Testut
ce68ea74ad Fixes Error Log not showing UIAlertController on iOS 13 or earlier 2023-01-24 14:23:42 -06:00
Riley Testut
fede5b29cb Fixes Error Log showing UIAlertController on iOS 14 or later
A context menu should appear instead on iOS 14 or later.
2023-01-24 14:23:42 -06:00
Riley Testut
4ef94d22e4 Fixes incorrect “Search FAQ” URL in Error Log 2023-01-24 14:23:42 -06:00
Riley Testut
41db3e42ce Fixes Error Log context menu appearing while scrolling table view 2023-01-24 14:23:42 -06:00
Riley Testut
915dd83015 Fixes Error Log context menu covering cell content 2023-01-24 14:23:42 -06:00
Riley Testut
42d433a11d Opens Error Log upon tapping ToastView showing logged error 2023-01-24 14:23:42 -06:00
Riley Testut
17f28439fe Includes “Enable JIT” errors in Error Log 2023-01-24 14:07:30 -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
0c4fe98370 Adds ResultOperation.localizedFailure
Allows ResultOperations to provide default localized failures for errors that don’t have their own localized failure.
2023-01-24 13:42:55 -06:00
Riley Testut
7aed564d73 [Apps] Updates Delta beta to 1.4b3 2023-01-24 13:33:17 -06:00
Riley Testut
29382b4170 [Apps] Updates Delta to 1.3.2 2023-01-24 13:33:04 -06:00
Riley Testut
61086e8b1d Displays “TODAY” as section header for logged errors that occured that day 2022-09-27 15:41:41 -05:00
Riley Testut
8896cd835c Fixes widgets potentially not updating after refreshing apps 2022-09-22 13:53:51 -05:00
Riley Testut
c8f3c6515d Always displays PatreonViewController loading indicator when fetching patrons
Previously, we only showed the loading indicator if user had not yet cached any Friend Zone patrons.
2022-09-21 17:31:23 -05:00
Riley Testut
81b079650c Fixes ErrorLogViewController’s dark mode appearance 2022-09-21 16:03:34 -05:00
Riley Testut
b2ad3e7f4c [Apps] Updates AltStore beta to 1.6b2 2022-09-21 15:18:04 -05:00
Riley Testut
d5beb0758b Updates LaunchViewController error alert to include more detail
Uses debugDescription over localizedDescription, because that makes it significantly easier to debug the underlying problem from a screenshot.
2022-09-20 13:19:17 -05:00
Riley Testut
79bb74700a [Apps] Updates AltStore beta to 1.6b1 2022-09-19 13:48:56 -05:00
Riley Testut
46cd2be37d Supports new “versions” key in source JSON
Allows sources to list multiple versions of an app.

Preserves backwards compatibility by assigning legacy version values when assigning AppVersions.
2022-09-12 17:07:15 -07:00
Riley Testut
b8e136005a Automatically purges LoggedErrors older than one month
Occurs whenever app enters background.
2022-09-09 17:48:42 -05:00
Riley Testut
6ec47bbe0c Adds Error Log screen
Allows users to view a history of all errors that occured when performing app operations.
2022-09-09 17:44:15 -05:00
Riley Testut
6d081c2bbb Fixes CollapsingTextView incorrectly showing More button 2022-09-09 16:03:24 -05:00
Riley Testut
c232ef5044 Makes AppProtocol.url optional
Allows us to create AnyApp values without a valid file URL.
2022-09-08 15:59:24 -05:00
Riley Testut
be80aa1512 [Apps] Updates Delta beta to 1.4b2 2022-08-17 15:27:19 -05:00
Riley Testut
c1d64a8027 Fixes “stored properties cannot be marked @available” compiler error
Xcode 13 and earlier allowed us to mark lazy stored properties with @available, but it turns out this was never actually supported. Xcode 14 now throws a compiler error, so we work around it by converting lazy @available properties into computed properties, backed by typed-erased lazy ivars.
2022-08-17 15:23:17 -05:00
Riley Testut
1bc2aa9d38 [Apps] Adds “New to AltStore?” news to highlight revamped FAQ
Also removes old “Welcome to AltStore” news
2022-07-28 11:41:52 -05:00
Riley Testut
e167ee104b [Apps] Updates AltStore to 1.5.1 2022-07-28 11:22:55 -05:00
Riley Testut
cc3feb4843 [Apps] Updates Delta beta to 1.4b1 2022-06-02 14:01:04 -07:00
Riley Testut
71b1885f74 [Apps] Updates AltStore beta to 1.5.1b 2022-05-27 12:36:43 -07:00
Riley Testut
2f92ce6bda Updates ALTServerID to Purple M1 iMac 2022-05-26 18:26:35 -07:00
Riley Testut
9c1fe4d63b Fixes authenticating with old email address after changing Apple ID’s primary email 2022-05-25 16:45:27 -07:00
Riley Testut
14529030be [Apps] Updates AltStore to 1.5 2022-05-10 15:05:34 -07:00
Riley Testut
cdb5fb34dd [Apps] Adds AltServer 1.5 news item 2022-05-05 14:03:34 -07:00
Riley Testut
ae3c0acfc0 Enables AltJIT for public versions 2022-05-04 12:46:14 -07:00
Riley Testut
b7a99ed508 [Apps] Updates AltStore beta to 1.5rc 2022-04-19 13:20:40 -07:00
Riley Testut
dfd49de8d1 Replaces PatreonAccount.isFriendZone with ManagedPatron
Rather than store both the current user’s Patreon account and all cached Friend Zone patrons in the same table, we now store Friend Zone patrons in the new ManagedPatron table. This avoids the need to distinguish between the two at runtime.
2022-04-18 15:46:35 -07:00
Riley Testut
751d9419ff Throws URLError.fileDoesNotExist for 404 responses 2022-04-14 18:29:34 -07:00
Riley Testut
643d7bf6fa Updates ALTDeviceID to iPhone 13 Pro 2022-04-14 18:15:23 -07:00
Riley Testut
afb20f79a9 Unhides Sources button for public builds 2022-04-14 18:01:20 -07:00
Riley Testut
6c2a83964b Updates Keychain.patreonCreatorAccessToken via UpdatePatronsOperation 2022-04-14 17:58:06 -07:00
Riley Testut
07daff261a Caches Friend Zone patrons to offset slow loading time
The Patreon API doesn’t have a way to fetch just the patrons belonging to our Friend Zone tier. Instead, we need to fetch ALL patrons (including inactive ones) and filter out those not in the tier. This is very inefficient, and takes over a minute to complete as of April 14, 2022, due to the number of patrons we have.

We can’t do much to change this, but AltStore will now at least cache the fetched patrons with Core Data. Additionally, AltStore will only perform this long fetch whenever the Friend Zone list actually changes, rather than every time the Patreon screen appears.
2022-04-14 17:56:36 -07:00