Commit Graph

258 Commits

Author SHA1 Message Date
Riley Testut
8add1d0f4a Supports remotely disabling workaround for downloading Patreon attachments
In case our workaround for downloading Patreon post attachments breaks, we can remotely disable it and force AltStore to use its fallback instead (taking user to post directly).
2024-12-26 21:15:29 +05:30
Riley Testut
ba94886ba9 Supports downloading apps from locked Patreon posts
Uses cached Patreon session cookies to access post attachments despite no official API support.
2024-12-26 21:15:29 +05:30
Riley Testut
7e232cafbe [AltStoreCore] Adds AppProtocol.storeApp
Simplifies retrieving the associated StoreApp for an app.
2024-12-26 21:15:29 +05:30
Riley Testut
91ea34110b Verifies StoreApp.isPledged status when updating source 2024-12-26 21:15:29 +05:30
Riley Testut
a49e16f591 Supports both iPhone + iPad screenshots
Prefers showing screenshots for current device, but falls back to all screenshots if there are no relevant ones.
2024-12-26 21:15:29 +05:30
Riley Testut
21b2a869a1 [Shared] Includes CodingPath in Source errors’ debug description (if available) 2024-12-26 21:15:29 +05:30
Riley Testut
34c503da4b Revises appPermissions JSON format
• Split into `entitlements` and `privacy` sections
• `entitlements` is an array of entitlement keys
• `privacy` is a dictionary mapping UsageDescription keys to their descriptions
2024-12-26 21:15:29 +05:30
Riley Testut
98125e93aa Adds AddSourceViewController to add sources by URL or from list of recommended sources 2024-12-26 21:15:29 +05:30
Riley Testut
d53e36633d [AltStoreCore] Adds Source.isRecommended
Also replaces legacy “Trusted Sources” references with “Recommended Sources”
2024-12-26 21:15:29 +05:30
Riley Testut
2ccf01cf9c Logs misc. events with OSLog
* Discovering AltServers
* Clearing app cache
* Updating Friend Zone Patrons
2024-12-26 21:15:29 +05:30
Riley Testut
27ca2f285b Logs Fugu14-related events with OSLog 2024-12-26 21:15:29 +05:30
Riley Testut
93b6da4855 Logs sideloading-related events with OSLog 2024-12-26 21:15:29 +05:30
Riley Testut
a1865b6725 Fixes not showing “AltServer Not Found” error when refreshing via widget 2024-12-26 21:15:29 +05:30
Riley Testut
7747994c80 Converts legacy RefreshAllIntent into App Shortcut (iOS 17+) 2024-12-26 21:15:29 +05:30
Riley Testut
9b885085c9 Fixes race condition causing duplicate background refresh notifications (or none) 2024-12-26 21:15:29 +05:30
Riley Testut
86ae06e0c8 Adds “Disable Response Caching” debug setting
When enabled, AltStore will ignore cached responses for certain requests and will always make a new request to the server. This is useful for development when repeatedly testing changes to remote files.

Limited to UpdateKnownSourcesOperation for now, but will eventually affect fetching sources as well.
2024-12-26 21:15:29 +05:30
Riley Testut
7f9ee81150 Refactors app version comparison logic to always include buildVersion
Before, whether or not the source included the buildVersion affected the comparison. If present, the buildVersion was used in comparison, if not, only the version itself was used for comparsion.

This meant it was impossible to update from a version with a buildVersion to the same version without one (e.g. going from betas to final releases). Now we _always_ consider the buildVersion in the comparsion, so an earlier entry in versions array without buildVersion can be considered “newer” even if versions match.
2024-12-26 21:15:29 +05:30
Riley Testut
4f6eaf1aac Fixes incorrectly handling misc. CancellationErrors 2024-12-26 21:15:29 +05:30
Riley Testut
99db3dc086 Removes support for “background mode” permissions 2024-12-26 21:15:29 +05:30
Riley Testut
038efd9f9e Temporarily disables verifying added permissions
We’ll re-enable once we finish the “Review Permissions” screen.
2024-12-26 21:15:29 +05:30
Riley Testut
8c85290c74 Includes more detailed info in VerificationError.addedPermission error messages
* New version
* Previous version
* Added permissions
2024-12-26 21:15:29 +05:30
Riley Testut
2afaf73fc5 Supports bypassing “Undeclared Permissions” error while sources are in beta
Presents error alert that can be explicitly bypassed by user when sideloading apps with undeclared permissions, and also allows user to view all undeclared permissions.
2024-12-26 21:15:29 +05:30
Riley Testut
07bc34ae7a Verifies downloaded app’s build version matches source (if provided) 2024-12-26 21:15:29 +05:30
Riley Testut
f7640e35d1 Supports app versions with explicit build versions
AltStore will now consider an update available if either:

