[AltStore] Disable installed app checking for simulator builds

This commit is contained in:
Riley Testut
2019-06-06 12:56:52 -07:00
parent 1725868296
commit b98ab3e852

View File

@@ -72,6 +72,11 @@ extension AppManager
{ {
func update() 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 context = DatabaseManager.shared.persistentContainer.newBackgroundSavingViewContext()
let fetchRequest = InstalledApp.fetchRequest() as NSFetchRequest<InstalledApp> let fetchRequest = InstalledApp.fetchRequest() as NSFetchRequest<InstalledApp>
@@ -98,6 +103,8 @@ extension AppManager
{ {
print("Error while fetching installed apps") print("Error while fetching installed apps")
} }
#endif
} }
func authenticate(presentingViewController: UIViewController?, completionHandler: @escaping (Result<(ALTTeam, ALTCertificate), Error>) -> Void) func authenticate(presentingViewController: UIViewController?, completionHandler: @escaping (Result<(ALTTeam, ALTCertificate), Error>) -> Void)