[AltStoreCore] Updates DatabaseManager to support #Preview macro

Synchronously loads database via startForPreview(), and also erases database for DEBUG builds.
This commit is contained in:
Riley Testut
2023-10-11 17:59:01 -05:00
committed by Magesh K
parent 1ece687e37
commit 9ddc27f6ca
3 changed files with 54 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
//
// ProcessInfo+Previews.swift
// AltStoreCore
//
// Created by Riley Testut on 10/11/23.
// Copyright © 2023 Riley Testut. All rights reserved.
//
import Foundation
public extension ProcessInfo
{
var isPreview: Bool {
ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1"
}
}