[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
parent 26a05d323f
commit 03fad2f202
3 changed files with 52 additions and 0 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"
}
}