Commit Graph

89 Commits

Author SHA1 Message Date
Riley Testut
2a0fdaace0 [AltStoreCore] Fixes DatabaseManager.startForPreview() deadlock 2024-12-26 21:15:29 +05:30
Riley Testut
b2258f32cb Refactors SourceViewController into dedicated tab
* Updates UI to use source icons + tint colors
* Adds Edit button + swipe actions
2024-12-26 21:15:29 +05:30
Riley Testut
79c7e994e8 [AltStoreCore] Adds Source.isRecommended
Also replaces legacy “Trusted Sources” references with “Recommended Sources”
2024-12-26 21:15:29 +05:30
Riley Testut
691d20ae0a [AltStoreCore] Updates DatabaseManager to support #Preview macro
Synchronously loads database via startForPreview(), and also erases database for DEBUG builds.
2024-12-26 21:15:29 +05:30
Riley Testut
19f2a3dd29 [AltStoreCore] Fixes “any ALTAppPermission cannot conform to 'Hashable’” Xcode 15 compiler error 2024-12-26 21:15:29 +05:30
Riley Testut
c78d359a07 [AltWidget] Adds interactive Active Apps widget to view + refresh all active apps (iOS 17+) 2024-12-26 21:15:29 +05:30
Riley Testut
d97f1315a6 [AltStoreCore] Updates AltStore12ToAltStore13 mapping model for latest model changes
* Non-optional AppPermission.usageDescription
* Non-optional AppPermission.appBundleID
* Added AppPermission.sourceID
2024-12-26 21:15:29 +05:30
Riley Testut
222617273c [AltStoreCore] Fixes incorrectly merging permissions for same app from different sources 2024-12-26 21:15:29 +05:30
Riley Testut
628d96442f [AltStoreCore] Makes AppPermission.usageDescription non-optional for backwards compatibility
Necessary to support switching between AltStore beta and public version.

Wraps private non-optional _usageDescription value in public accessor with optional return type to still treat it as “optional” value.
2024-12-26 21:15:29 +05:30
Riley Testut
17aee9b290 Revises appPermissions format in source JSON
Before, appPermissions was one array containing all permissions of different types.

