mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 23:03:27 +01:00
[AltStoreCore] Updates DatabaseManager to support #Preview macro
Synchronously loads database via startForPreview(), and also erases database for DEBUG builds.
This commit is contained in:
16
AltStoreCore/Extensions/ProcessInfo+Previews.swift
Normal file
16
AltStoreCore/Extensions/ProcessInfo+Previews.swift
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user