Uses alternate app icon for AltStore in My Apps, if one is chosen

This commit is contained in:
Riley Testut
2024-02-15 14:19:34 -06:00
committed by Magesh K
parent b8b32d501c
commit ac62612a18
3 changed files with 58 additions and 0 deletions

View File

@@ -159,6 +159,16 @@ public extension InstalledApp
func loadIcon(completion: @escaping (Result<UIImage?, Error>) -> Void)
{
if self.bundleIdentifier == StoreApp.altstoreAppID, let iconName = UIApplication.alt_shared?.alternateIconName
{
// Use alternate app icon for AltStore, if one is chosen.
let image = UIImage(named: iconName)
completion(.success(image))
return
}
let hasAlternateIcon = self.hasAlternateIcon
let alternateIconURL = self.alternateIconURL
let fileURL = self.fileURL