mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update the SDK (#3196)
* Update the SDK. * Fix API breaks on send failures and propagate the new type. * Handle new SDK ShieldState. * Set up the ClientBuilder's `cachePath` option. * Delete the cacheDirectory during logout/clearCache. * Add unit tests for RestorationToken decoding and SessionDirectories generation.
This commit is contained in:
@@ -68,6 +68,22 @@ extension URL: ExpressibleByStringLiteral {
|
||||
return url
|
||||
}
|
||||
|
||||
/// The base directory where all application support data is stored.
|
||||
static var cachesBaseDirectory: URL {
|
||||
let url = appGroupContainerDirectory
|
||||
.appendingPathComponent("Library", isDirectory: true)
|
||||
.appendingPathComponent("Caches", isDirectory: true)
|
||||
.appendingPathComponent(InfoPlistReader.main.baseBundleIdentifier, isDirectory: true)
|
||||
.appendingPathComponent("Sessions", isDirectory: true)
|
||||
|
||||
try? FileManager.default.createDirectoryIfNeeded(at: url)
|
||||
|
||||
// Caches are excluded from backups automatically anyway.
|
||||
// https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html
|
||||
|
||||
return url
|
||||
}
|
||||
|
||||
var globalProxy: String? {
|
||||
if let proxySettingsUnmanaged = CFNetworkCopySystemProxySettings() {
|
||||
let proxySettings = proxySettingsUnmanaged.takeRetainedValue()
|
||||
|
||||
Reference in New Issue
Block a user