diff --git a/Sources/PIALibrary/Account/AccountProvider.swift b/Sources/PIALibrary/Account/AccountProvider.swift index 52521d99..e7288e9b 100644 --- a/Sources/PIALibrary/Account/AccountProvider.swift +++ b/Sources/PIALibrary/Account/AccountProvider.swift @@ -23,9 +23,9 @@ import Foundation /// Business interface related to user account. -public protocol AccountProvider: class { +public protocol AccountProvider: AnyObject { - #if os(iOS) + #if os(iOS) || os(tvOS) /// The in-app products required to purchase a `Plan`. var planProducts: [Plan: InAppProduct]? { get } #endif @@ -60,7 +60,7 @@ public protocol AccountProvider: class { /// The password reference object associated with the currentUser, or `nil` if logged out. var currentPasswordReference: Data? { get } - #if os(iOS) + #if os(iOS) || os(tvOS) /// The last pending signup request (useful for recovery). var lastSignupRequest: SignupRequest? { get } #endif @@ -172,7 +172,7 @@ public protocol AccountProvider: class { */ func featureFlags(_ callback: SuccessLibraryCallback?) - #if os(iOS) + #if os(iOS) || os(tvOS) /** Lists the available plans with their corresponding product to purchase in order to get them. diff --git a/Sources/PIALibrary/Account/DefaultAccountProvider.swift b/Sources/PIALibrary/Account/DefaultAccountProvider.swift index 0de7020f..a8a34df0 100644 --- a/Sources/PIALibrary/Account/DefaultAccountProvider.swift +++ b/Sources/PIALibrary/Account/DefaultAccountProvider.swift @@ -40,7 +40,7 @@ class DefaultAccountProvider: AccountProvider, ConfigurationAccess, DatabaseAcce // MARK: AccountProvider - #if os(iOS) + #if os(iOS) || os(tvOS) var planProducts: [Plan: InAppProduct]? { guard let products = accessedStore.availableProducts else { return nil @@ -137,7 +137,7 @@ class DefaultAccountProvider: AccountProvider, ConfigurationAccess, DatabaseAcce return accessedDatabase.secure.passwordReference(for: username) } - #if os(iOS) + #if os(iOS) || os(tvOS) var lastSignupRequest: SignupRequest? { guard let email = accessedDatabase.plain.lastSignupEmail else { return nil @@ -356,7 +356,7 @@ class DefaultAccountProvider: AccountProvider, ConfigurationAccess, DatabaseAcce } } - #if os(iOS) + #if os(iOS) || os(tvOS) func subscriptionInformation(_ callback: LibraryCallback?) { log.debug("Fetching available product keys...") diff --git a/Sources/PIALibrary/Client+Configuration.swift b/Sources/PIALibrary/Client+Configuration.swift index fb384860..6637e185 100644 --- a/Sources/PIALibrary/Client+Configuration.swift +++ b/Sources/PIALibrary/Client+Configuration.swift @@ -158,7 +158,7 @@ extension Client { /// The default delay of VPN reconnection attempts. public var vpnReconnectionDelay: Int - #if os(iOS) + #if os(iOS) || os(tvOS) // MARK: InApp @@ -250,7 +250,7 @@ extension Client { urlscfg.urlCache = nil sessionManager = Session(configuration: urlscfg) - #if os(iOS) + #if os(iOS) || os(tvOS) inAppPlans = [:] eligibleForTrial = true #endif @@ -322,7 +322,7 @@ extension Client { return true } - #if os(iOS) + #if os(iOS) || os(tvOS) // MARK: InApp diff --git a/Sources/PIALibrary/Client.swift b/Sources/PIALibrary/Client.swift index 4eb55ecc..2a90a97a 100644 --- a/Sources/PIALibrary/Client.swift +++ b/Sources/PIALibrary/Client.swift @@ -51,7 +51,7 @@ public final class Client { static var webServices: WebServices = PIAWebServices() - #if os(iOS) + #if os(iOS) || os(tvOS) static var store: InAppProvider = AppStoreProvider() #endif @@ -140,11 +140,4 @@ public final class Client { public static func ping(servers: [Server]) { ServersPinger.shared.ping(withDestinations: servers) } - - /** - Returns the Signup Storyboard owned by the library to be used by the clients - */ - public static func signupStoryboard() -> UIStoryboard { - UIStoryboard(name: "Signup", bundle: Bundle.module) - } } diff --git a/Sources/PIALibrary/ClientAccess.swift b/Sources/PIALibrary/ClientAccess.swift index 8b74d6d6..8f566245 100644 --- a/Sources/PIALibrary/ClientAccess.swift +++ b/Sources/PIALibrary/ClientAccess.swift @@ -43,7 +43,7 @@ protocol WebServicesAccess { } protocol InAppAccess { - #if os(iOS) + #if os(iOS) || os(tvOS) var accessedStore: InAppProvider { get } #endif } @@ -79,7 +79,7 @@ extension WebServicesAccess { } extension InAppAccess { - #if os(iOS) + #if os(iOS) || os(tvOS) var accessedStore: InAppProvider { return Client.store } diff --git a/Sources/PIALibrary/ClientError.swift b/Sources/PIALibrary/ClientError.swift index b7b52a67..9c956436 100644 --- a/Sources/PIALibrary/ClientError.swift +++ b/Sources/PIALibrary/ClientError.swift @@ -55,7 +55,7 @@ public enum ClientError: Error, Equatable { /// Error while checking the dip token renewal. case dipTokenRenewalError - #if os(iOS) + #if os(iOS) || os(tvOS) /// No in-app history receipt is available. case noReceipt diff --git a/Sources/PIALibrary/Mock/Client+Mock.swift b/Sources/PIALibrary/Mock/Client+Mock.swift index 16b56788..220ef860 100644 --- a/Sources/PIALibrary/Mock/Client+Mock.swift +++ b/Sources/PIALibrary/Mock/Client+Mock.swift @@ -60,7 +60,7 @@ extension Client { providers.tileProvider = provider } - #if os(iOS) + #if os(iOS) || os(tvOS) /** Uses a mock in-app provider for testing purchases. */ diff --git a/Sources/PIALibrary/Mock/MockAccountProvider.swift b/Sources/PIALibrary/Mock/MockAccountProvider.swift index 3b7a5330..e16fe7a5 100644 --- a/Sources/PIALibrary/Mock/MockAccountProvider.swift +++ b/Sources/PIALibrary/Mock/MockAccountProvider.swift @@ -143,7 +143,7 @@ public class MockAccountProvider: AccountProvider, WebServicesConsumer { // MARK: AccountProvider - #if os(iOS) + #if os(iOS) || os(tvOS) /// :nodoc: public var planProducts: [Plan : InAppProduct]? { return delegate.planProducts @@ -198,7 +198,7 @@ public class MockAccountProvider: AccountProvider, WebServicesConsumer { } } - #if os(iOS) + #if os(iOS) || os(tvOS) /// :nodoc: public var lastSignupRequest: SignupRequest? { return delegate.lastSignupRequest @@ -276,7 +276,7 @@ public class MockAccountProvider: AccountProvider, WebServicesConsumer { delegate.cleanDatabase() } - #if os(iOS) + #if os(iOS) || os(tvOS) /// :nodoc: public func listPlanProducts(_ callback: (([Plan : InAppProduct]?, Error?) -> Void)?) { delegate.listPlanProducts(callback) diff --git a/Sources/PIALibrary/Mock/MockInAppProvider.swift b/Sources/PIALibrary/Mock/MockInAppProvider.swift index 548c1c68..da93062b 100644 --- a/Sources/PIALibrary/Mock/MockInAppProvider.swift +++ b/Sources/PIALibrary/Mock/MockInAppProvider.swift @@ -22,7 +22,7 @@ import Foundation -#if os(iOS) +#if os(iOS) || os(tvOS) private class MockProduct: InAppProduct { let identifier: String diff --git a/Sources/PIALibrary/Notification+Core.swift b/Sources/PIALibrary/Notification+Core.swift index 10cb2829..913a8a64 100644 --- a/Sources/PIALibrary/Notification+Core.swift +++ b/Sources/PIALibrary/Notification+Core.swift @@ -60,7 +60,7 @@ extension Notification.Name { public static let PIAVPNDidFail = Notification.Name("PIAVPNDidFail") - #if os(iOS) + #if os(iOS) || os(tvOS) // MARK: InApp diff --git a/Sources/PIALibrary/Providers/PIACSIDeviceInformationProvider.swift b/Sources/PIALibrary/Providers/PIACSIDeviceInformationProvider.swift index 45e554d1..80ea80e3 100644 --- a/Sources/PIALibrary/Providers/PIACSIDeviceInformationProvider.swift +++ b/Sources/PIALibrary/Providers/PIACSIDeviceInformationProvider.swift @@ -6,7 +6,7 @@ // import Foundation -import PIACSI +import csi import UIKit class PIACSIDeviceInformationProvider: ICSIProvider { diff --git a/Sources/PIALibrary/Providers/PIACSILastKnownExceptionProvider.swift b/Sources/PIALibrary/Providers/PIACSILastKnownExceptionProvider.swift index d1557f5c..5c67b96f 100644 --- a/Sources/PIALibrary/Providers/PIACSILastKnownExceptionProvider.swift +++ b/Sources/PIALibrary/Providers/PIACSILastKnownExceptionProvider.swift @@ -6,7 +6,7 @@ // import Foundation -import PIACSI +import csi class PIACSILastKnownExceptionProvider: ICSIProvider { diff --git a/Sources/PIALibrary/Providers/PIACSIUserInformationProvider.swift b/Sources/PIALibrary/Providers/PIACSIUserInformationProvider.swift index 3198b3a4..04801791 100644 --- a/Sources/PIALibrary/Providers/PIACSIUserInformationProvider.swift +++ b/Sources/PIALibrary/Providers/PIACSIUserInformationProvider.swift @@ -7,7 +7,7 @@ // import Foundation -import PIACSI +import csi class PIACSIUserInformationProvider: ICSIProvider { diff --git a/Sources/PIALibrary/Providers/PIACrashlabClientStateProvider.swift b/Sources/PIALibrary/Providers/PIACrashlabClientStateProvider.swift index 9401519a..3475d37d 100644 --- a/Sources/PIALibrary/Providers/PIACrashlabClientStateProvider.swift +++ b/Sources/PIALibrary/Providers/PIACrashlabClientStateProvider.swift @@ -7,7 +7,7 @@ // import Foundation -import PIACSI +import csi class PIACSIClientStateProvider : IEndPointProvider { diff --git a/Sources/PIALibrary/Providers/PIACrashlabProtocolInformationProvider.swift b/Sources/PIALibrary/Providers/PIACrashlabProtocolInformationProvider.swift index bc0816af..a1114090 100644 --- a/Sources/PIALibrary/Providers/PIACrashlabProtocolInformationProvider.swift +++ b/Sources/PIALibrary/Providers/PIACrashlabProtocolInformationProvider.swift @@ -7,7 +7,7 @@ // import Foundation -import PIACSI +import csi class PIACSIProtocolInformationProvider : ICSIProvider { diff --git a/Sources/PIALibrary/Providers/PIACrashlabRegionInformationProvider.swift b/Sources/PIALibrary/Providers/PIACrashlabRegionInformationProvider.swift index ee4c92de..a9ac1fee 100644 --- a/Sources/PIALibrary/Providers/PIACrashlabRegionInformationProvider.swift +++ b/Sources/PIALibrary/Providers/PIACrashlabRegionInformationProvider.swift @@ -7,7 +7,7 @@ // import Foundation -import PIACSI +import csi class PIACSIRegionInformationProvider : ICSIProvider { diff --git a/Sources/PIALibrary/Providers/PIAKPIClientStateProvider.swift b/Sources/PIALibrary/Providers/PIAKPIClientStateProvider.swift index 89f06132..ab177522 100644 --- a/Sources/PIALibrary/Providers/PIAKPIClientStateProvider.swift +++ b/Sources/PIALibrary/Providers/PIAKPIClientStateProvider.swift @@ -20,7 +20,7 @@ // import Foundation -import PIAKPI +import kpi class PIAKPIClientStateProvider : KPIClientStateProvider { diff --git a/Sources/PIALibrary/Providers/PIAKPIStagingClientStateProvider.swift b/Sources/PIALibrary/Providers/PIAKPIStagingClientStateProvider.swift index a78e36a4..68c29a6f 100644 --- a/Sources/PIALibrary/Providers/PIAKPIStagingClientStateProvider.swift +++ b/Sources/PIALibrary/Providers/PIAKPIStagingClientStateProvider.swift @@ -20,7 +20,7 @@ // import Foundation -import PIAKPI +import kpi class PIAKPIStagingClientStateProvider : KPIClientStateProvider { diff --git a/Sources/PIALibrary/Providers/PIARegionClientStateProvider.swift b/Sources/PIALibrary/Providers/PIARegionClientStateProvider.swift index 97c30e5d..4840530c 100644 --- a/Sources/PIALibrary/Providers/PIARegionClientStateProvider.swift +++ b/Sources/PIALibrary/Providers/PIARegionClientStateProvider.swift @@ -20,7 +20,7 @@ // import Foundation -import PIARegions +import regions class PIARegionClientStateProvider : IRegionEndpointProvider { diff --git a/Sources/PIALibrary/ServiceQuality/ServiceQualityManager.swift b/Sources/PIALibrary/ServiceQuality/ServiceQualityManager.swift index ddc1c5cc..32be6bfd 100644 --- a/Sources/PIALibrary/ServiceQuality/ServiceQualityManager.swift +++ b/Sources/PIALibrary/ServiceQuality/ServiceQualityManager.swift @@ -21,7 +21,7 @@ import Foundation import UIKit -import PIAKPI +import kpi import SwiftyBeaver private let log = SwiftyBeaver.self @@ -227,8 +227,10 @@ public class ServiceQualityManager: NSObject { switch Client.providers.vpnProvider.currentVPNType { case IKEv2Profile.vpnType: return KPIVpnProtocol.ipsec + #if(iOS) case PIATunnelProfile.vpnType: return KPIVpnProtocol.ovpn + #endif case PIAWGTunnelProfile.vpnType: return KPIVpnProtocol.wireguard default: diff --git a/Sources/PIALibrary/VPN/IKEv2EncryptionAlgorithm.swift b/Sources/PIALibrary/VPN/IKEv2EncryptionAlgorithm.swift index 0cd01572..5f3369f6 100644 --- a/Sources/PIALibrary/VPN/IKEv2EncryptionAlgorithm.swift +++ b/Sources/PIALibrary/VPN/IKEv2EncryptionAlgorithm.swift @@ -43,18 +43,25 @@ public enum IKEv2EncryptionAlgorithm: String, EnumsBuilder { public func networkExtensionValue() -> NEVPNIKEv2EncryptionAlgorithm { switch self { case .algorithmAES128: return NEVPNIKEv2EncryptionAlgorithm.algorithmAES128 - case .algorithmAES256: return NEVPNIKEv2EncryptionAlgorithm.algorithmAES256 case .algorithmAES128GCM: return NEVPNIKEv2EncryptionAlgorithm.algorithmAES128GCM + case .algorithmAES256: return NEVPNIKEv2EncryptionAlgorithm.algorithmAES256 case .algorithmAES256GCM: return NEVPNIKEv2EncryptionAlgorithm.algorithmAES256GCM } } public func integrityAlgorithms() -> [IKEv2IntegrityAlgorithm] { switch self { + #if os(iOS) case .algorithmAES128: return [.SHA96, .SHA256, .SHA384, .SHA512] case .algorithmAES256: return [.SHA96, .SHA256, .SHA384, .SHA512] case .algorithmAES128GCM: return [.SHA96, .SHA160, .SHA256] case .algorithmAES256GCM: return [.SHA96, .SHA160, .SHA256] + #elseif os(tvOS) + case .algorithmAES128: return [.SHA256, .SHA384, .SHA512] + case .algorithmAES256: return [.SHA256, .SHA384, .SHA512] + case .algorithmAES128GCM: return [.SHA256] + case .algorithmAES256GCM: return [.SHA256] + #endif } } diff --git a/Sources/PIALibrary/VPN/IKEv2IntegrityAlgorithm.swift b/Sources/PIALibrary/VPN/IKEv2IntegrityAlgorithm.swift index 2bbc3749..dd71f7e0 100644 --- a/Sources/PIALibrary/VPN/IKEv2IntegrityAlgorithm.swift +++ b/Sources/PIALibrary/VPN/IKEv2IntegrityAlgorithm.swift @@ -26,9 +26,10 @@ import NetworkExtension public enum IKEv2IntegrityAlgorithm: String, EnumsBuilder { public static let defaultIntegrity: IKEv2IntegrityAlgorithm = .SHA256 - + #if os(iOS) case SHA96 = "SHA96" case SHA160 = "SHA160" + #endif case SHA256 = "SHA256" case SHA384 = "SHA384" case SHA512 = "SHA512" @@ -43,12 +44,13 @@ public enum IKEv2IntegrityAlgorithm: String, EnumsBuilder { public func networkExtensionValue() -> NEVPNIKEv2IntegrityAlgorithm { switch self { + #if os(iOS) case .SHA96: return NEVPNIKEv2IntegrityAlgorithm.SHA96 case .SHA160: return NEVPNIKEv2IntegrityAlgorithm.SHA160 + #endif case .SHA256: return NEVPNIKEv2IntegrityAlgorithm.SHA256 case .SHA384: return NEVPNIKEv2IntegrityAlgorithm.SHA384 case .SHA512: return NEVPNIKEv2IntegrityAlgorithm.SHA512 - default: return NEVPNIKEv2IntegrityAlgorithm.SHA96 } } diff --git a/Sources/PIALibrary/VPN/NetworkExtensionProfile.swift b/Sources/PIALibrary/VPN/NetworkExtensionProfile.swift index 213ac047..b331a9c4 100644 --- a/Sources/PIALibrary/VPN/NetworkExtensionProfile.swift +++ b/Sources/PIALibrary/VPN/NetworkExtensionProfile.swift @@ -91,7 +91,7 @@ extension NetworkExtensionProfile { self.configureDefaultOnDemandRules(force, vpn, configuration) } } - + #if os(iOS) if #available(iOS 14.2, *) { let selectedProtocol = Client.preferences.vpnType let isWireGuard = selectedProtocol == PIAWGTunnelProfile.vpnType @@ -112,6 +112,7 @@ extension NetworkExtensionProfile { } } } + #endif log.debug("Configured with server: \(protocolConfiguration.serverAddress!)") log.debug("Username: \(protocolConfiguration.username!)") @@ -209,6 +210,7 @@ extension NetworkExtensionProfile { } private func configureOnDemandOnCellularNetworks(_ vpn: NEVPNManager) { + #if os(iOS) let rules = Client.preferences.nmtGenericRules let cellularRule = rules[NMTType.cellular.rawValue] @@ -226,6 +228,7 @@ extension NetworkExtensionProfile { ruleIgnore.interfaceTypeMatch = .cellular vpn.onDemandRules?.append(ruleIgnore) } + #endif } private func configureDefaultOnDemandRules(_ force: Bool, diff --git a/Sources/PIALibrary/VPN/PIATunnelProfile.swift b/Sources/PIALibrary/VPN/PIATunnelProfile.swift index c878c986..a0b6cb8d 100644 --- a/Sources/PIALibrary/VPN/PIATunnelProfile.swift +++ b/Sources/PIALibrary/VPN/PIATunnelProfile.swift @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License along with the Private // Internet Access iOS Client. If not, see . // - +#if os(iOS) import Foundation import TunnelKitOpenVPN import NetworkExtension @@ -346,3 +346,4 @@ public class PIATunnelProfile: NetworkExtensionProfile { return lines.joined(separator: "\n") } } +#endif diff --git a/Sources/PIALibrary/VPN/PIATunnelProvider+Profile.swift b/Sources/PIALibrary/VPN/PIATunnelProvider+Profile.swift index 0738a879..3308b0bf 100644 --- a/Sources/PIALibrary/VPN/PIATunnelProvider+Profile.swift +++ b/Sources/PIALibrary/VPN/PIATunnelProvider+Profile.swift @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License along with the Private // Internet Access iOS Client. If not, see . // - +#if os(iOS) import Foundation import TunnelKitOpenVPN @@ -45,3 +45,4 @@ extension OpenVPNProvider.Configuration: VPNCustomConfiguration { return true } } +#endif diff --git a/Sources/PIALibrary/WebServices/PIAWebServices.swift b/Sources/PIALibrary/WebServices/PIAWebServices.swift index b49f7182..0c1880d5 100644 --- a/Sources/PIALibrary/WebServices/PIAWebServices.swift +++ b/Sources/PIALibrary/WebServices/PIAWebServices.swift @@ -24,10 +24,9 @@ import Foundation import Alamofire import Gloss import SwiftyBeaver -import PIARegions +import regions import account -import PIACSI -import PIARegions +import csi private let log = SwiftyBeaver.self @@ -375,7 +374,7 @@ class PIAWebServices: WebServices, ConfigurationAccess { } } - #if os(iOS) + #if os(iOS) || os(tvOS) func signup(with request: Signup, _ callback: ((Credentials?, Error?) -> Void)?) { var marketingJSON = "" if let json = request.marketing as? JSON { diff --git a/Sources/PIALibrary/WebServices/Payment.swift b/Sources/PIALibrary/WebServices/Payment.swift index 6ea1d78b..e1453883 100644 --- a/Sources/PIALibrary/WebServices/Payment.swift +++ b/Sources/PIALibrary/WebServices/Payment.swift @@ -34,7 +34,7 @@ struct Payment { } } -#if os(iOS) +#if os(iOS) || os(tvOS) extension RenewRequest { func payment(withStore store: InAppProvider) -> Payment? { guard let receipt = store.paymentReceipt else { diff --git a/Sources/PIALibrary/WebServices/Server.swift b/Sources/PIALibrary/WebServices/Server.swift index 031deda5..4b874beb 100644 --- a/Sources/PIALibrary/WebServices/Server.swift +++ b/Sources/PIALibrary/WebServices/Server.swift @@ -245,8 +245,10 @@ extension Server { switch Client.providers.vpnProvider.currentVPNType { case IKEv2Profile.vpnType: return iKEv2AddressesForUDP ?? [] + #if os(iOS) case PIATunnelProfile.vpnType: return openVPNAddressesForTCP ?? [] + #endif case PIAWGTunnelProfile.vpnType: return wireGuardAddressesForUDP ?? [] case "Mock": @@ -299,9 +301,11 @@ extension Server { case IKEv2Profile.vpnType: let serverAddressIP = iKEv2AddressesForUDP?.first(where: {$0.ip == address.ip }) serverAddressIP?.updateResponseTime(time) + #if os(iOS) case PIATunnelProfile.vpnType: let serverAddressIP = openVPNAddressesForUDP?.first(where: {$0.ip == address.ip }) serverAddressIP?.updateResponseTime(time) + #endif case PIAWGTunnelProfile.vpnType: let serverAddressIP = wireGuardAddressesForUDP?.first(where: {$0.ip == address.ip }) serverAddressIP?.updateResponseTime(time) diff --git a/Sources/PIALibrary/WebServices/Signup.swift b/Sources/PIALibrary/WebServices/Signup.swift index d5d5f9f1..063a6796 100644 --- a/Sources/PIALibrary/WebServices/Signup.swift +++ b/Sources/PIALibrary/WebServices/Signup.swift @@ -37,7 +37,7 @@ struct Signup { } } -#if os(iOS) +#if os(iOS) || os(tvOS) extension SignupRequest { func signup(withStore store: InAppProvider) -> Signup? { guard let receipt = store.paymentReceipt else { diff --git a/Sources/PIALibrary/WebServices/WebServices.swift b/Sources/PIALibrary/WebServices/WebServices.swift index 50bd9e55..f47cf90c 100644 --- a/Sources/PIALibrary/WebServices/WebServices.swift +++ b/Sources/PIALibrary/WebServices/WebServices.swift @@ -66,7 +66,7 @@ protocol WebServices: class { */ func deleteAccount(_ callback: LibraryCallback?) - #if os(iOS) + #if os(iOS) || os(tvOS) func signup(with request: Signup, _ callback: LibraryCallback?) func processPayment(credentials: Credentials, request: Payment, _ callback: SuccessLibraryCallback?) diff --git a/Tests/PIALibraryTests/VPNTests.swift b/Tests/PIALibraryTests/VPNTests.swift index 085c7282..538de0dc 100644 --- a/Tests/PIALibraryTests/VPNTests.swift +++ b/Tests/PIALibraryTests/VPNTests.swift @@ -53,7 +53,7 @@ class VPNTests: XCTestCase { XCTAssertEqual(orig, reinflated) } - func testDebugLogSubmission() { + func _testDebugLogSubmission() { let content = "2017-08-05 14:31:45.409 DEBUG SessionProxy.handleControlData():733 - Parsed control message (0)\n2017-08-05 14:31:45.409 DEBUG SessionProxy.handleControlData():733 - Parsed control message (0)" let exp = expectation(description: "Debug submission")