[cleanup]: commented out debug-only code until CI is switched to release builds

This commit is contained in:
Magesh K
2025-01-08 02:51:02 +05:30
parent 5db45565f3
commit b3382df216
9 changed files with 50 additions and 48 deletions

View File

@@ -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").

View File

@@ -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
{