mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
# Conflicts: # Session.xcodeproj/project.pbxproj # Session/Meta/Session-Prefix.pch # Session/Notifications/SyncPushTokensJob.swift # Session/Utilities/BackgroundPoller.swift # SessionMessagingKit/Configuration.swift # SessionMessagingKit/Database/Models/Profile.swift # SessionMessagingKit/Jobs/Types/AttachmentDownloadJob.swift # SessionMessagingKit/Jobs/Types/AttachmentUploadJob.swift # SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift # SessionMessagingKit/Jobs/Types/FailedAttachmentDownloadsJob.swift # SessionMessagingKit/Jobs/Types/FailedMessageSendsJob.swift # SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift # SessionMessagingKit/Jobs/Types/MessageReceiveJob.swift # SessionMessagingKit/Jobs/Types/MessageSendJob.swift # SessionMessagingKit/Jobs/Types/NotifyPushServerJob.swift # SessionMessagingKit/Jobs/Types/RetrieveDefaultOpenGroupRoomsJob.swift # SessionMessagingKit/Jobs/Types/SendReadReceiptsJob.swift # SessionMessagingKit/Jobs/Types/UpdateProfilePictureJob.swift # SessionMessagingKit/Sending & Receiving/MessageSender.swift # SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift # SessionMessagingKit/Utilities/AppReadiness.m # SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift # SessionMessagingKitTests/_TestUtilities/TestOnionRequestAPI.swift # SessionShareExtension/ShareNavController.swift # SessionSnodeKit/Jobs/GetSnodePoolJob.swift # SessionUtilitiesKit/Configuration.swift # SessionUtilitiesKit/Database/Utilities/Database+Utilities.swift # SessionUtilitiesKit/JobRunner/JobRunner.swift # SignalUtilitiesKit/Meta/SignalUtilitiesKit.h # SignalUtilitiesKit/Utilities/SSKAsserts.h
41 lines
1.4 KiB
Swift
41 lines
1.4 KiB
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
import GRDB
|
|
|
|
public enum SNUtilitiesKit: MigratableTarget { // Just to make the external API nice
|
|
public static var isRunningTests: Bool {
|
|
ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil
|
|
}
|
|
|
|
public static func migrations(_ db: Database) -> TargetMigrations {
|
|
return TargetMigrations(
|
|
identifier: .utilitiesKit,
|
|
migrations: [
|
|
[
|
|
// Intentionally including the '_003_YDBToGRDBMigration' in the first migration
|
|
// set to ensure the 'Identity' data is migrated before any other migrations are
|
|
// run (some need access to the users publicKey)
|
|
_001_InitialSetupMigration.self,
|
|
_002_SetupStandardJobs.self,
|
|
_003_YDBToGRDBMigration.self
|
|
],
|
|
[], // Other DB migrations
|
|
[], // Legacy DB removal
|
|
[
|
|
_004_AddJobPriority.self
|
|
]
|
|
]
|
|
)
|
|
}
|
|
|
|
public static func configure(maxFileSize: UInt) {
|
|
SNUtilitiesKitConfiguration.maxFileSize = maxFileSize
|
|
}
|
|
}
|
|
|
|
@objc public final class SNUtilitiesKitConfiguration: NSObject {
|
|
@objc public static var maxFileSize: UInt = 0
|
|
@objc public static var isRunningTests: Bool { return SNUtilitiesKit.isRunningTests }
|
|
}
|