From b98ab3e852a615c9503fbb7e0214d82b1f203224 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Thu, 6 Jun 2019 12:56:52 -0700 Subject: [PATCH] [AltStore] Disable installed app checking for simulator builds --- AltStore/Apps/AppManager.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AltStore/Apps/AppManager.swift b/AltStore/Apps/AppManager.swift index 4102c39b..6a8cb4bf 100644 --- a/AltStore/Apps/AppManager.swift +++ b/AltStore/Apps/AppManager.swift @@ -72,6 +72,11 @@ extension AppManager { func update() { + #if targetEnvironment(simulator) + // Apps aren't ever actually installed to simulator, so just do nothing rather than delete them from database. + return + #else + let context = DatabaseManager.shared.persistentContainer.newBackgroundSavingViewContext() let fetchRequest = InstalledApp.fetchRequest() as NSFetchRequest @@ -98,6 +103,8 @@ extension AppManager { print("Error while fetching installed apps") } + + #endif } func authenticate(presentingViewController: UIViewController?, completionHandler: @escaping (Result<(ALTTeam, ALTCertificate), Error>) -> Void)