* The source’s marketing version doesn’t match installed app’s version
* The source declares a build version AND it doesn’t match the install app’s build version

The installed app matches an app version if both maketing versions match, and the build versions match (if provided by the source).
2024-12-26 21:15:29 +05:30
Riley Testut
5a2f32704c Updates SourceError.blocked recovery suggestion to list installed/blocked apps
If source is already added, the error message will list all installed apps from the source.

If adding source for first time, the error message will mention exactly which apps have been blocked from the source (if provided).
2024-12-26 21:15:29 +05:30
Riley Testut
bec6ca9eec Removes unused verificationHandler property from VerifyAppOperation 2024-12-26 21:15:29 +05:30
Riley Testut
254a9773ec Supports blocking third-party sources
Blocked sources cannot be added by new users, or updated for existing users.
2024-12-26 21:15:29 +05:30
Riley Testut
b9dd6432a1 Moves SourceError to its own source file 2024-12-26 21:15:29 +05:30
Riley Testut
d89c0f3e36 Verifies all privacy + background mode permissions have usage descriptions 2024-12-26 21:15:29 +05:30
Riley Testut
fd89f35246 Verifies app updates have same permissions as previously installed versions 2024-12-26 21:15:29 +05:30
Riley Testut
ee410605e8 Verifies downloaded app’s permissions match source
Renames source JSON permissions key to “appPermissions” in order to preserve backwards compatibility, since we’ve changed the schema for permissions.
2024-12-26 21:15:29 +05:30
Riley Testut
f884d72a8b Verifies source’s identifier doesn’t match existing sources when adding 2024-12-26 21:15:29 +05:30
Riley Testut
bd3beb5983 Verifies source’s identifier doesn’t change after refreshing 2024-12-26 21:15:29 +05:30
Riley Testut
44e08b2d66 Verifies downloaded app’s version matches source 2024-12-26 21:15:29 +05:30
Riley Testut
d560e14423 Replaces OperationError.cancelled with CancellationError
Keeps `OperationError.cancelled` around for source-compatibility, but now returns CancellationError() instead of OperationError.
2024-12-26 21:15:29 +05:30
Riley Testut
7dfbba9b00 Verifies downloaded app’s SHA-256 checksum (if specified) 2024-12-26 21:15:29 +05:30
Riley Testut
7ad8db7bdc Moves VerificationError to its own source file 2024-12-26 21:15:29 +05:30
Riley Testut
64a9281e6e Removes Psychic Paper support from VerifyAppOperation 2024-12-26 21:15:29 +05:30
Riley Testut
23b6623020 Defines explicit error codes for OperationError.Code cases 2024-12-26 21:15:29 +05:30
Riley Testut
82cacb1b51 Supports adding/removing source from SourceDetailViewController 2024-12-26 21:15:29 +05:30
Riley Testut
404bd1450b Fixes error fetching Friend Zone patrons due to unexpected nil name 2024-12-26 21:15:29 +05:30
Riley Testut
06d28ca663 Removes unnecessary @available annotations 2024-12-26 21:15:29 +05:30
Riley Testut
ed1365281f Removes unnecessary #available checks 2024-12-26 21:15:29 +05:30
Riley Testut
2cfc307359 Adds “Clear Cache” button to remove temporary files and uninstalled app backups 2024-12-26 21:15:29 +05:30
Riley Testut
5da3974795 Fixes non-readable error toast view when an authentication error occurs 2024-12-26 21:15:29 +05:30
Riley Testut
8fcc5622e1 Fixes “missing provisioning profile” error when refreshing DEBUG builds
Removes embedded XCTest (+ dSYM) bundles before resigning for DEBUG builds.
2024-12-26 21:15:29 +05:30
Riley Testut
6c7223b991 Updates VerificationError.errorDescription to match ALTLocalizedError default implementation 2024-12-26 21:15:29 +05:30
Riley Testut
881091595c Verifies Sources don’t contain duplicate app versions 2024-12-26 21:15:29 +05:30
Riley Testut
2017584da4 Verifies Sources don’t contain duplicate bundle IDs
AltStore assumes all apps have unique bundle IDs per source. Weird bugs can occur when this is not the case (such as merging multiple store listings into one), so we now verify upfront whether source contains duplicate bundle IDs before saving.
2024-12-26 21:15:29 +05:30
Riley Testut
35561336c6 Fixes delay updating UI after cancelling installing app 2024-12-26 21:15:29 +05:30