Now, we split entitlement and privacy permissions into separate “entitlements” and “privacy” child arrays.
2024-12-26 21:15:29 +05:30
Riley Testut
ebb86110ed [AltStoreCore] Migrates Core Data model from v12 to v13 2024-12-26 21:15:29 +05:30
Riley Testut
72f4bd3657 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
8929b857cf Removes support for “background mode” permissions 2024-12-26 21:15:29 +05:30
Riley Testut
00d6fdb1ea Fixes erroneously showing “Unsupported Updates Available” message 2024-12-26 21:15:29 +05:30
Riley Testut
fcf571a1ba [AltStoreCore] Renames StoreApp.latestVersionString to _version 2024-12-26 21:15:29 +05:30
Riley Testut
35e3d09f4c 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
8b68a41caf 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
67ac0eb400 Verifies downloaded app’s SHA-256 checksum (if specified) 2024-12-26 21:15:29 +05:30
Riley Testut
a6ef07450d [AltStoreCore] Migrates Core Data model from v11 to v12 2024-12-26 21:15:29 +05:30
Riley Testut
2917ebb5e4 [AltStoreCore] Fixes migration error on launch if AltStore app group does not exist.
Allows falling back to using regular app sandbox instead of app group.
2024-12-26 21:15:29 +05:30
Riley Testut
d4378bbe57 [AltStoreCore] Fixes incorrectly merging app versions for same app from different sources 2024-12-26 21:15:29 +05:30
Riley Testut
9265fd5a5d Shows detailed source “About” page when adding 3rd-party sources
Allows users to preview sources before adding them to their AltStore.
2024-12-26 21:15:29 +05:30
Riley Testut
57837d37dd [AltStoreCore] Adds Source.isAdded
Convenience property to determine whether a source has been added to the user’s AltStore.
2024-12-26 21:15:29 +05:30
Riley Testut
b8e8ce8aac [AltStoreCore] Fixes incorrect Source.featuredApps relationship post-merging 2024-12-26 21:15:29 +05:30
Riley Testut
256b0c14f5 [AltStoreCore] Supports additional source JSON values for detailed “About” page 2024-12-26 21:15:29 +05:30
Riley Testut
403b34c39c Fixes error fetching Friend Zone patrons due to unexpected nil name 2024-12-26 21:15:29 +05:30
Riley Testut
d4f98f3a94 [AltStoreCore] Fixes Core Data “Using nil or insecure value transformer” warnings 2024-12-26 21:15:29 +05:30
Riley Testut
07d5a7551f Supports sideloading more than 3 apps via MacDirtyCow exploit
The MacDirtyCow exploit allows users to remove the 3 active apps limit on iOS 16.1.2 and earlier. To support this, we’ve added a new (hidden) “Enforce 3-App Limit” setting that can be disabled to allow sideloading more than 3 apps.
2024-12-26 21:15:29 +05:30
Riley Testut
31d5d024dd Caches MergeErrors when refreshing sources to view later in SourcesViewController 2024-12-26 21:15:29 +05:30
Riley Testut
47fb8ff3eb Fixes incorrect StoreApp.versions order post-merge 2024-12-26 21:15:29 +05:30
Riley Testut
333e68a859 Replaces StoreApp.setVersions() preconditionFailure with runtime error
It’s more common than expected for apps to not have any app versions, so better to fail gracefully than crash.
2024-12-26 21:15:29 +05:30
Riley Testut
f45deb5ba4 Fixes missing app icon for update errors in Error Log 2024-12-26 21:15:29 +05:30
Riley Testut
b63adb38d8 Fixes potentially incorrect versions order when merging StoreApp 2024-12-26 21:15:29 +05:30
Riley Testut
fdbb40a0df Hides app updates that don’t support device’s OS version 2024-12-26 21:15:29 +05:30
Riley Testut
3e9463c434 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.
2024-12-26 21:15:29 +05:30
Riley Testut
19463281cc 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.
2024-12-26 21:15:29 +05:30
Riley Testut
503b953c93 Migrates Core Data model from v10 to v11 2024-12-26 21:15:29 +05:30
Riley Testut
bf8d90a128 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.
2024-12-26 21:15:29 +05:30
Riley Testut
200509dc79 Adds AppVersion Core Data entity
Preserves redundant fields on StoreApp in database model for backwards compatibility.
2024-12-26 21:15:29 +05:30
Riley Testut
f28e42a03c Adds LoggedError Core Data entity
Allows us to save certain errors to disk so that they can be viewed again later from an error log.
2024-12-26 21:15:29 +05:30
June
eb29a5e106 fix build 2024-12-24 14:33:50 +09:00
Rose
8309b6e3be Update StoreApp.swift
Signed-off-by: Rose <cool5tarXV@gmail.com>
2024-12-24 14:26:10 +09:00
Rose
a415adf7c1 added fix + todo
Signed-off-by: Rose <cool5tarXV@gmail.com>
2024-12-24 14:26:10 +09:00
Magesh K
850f4704e2 - Fix: DatabaseManager.migrateDatabaseToAppGroupIfNeeded() src and dest for replaceAt() cannot be same 2024-11-28 02:47:01 +05:30
Magesh K
51792f2da5 restore changes dropped from altstore by 4989c42 2024-11-10 03:04:24 +05:30
Magesh K
11dba4dd94 Fix-regression: restored update-check logic(4bcb9e1) in InstalledApp.swift which was dropped in (4989c42) (#728) 2024-11-04 03:38:28 -05:00
June Park
4989c42d1e merge AltStore 1.6.3, add dynamic anisette lists, merge SideJITServer integration
* Change error from Swift.Error to NSError

* Adds ResultOperation.localizedFailure

* Finish Riley's monster commit

f59b5902ff8c76d4eb0ff806794ffebe635844b5
May the Gods have mercy on my soul.

* Fix format strings I broke

* Include "Enable JIT" errors in Error Log

* Fix minimuxer status checking

* [skip ci] Update the no wifi message to include VPN

* Opens Error Log when tapping ToastView

* Fixes Error Log context menu covering cell content

* Fixes Error Log context menu appearing while scrolling

* Fixes incorrect Search FAQ URL

* Fix Error Log showing UIAlertController on iOS 14+

* Fix Error Log not showing UIAlertController on iOS <=13

* Fix wrong color in AuthenticationViewController

* Fix typo

* Fixes logging non-AltServerErrors as AltServerError.underlyingError

* Limits quitting other AltStore/SideStore processes to database migrations

* Skips logging cancelled errors

* 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.

* Conforms OperatingSystemVersion to Comparable

* Parses AppVersion.minOSVersion/maxOSVersion from source JSON

* 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.

* Supports optional @Managed properties

* Conforms AppVersion to AppProtocol

* Verifies min/max OS version before downloading app + asks user to download older app version if necessary

* Improves error message when file does not exist at AppVersion.downloadURL

* Removes unnecessary StoreApp convenience properties

* Removes unnecessary StoreApp convenience properties as well as fix other issues

* Remove Settings bundle, add SwiftUI view instead

Fix refresh all shortcut intent

* Update AuthenticationOperation.swift

Signed-off-by: June Park <rjp2030@outlook.com>

* Fix build issues given by develop

* Add availability check to fix CI build(?)

* If it's gonna be that way...

---------

Signed-off-by: June Park <rjp2030@outlook.com>
Co-authored-by: nythepegasus <nythepegasus84@gmail.com>
Co-authored-by: Riley Testut <riley@rileytestut.com>
Co-authored-by: ny <me@nythepegas.us>
2024-08-05 21:43:52 -04:00
Nythepegasus
22986f31ec These vars don't change, let's use let keyword 2023-07-10 14:32:41 -04:00
naturecodevoid
70900f2e3c Revert "Release channel support (#239)"
This reverts commit 09d11bdff7.
2023-02-02 08:09:15 -08:00
naturecodevoid
09d11bdff7 Release channel support (#239)
* Release channel support

- Show SideStore in Browse if it's not from the current SideStore source
- Change SideStore source URL and source ID based on if beta and nightly are in the version string
- Use StoreApp name for InstalledApp name to allow for source-specified name to show up in My Apps

* My Apps: Fix incorrect app name on first launch

* News: fix duplicate news items from multiple SideStore release channel sources

* Trusted Sources: Add stable and beta
2023-02-02 08:05:27 -08:00