Commit Graph

237 Commits

Author SHA1 Message Date
Riley Testut
93b6da4855 Logs sideloading-related events with OSLog 2024-12-26 21:15:29 +05:30
Riley Testut
f83303a6b7 [AltStoreCore] Fixes “any ALTAppPermission cannot conform to 'Hashable’” Xcode 15 compiler error 2024-12-26 21:15:29 +05:30
Riley Testut
ea2600aba9 [AltWidget] Adds interactive Active Apps widget to view + refresh all active apps (iOS 17+) 2024-12-26 21:15:29 +05:30
Riley Testut
c1bbca9ed7 [Permissions] Adds entries for most known privacy permissions 2024-12-26 21:15:29 +05:30
Riley Testut
be8bf44784 [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
15b3cd5f2d [AltStoreCore] Fixes incorrectly merging permissions for same app from different sources 2024-12-26 21:15:29 +05:30
Riley Testut
74bccf4caf [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
68a87f55bf 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
6d10933a83 Changes ALTAppPermission.isKnown to check localizedName == nil, not localizedDescription
Privacy permissions always have nil localizedDescriptions, even if they’re known.
2024-12-26 21:15:29 +05:30
Riley Testut
b60f9f8e08 [Permissions] Fixes incorrect entitlement keys and revises names + descriptions 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
a38eba8449 [AltStoreCore] Migrates Core Data model from v12 to v13 2024-12-26 21:15:29 +05:30
Riley Testut
f9bd65a1b5 [AltStoreCore] Adds Permissions.plist with definitions for most known permissions
Simpler to update over time as a separate plist rather than in source code.
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
f5c40ae571 Disables permission verification for DEBUG builds 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
0fa941e6ef Fixes erroneously showing “Unsupported Updates Available” message 2024-12-26 21:15:29 +05:30
Riley Testut
26c173c479 Revises Entitlements UI on app detail page 2024-12-26 21:15:29 +05:30
Riley Testut
a3c373108d Redesigns store page permissions UI to show all entitlements and privacy permissions 2024-12-26 21:15:29 +05:30
Riley Testut
ea0564126e [AltStoreCore] Adds some common ALTPrivacyPermissions
* Apple Music
* Bluetooth
* Calendars
* Camera
* Face ID
* Local Network
* Microphone
* Photos
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
3aa041d2ad [AltStoreCore] Renames StoreApp.latestVersionString to _version 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
177d453491 [AltStoreCore] Backports iOS 15+ NSManagedObjectContext.performAndWait<T>()
Simplifies returning values and throwing errors from managed object contexts.
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
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
7dfbba9b00 Verifies downloaded app’s SHA-256 checksum (if specified) 2024-12-26 21:15:29 +05:30
Riley Testut
16c71be7f9 [AltStoreCore] Flattens optional values when @Managed/@AsyncManaged.wrappedValue is also optional 2024-12-26 21:15:29 +05:30
Riley Testut
7d380da5d1 [AltStoreCore] Adds Managed.perform() to match AsyncManaged 2024-12-26 21:15:29 +05:30
Riley Testut
a09f4bbd7a [AltStoreCore] Renames AsyncManaged.get() to perform()
Implies it can be used as alternative to managedObject.managedObjectContext.perform() and not just for retrieving values.
2024-12-26 21:15:29 +05:30
Riley Testut
357211e917 [AltStoreCore] Migrates Core Data model from v11 to v12 2024-12-26 21:15:29 +05:30
Riley Testut
bc7311c159 [AltStoreCore] Replaces remaining Bundle.appGroups.first with Bundle.altstoreAppGroup
Ensures we can still find the correct AltStore app group even if it isn’t the first one listed in the Info.plist.
2024-12-26 21:15:29 +05:30
Riley Testut
39f7e60e8b [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
b88044757f [AltStoreCore] Fixes incorrectly merging app versions for same app from different sources 2024-12-26 21:15:29 +05:30
Riley Testut
f44c3c18a2 [AltStoreCore] Adds async wrappers for presenting UIAlertControllers 2024-12-26 21:15:29 +05:30
Riley Testut
654f73f4ee 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
20cd6d98fc [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
12ca34f40f [AltStoreCore] Adds @AsyncManaged property wrapper
Same as @Managed, except it supports using Swift Concurrency to fetch values from its managedObject’s managedObjectContext.
2024-12-26 21:15:29 +05:30
Riley Testut
fc99fb32a4 [AltStoreCore] Adds NSManagedObjectContext.performAsync() to wrap iOS 15+ async perform()
Allows us to use Swift Concurrency with Core Data pre-iOS 15.
2024-12-26 21:15:29 +05:30
Riley Testut
779887e582 [AltStoreCore] Fixes incorrect Source.featuredApps relationship post-merging 2024-12-26 21:15:29 +05:30
Riley Testut
bdb1d68b6b [AltStoreCore] Supports additional source JSON values for detailed “About” page 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
e4dfe1125a Fixes UIApplication.keyWindow deprecation warning 2024-12-26 21:15:29 +05:30
Riley Testut
589ece3860 Fixes Scanner.scanHexInt32 deprecation warning 2024-12-26 21:15:29 +05:30
Riley Testut
aa2409178b [AltStoreCore] Fixes Core Data “Using nil or insecure value transformer” warnings 2024-12-26 21:15:29 +05:30
Riley Testut
65598e2cd5 Fixes triggering false positives with some malware detectors
Renames UserDefaults.isMacDirtyCowSupported to .isCowExploitSupported
2024-12-26 21:15:29 +05:30
Riley Testut
9df4026ed4 Hides MacDirtyCow settings on iOS 15.7.2
MacDirtyCow supports iOS 14.0 - 15.7.1 and 16.0 - 16.1.2, but not 15.7.2
2024-12-26 21:15:29 +05:30