conversations-classic-ios/ConversationsClassic/Helpers/Const.swift

47 lines
1.3 KiB
Swift
Raw Normal View History

2024-06-19 15:15:27 +00:00
import Foundation
2024-07-10 17:49:36 +00:00
import UIKit
2024-06-19 15:15:27 +00:00
enum Const {
2024-07-09 12:37:51 +00:00
// // Network
// #if DEBUG
// static let baseUrl = "staging.some.com/api"
// #else
// static let baseUrl = "prod.some.com/api"
// #endif
// static let requestTimeout = 15.0
// static let networkLogging = true
2024-06-19 15:15:27 +00:00
// App
static var appVersion: String {
let info = Bundle.main.infoDictionary
let appVersion = info?["CFBundleShortVersionString"] as? String ?? "Unknown"
let appBuild = info?[kCFBundleVersionKey as String] as? String ?? "Unknown"
return "v \(appVersion)(\(appBuild))"
}
static var appName: String {
Bundle.main.bundleIdentifier ?? "Conversations Classic iOS"
}
// Trusted servers
enum TrustedServers: String {
case narayana = "narayana.im"
case conversations = "conversations.im"
}
2024-07-09 12:37:51 +00:00
2024-07-10 17:49:36 +00:00
// Limit for video for sharing
static let videoDurationLimit = 60.0
2024-07-09 12:37:51 +00:00
// Upload/download file folder
2024-07-12 11:43:14 +00:00
static let fileFolder = "Downloads"
2024-07-10 17:49:36 +00:00
// Grid size for gallery preview (3 in a row)
static let galleryGridSize = UIScreen.main.bounds.width / 3
2024-07-11 13:59:24 +00:00
// Size for map preview for location messages
2024-07-11 15:46:57 +00:00
static let mapPreviewSize = UIScreen.main.bounds.width * 0.5
// Size for attachment preview
static let attachmentPreviewSize = UIScreen.main.bounds.width * 0.5
2024-06-19 15:15:27 +00:00
}