From e422804000799747624d2bc2aa972359b27551d3 Mon Sep 17 00:00:00 2001 From: Laura Sempere Date: Thu, 4 Jul 2024 20:00:14 +0200 Subject: [PATCH] KM-4542: Add explicit dependency to mobile-ios-networking package --- Package.swift | 10 ++++++---- .../PIALibrary/WebServices/PIAWebServices.swift | 14 -------------- Sources/PIALibrary/WebServices/WebServices.swift | 6 ------ 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Package.swift b/Package.swift index ab9ec7a2..dfb40c58 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,5 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -9,7 +9,7 @@ let package = Package( defaultLocalization: "en", platforms: [ .iOS(.v12), - .tvOS(.v16) + .tvOS(.v17) ], products: [ .library( @@ -34,7 +34,8 @@ let package = Package( .package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver.git", from: "1.9.0"), .package(url: "https://github.com/ashleymills/Reachability.swift.git", from: "4.3.0"), .package(url: "https://github.com/michaeltyson/TPKeyboardAvoiding.git", from: "1.3.5"), - .package(url: "https://github.com/Alamofire/Alamofire.git", exact: "5.0.1") + .package(url: "https://github.com/Alamofire/Alamofire.git", exact: "5.0.1"), + .package(url: "git@github.com:pia-foss/mobile-ios-networking.git", exact: "1.3.1") ], targets: [ .target( @@ -55,7 +56,8 @@ let package = Package( .product(name: "PIAWireguard", package: "mobile-ios-wireguard", condition: .when(platforms: [.iOS])), .product(name: "TunnelKit", package: "mobile-ios-openvpn", condition: .when(platforms: [.iOS])), .product(name: "TunnelKitOpenVPN", package: "mobile-ios-openvpn", condition: TargetDependencyCondition.when(platforms: [.iOS])), - .product(name: "TunnelKitOpenVPNAppExtension", package: "mobile-ios-openvpn", condition: TargetDependencyCondition.when(platforms: [.iOS])) + .product(name: "TunnelKitOpenVPNAppExtension", package: "mobile-ios-openvpn", condition: TargetDependencyCondition.when(platforms: [.iOS])), + .product(name: "NWHttpConnection", package: "mobile-ios-networking") ], resources: [ .process("Resources") diff --git a/Sources/PIALibrary/WebServices/PIAWebServices.swift b/Sources/PIALibrary/WebServices/PIAWebServices.swift index d4569cf2..f8318bc6 100644 --- a/Sources/PIALibrary/WebServices/PIAWebServices.swift +++ b/Sources/PIALibrary/WebServices/PIAWebServices.swift @@ -127,20 +127,6 @@ class PIAWebServices: WebServices, ConfigurationAccess { return "PIA" }() - /*** - The token to use for protocol authentication. - */ - var vpnToken: String? { - return self.accountAPI.vpnToken() - } - - /*** - The token to use for api authentication. - */ - var apiToken: String? { - return self.accountAPI.apiToken() - } - /*** Generates a new auth expiring token based on a previous non-expiry one. */ diff --git a/Sources/PIALibrary/WebServices/WebServices.swift b/Sources/PIALibrary/WebServices/WebServices.swift index 490828ea..14ef96e6 100644 --- a/Sources/PIALibrary/WebServices/WebServices.swift +++ b/Sources/PIALibrary/WebServices/WebServices.swift @@ -35,12 +35,6 @@ protocol WebServices: class { func migrateToken(token: String, _ callback: SuccessLibraryCallback?) func update(credentials: Credentials, resetPassword reset: Bool, email: String, _ callback: SuccessLibraryCallback?) - - /// The token to use for protocol authentication. - var vpnToken: String? { get } - - /// The token to use for api authentication. - var apiToken: String? { get } // MARK: DIP Token