mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[cleanup]: commented out debug-only code until CI is switched to release builds
This commit is contained in:
@@ -107,11 +107,11 @@ public extension UserDefaults
|
||||
(ProcessInfo.processInfo.isOperatingSystemAtLeast(ios14) && !ProcessInfo.processInfo.isOperatingSystemAtLeast(ios15_7_2)) ||
|
||||
(ProcessInfo.processInfo.isOperatingSystemAtLeast(ios16) && !ProcessInfo.processInfo.isOperatingSystemAtLeast(ios16_2))
|
||||
|
||||
#if DEBUG
|
||||
let permissionCheckingDisabled = true
|
||||
#else
|
||||
// #if DEBUG
|
||||
// let permissionCheckingDisabled = true
|
||||
// #else
|
||||
let permissionCheckingDisabled = false
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
// Pre-iOS 15 doesn't support custom sorting, so default to sorting by name.
|
||||
// Otherwise, default to `default` sorting (a.k.a. "source order").
|
||||
|
||||
@@ -87,21 +87,21 @@ public extension DatabaseManager
|
||||
|
||||
guard !self.isStarted else { return finish(nil) }
|
||||
|
||||
#if DEBUG
|
||||
// Wrap in #if DEBUG to *ensure* we never accidentally delete production databases.
|
||||
if ProcessInfo.processInfo.isPreview
|
||||
{
|
||||
do
|
||||
{
|
||||
print("!!! Purging database for preview...")
|
||||
try FileManager.default.removeItem(at: PersistentContainer.defaultDirectoryURL())
|
||||
}
|
||||
catch
|
||||
{
|
||||
print("Failed to remove database directory for preview.", error)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// #if DEBUG
|
||||
// // Wrap in #if DEBUG to *ensure* we never accidentally delete production databases.
|
||||
// if ProcessInfo.processInfo.isPreview
|
||||
// {
|
||||
// do
|
||||
// {
|
||||
// print("!!! Purging database for preview...")
|
||||
// try FileManager.default.removeItem(at: PersistentContainer.defaultDirectoryURL())
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// print("Failed to remove database directory for preview.", error)
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
|
||||
if self.persistentContainer.isMigrationRequired
|
||||
{
|
||||
@@ -354,11 +354,11 @@ private extension DatabaseManager
|
||||
|
||||
let fileURL = installedApp.fileURL
|
||||
|
||||
#if DEBUG
|
||||
let replaceCachedApp = true
|
||||
#else
|
||||
// #if DEBUG
|
||||
// let replaceCachedApp = true
|
||||
// #else
|
||||
let replaceCachedApp = !FileManager.default.fileExists(atPath: fileURL.path) || installedApp.version != localApp.version || installedApp.buildVersion != localApp.buildVersion
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
if replaceCachedApp
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user