mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-27 21:37:16 +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.
32 lines
914 B
Swift
32 lines
914 B
Swift
import Foundation
|
|
|
|
public let FALLBACK_BASE_BUNDLE_ID: String = "app.swiftgram.ios"
|
|
|
|
public func sgBaseBundleIdentifier() -> String {
|
|
let baseBundleId: String
|
|
if let bundleId: String = Bundle.main.bundleIdentifier {
|
|
if Bundle.main.bundlePath.hasSuffix(".appex") {
|
|
if let lastDotRange: Range<String.Index> = bundleId.range(of: ".", options: [.backwards]) {
|
|
baseBundleId = String(bundleId[..<lastDotRange.lowerBound])
|
|
} else {
|
|
baseBundleId = FALLBACK_BASE_BUNDLE_ID
|
|
}
|
|
} else {
|
|
baseBundleId = bundleId
|
|
}
|
|
} else {
|
|
baseBundleId = FALLBACK_BASE_BUNDLE_ID
|
|
}
|
|
return baseBundleId
|
|
}
|
|
|
|
public func sgAppGroupIdentifier() -> String {
|
|
let result: String = "group.\(sgBaseBundleIdentifier())"
|
|
|
|
#if DEBUG
|
|
print("APP_GROUP_IDENTIFIER: \(result)")
|
|
#endif
|
|
|
|
return result
|
|
}
|