Commit Graph

826 Commits

Author SHA1 Message Date
Riley Testut
4fc4d6ba39 Conforms AppVersion to AppProtocol 2023-01-24 15:03:09 -06:00
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
701065b073 Parses AppVersion.minOSVersion/maxOSVersion from source JSON
Uses them to implement AppVersion.isSupported.
2023-01-24 15:01:56 -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
324ec7907a [AltServer] Adds “Search FAQ” button to ErrorDetailsViewController 2023-01-24 15:00:26 -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
266ac1ee50 Limits quitting other AltStore processes to database migrations only
Previously, AltStore would quit all other processes when first accessing the database no matter what. However, this unintentionally caused the widget extension to quit the main app after refreshing apps.

Now, we only quit other AltStore processes if a database migration is required. This still prevents multiple AltStores with different database schemas from accessing database concurrently, but also allows extensions to access database without quitting main app.
2023-01-24 14:23:42 -06:00
Riley Testut
a4078159ac [AltServer] Updates app version to 1.6b3 2023-01-24 14:23:42 -06:00
Riley Testut
020fb74a1c Updates app version to 1.6b3 2023-01-24 14:23:42 -06:00
Riley Testut
103fe10123 Fixes incorrect ToastView layout 2023-01-24 14:23:42 -06:00
Riley Testut
7d48f5a7f3 Fixes logging non-ALTServerErrors errors as ALTServerError.underlyingError 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
e2df5a46e6 Changes LoggedError.error from Swift.Error to NSError
LoggedError.error is always an NSError anyways, so we can now avoid redundant casting.
2023-01-24 13:39:44 -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
6cfbe1e0e4 Prevents simultaneous database access from multiple AltStores
AltStore now sends a “WillAccessDatabase” notification before loading the persistent store, which causes other AltStore instances in memory to exit (either immediately, or upon returning to foreground).

This prevents multiple AltStore instances from simultaneously accessing the same database, which could result in corrupted data (especially if they used different database model versions).
2022-09-22 14:16:01 -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
1d598708c3 Updates app version to 1.6b2 2022-09-20 13:23: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
074d4295f3 Fixes “error migrating persistent store” issue
We now set AppVersion.sourceID during migration, which fixes AppVersion entries conflicting across different Sources if multiple contain the same app + version.
2022-09-20 13:12:47 -05:00
Riley Testut
79bb74700a [Apps] Updates AltStore beta to 1.6b1 2022-09-19 13:48:56 -05:00
Riley Testut
6eeb0ca19f [AltWidget] Adds “icon” style lock screen widget 2022-09-14 19:04:36 -07:00
Riley Testut
ddcc7eee61 [AltWidget] Replaces ProgressRing with SwiftUI.Gauge 2022-09-14 19:01:43 -07:00
Riley Testut
e80a49e705 [AltServer] Fixes potential race condition crash when managing connections 2022-09-14 13:11:56 -07:00
Riley Testut
42824744e5 Updates app version to 1.6b1 2022-09-13 15:37:05 -07:00
Riley Testut
b90000ecf3 Resolves AppVersion context-level conflict after migrating from Core Data model v10 2022-09-13 15:31:14 -07:00
Riley Testut
bcea3359ef Migrates Core Data model from v10 to v11 2022-09-13 14:46:03 -07: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
33674397b1 Adds AppVersion Core Data entity
Preserves redundant fields on StoreApp in database model for backwards compatibility.
2022-09-12 15:42:33 -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