Commit Graph

184 Commits

Author SHA1 Message Date
Riley Testut
a20950b693 Fixes showing Patreon page when installing non-Patreon apps 2023-12-01 16:50:48 -06:00
Riley Testut
2377ada199 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).
2023-12-01 16:50:48 -06:00
Riley Testut
bd0220ea35 Supports downloading apps from locked Patreon posts
Uses cached Patreon session cookies to access post attachments despite no official API support.
2023-12-01 16:50:48 -06:00
Riley Testut
45da6b626f [AltStoreCore] Adds AppProtocol.storeApp
Simplifies retrieving the associated StoreApp for an app.
2023-12-01 16:49:56 -06:00
Riley Testut
a1038d8850 Verifies StoreApp.isPledged status when updating source 2023-12-01 16:49:56 -06:00
Riley Testut
a6bc4b5d5f Merge branch 'revised_source_json'
# Conflicts:
#	AltStore.xcodeproj/project.pbxproj
#	AltStore/App Detail/AppContentViewController.swift
#	AltStore/App Detail/AppViewController.swift
#	AltStore/Base.lproj/Main.storyboard
#	AltStoreCore/Model/DatabaseManager.swift
2023-10-19 16:43:50 -05:00
Riley Testut
cd67222237 Supports both iPhone + iPad screenshots
Prefers showing screenshots for current device, but falls back to all screenshots if there are no relevant ones.
2023-10-19 16:24:56 -05:00
Riley Testut
3656bf165b Merge branch 'sources_tab'
# Conflicts:
#	AltStore.xcodeproj/project.pbxproj
2023-10-19 14:18:43 -05:00
Riley Testut
0659d83afb Adds AddSourceViewController to add sources by URL or from list of recommended sources 2023-10-18 18:56:40 -05:00
Riley Testut
a092c99b84 Logs misc. events with OSLog
* Discovering AltServers
* Clearing app cache
* Updating Friend Zone Patrons
2023-10-18 14:28:36 -05:00
Riley Testut
82d4e4d4d8 Logs AltJIT-related events with OSLog 2023-10-18 14:28:36 -05:00
Riley Testut
bf0a5b9e2d Logs Fugu14-related events with OSLog 2023-10-18 14:28:17 -05:00
Riley Testut
2133b6240d Logs sideloading-related events with OSLog 2023-10-18 14:28:17 -05:00
Riley Testut
ff46fb38b9 [AltStoreCore] Adds Source.isRecommended
Also replaces legacy “Trusted Sources” references with “Recommended Sources”
2023-10-16 18:26:59 -05:00
Riley Testut
a5e11b0626 [Shared] Includes CodingPath in Source errors’ debug description (if available) 2023-10-10 15:13:40 -05:00
Riley Testut
d0eb2f2b0a 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
2023-10-10 14:47:00 -05:00
Riley Testut
d0609b0269 Fixes not showing “AltServer Not Found” error when refreshing via widget 2023-09-08 17:54:59 -05:00
Riley Testut
7f148b1ce0 Converts legacy RefreshAllIntent into App Shortcut (iOS 17+) 2023-08-18 18:16:05 -05:00
Riley Testut
c97a11bbdf Fixes race condition causing duplicate background refresh notifications (or none) 2023-08-18 18:01:57 -05:00
Riley Testut
0db5e3caab 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.
2023-05-29 16:50:17 -05:00
Riley Testut
89a4f8369b 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.
2023-05-29 16:50:17 -05:00
Riley Testut
b2b0fd4c6f Fixes incorrectly handling misc. CancellationErrors 2023-05-29 16:50:17 -05:00
Riley Testut
4ed40cd544 Removes support for “background mode” permissions 2023-05-29 16:50:17 -05:00
Riley Testut
b662b90ea7 Temporarily disables verifying added permissions
We’ll re-enable once we finish the “Review Permissions” screen.
2023-05-29 16:48:43 -05:00
Riley Testut
260246a94d Includes more detailed info in VerificationError.addedPermission error messages
* New version
* Previous version
* Added permissions
2023-05-29 16:48:43 -05:00
Riley Testut
77bed04d68 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.
2023-05-22 15:02:26 -05:00
Riley Testut
9c2336832a Verifies downloaded app’s build version matches source (if provided) 2023-05-18 15:55:26 -05:00
Riley Testut
e97e48ba13 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).
2023-05-18 15:48:17 -05:00
Riley Testut
fe412a07b6 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).
2023-05-16 15:44:30 -05:00
Riley Testut
5ba5bf995e Removes unused verificationHandler property from VerifyAppOperation 2023-05-15 18:40:47 -05:00
Riley Testut
bfb4fac42a Supports blocking third-party sources
Blocked sources cannot be added by new users, or updated for existing users.
2023-05-15 16:27:30 -05:00
Riley Testut
0255bd7b1c Moves SourceError to its own source file 2023-05-15 15:38:54 -05:00
Riley Testut
631109b54b Verifies all privacy + background mode permissions have usage descriptions 2023-05-15 15:29:51 -05:00
Riley Testut
af405d9e85 Verifies app updates have same permissions as previously installed versions 2023-05-15 15:14:13 -05:00
Riley Testut
45ed24bfb5 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.
2023-05-12 18:26:24 -05:00
Riley Testut
729eb89433 Verifies source’s identifier doesn’t match existing sources when adding 2023-05-12 16:23:28 -05:00
Riley Testut
465be339fd Verifies source’s identifier doesn’t change after refreshing 2023-05-11 18:57:54 -05:00
Riley Testut
244a1de2ca Verifies downloaded app’s version matches source 2023-05-11 18:57:54 -05:00
Riley Testut
10ac6507ec Replaces OperationError.cancelled with CancellationError
Keeps `OperationError.cancelled` around for source-compatibility, but now returns CancellationError() instead of OperationError.
2023-05-11 18:57:54 -05:00
Riley Testut
ad41024bcb Verifies downloaded app’s SHA-256 checksum (if specified) 2023-05-11 18:57:53 -05:00
Riley Testut
e1b7c9b64e Moves VerificationError to its own source file 2023-05-11 18:57:15 -05:00
Riley Testut
ab4bc76ec9 Removes Psychic Paper support from VerifyAppOperation 2023-05-11 18:56:10 -05:00
Riley Testut
63868a2ff0 Fixes updating apps with manually-removed app extensions (e.g. uYou+) 2023-05-11 13:55:49 -05:00
Riley Testut
27a69036ae Merge branch 'source_detail' into develop 2023-04-04 18:15:59 -05:00
Riley Testut
428f08f3de Defines explicit error codes for OperationError.Code cases 2023-04-04 17:50:49 -05:00
Riley Testut
bd026b95b6 Supports adding/removing source from SourceDetailViewController 2023-04-04 16:55:55 -05:00
Riley Testut
15af909a3e Fixes error fetching Friend Zone patrons due to unexpected nil name 2023-03-28 14:37:47 -05:00
Riley Testut
7970258d50 Fixes “no provisioning profile with the requested identifier…” error
As of March 20, 2023, deleting an app’s auto-generated free provisioning profile is no longer supported. However, fetching the provisioning profile now re-generates is every time, so there’s no need to delete it first.

As a workaround, we now simply use the first profile we fetched if we receive an error when deleting it. This approach should continue to work even if Apple later reverses this change.
2023-03-21 09:00:44 -05:00
Riley Testut
961bc5aa66 Removes unnecessary @available annotations 2023-03-02 17:02:11 -06:00
Riley Testut
468e912e47 Removes unnecessary #available checks 2023-03-02 16:53:36 -06:00