summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadVPN
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2023-05-04 09:56:21 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-05-12 14:51:59 +0200
commita08ceebb971669bcd35992f744f98a4e0f5ecc05 (patch)
tree8bd5ca47f322fe90537ef42f3bdd2e71f73b67a4 /ios/MullvadVPN
parentbdd6590031354943f392326a1d951f26d42240b7 (diff)
downloadmullvadvpn-a08ceebb971669bcd35992f744f98a4e0f5ecc05.tar.xz
mullvadvpn-a08ceebb971669bcd35992f744f98a4e0f5ecc05.zip
Simplify the AddressCache logic, it now filters results to only keep the first one, does not rotate addresses anymore, and has tests written for.
Diffstat (limited to 'ios/MullvadVPN')
-rw-r--r--ios/MullvadVPN/AppDelegate.swift8
1 files changed, 5 insertions, 3 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index 748742ee76..26ac51cccf 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -51,10 +51,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
logger = Logger(label: "AppDelegate")
+ let containerURL = FileManager.default
+ .containerURL(forSecurityApplicationGroupIdentifier: ApplicationConfiguration.securityGroupIdentifier)!
+
addressCache = REST.AddressCache(
- securityGroupIdentifier: ApplicationConfiguration.securityGroupIdentifier,
- isReadOnly: false
- )!
+ canWriteToCache: true, cacheFolder: containerURL
+ )
proxyFactory = REST.ProxyFactory.makeProxyFactory(
transportProvider: { [weak self] in