mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-23 11:26:54 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
51 lines
1.1 KiB
Swift
51 lines
1.1 KiB
Swift
import Foundation
|
|
|
|
public enum SupportedDestination: String, CaseIterable {
|
|
case iOS
|
|
case tvOS
|
|
case macOS
|
|
case macCatalyst
|
|
case watchOS
|
|
case visionOS
|
|
}
|
|
|
|
extension SupportedDestination {
|
|
|
|
public var string: String {
|
|
switch self {
|
|
case .iOS:
|
|
return "ios"
|
|
case .tvOS:
|
|
return "tvos"
|
|
case .macOS:
|
|
return "macos"
|
|
case .macCatalyst:
|
|
return "maccatalyst"
|
|
case .watchOS:
|
|
return "watchos"
|
|
case .visionOS:
|
|
return "xros"
|
|
}
|
|
}
|
|
|
|
// This is used to:
|
|
// 1. Get the first one and apply SettingPresets 'Platforms' and 'Product_Platform' if the platform is 'auto'
|
|
// 2. Sort, loop and merge together SettingPresets 'SupportedDestinations'
|
|
public var priority: Int {
|
|
switch self {
|
|
case .iOS:
|
|
return 0
|
|
case .tvOS:
|
|
return 1
|
|
case .watchOS:
|
|
return 2
|
|
case .visionOS:
|
|
return 3
|
|
case .macOS:
|
|
return 4
|
|
case .macCatalyst:
|
|
return 5
|
|
}
|
|
}
|
|
}
|