diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2022-10-13 13:42:57 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-10-13 13:42:57 +0200 |
| commit | f0821f443b5b91e7d197f3dc8980931cbb2d287b (patch) | |
| tree | 8e9ce6fff16afb64472e3c5c85a4417bf9f67b69 | |
| parent | 71447912cc9c4ff2ef215eef944404b73a8845fe (diff) | |
| parent | d6cfedcbe182339f187667867ee9f2b784f0e014 (diff) | |
| download | mullvadvpn-f0821f443b5b91e7d197f3dc8980931cbb2d287b.tar.xz mullvadvpn-f0821f443b5b91e7d197f3dc8980931cbb2d287b.zip | |
Merge branch 'decouple-logging'
54 files changed, 376 insertions, 174 deletions
diff --git a/ios/.swiftformat b/ios/.swiftformat index 2953ce46f8..7ff7f3916a 100644 --- a/ios/.swiftformat +++ b/ios/.swiftformat @@ -12,4 +12,4 @@ --wrapternary before-operators --redundanttype inferred --ifdef no-indent ---disable initCoderUnavailable, redundantReturn, unusedArguments, redundantRawValues, preferKeyPath +--disable initCoderUnavailable, redundantReturn, unusedArguments, redundantRawValues, preferKeyPath, extensionAccessControl diff --git a/ios/MullvadVPN/Logging/CustomFormatLogHandler.swift b/ios/MullvadLogging/CustomFormatLogHandler.swift index 37b326a2d4..4c86a75f51 100644 --- a/ios/MullvadVPN/Logging/CustomFormatLogHandler.swift +++ b/ios/MullvadLogging/CustomFormatLogHandler.swift @@ -9,27 +9,27 @@ import Foundation import Logging -struct CustomFormatLogHandler: LogHandler { - var metadata: Logger.Metadata = [:] - var logLevel: Logger.Level = .debug +public struct CustomFormatLogHandler: LogHandler { + public var metadata: Logger.Metadata = [:] + public var logLevel: Logger.Level = .debug private let label: String private let streams: [TextOutputStream] private let dateFormatter = Self.makeDateFormatter() - static func makeDateFormatter() -> DateFormatter { + public static func makeDateFormatter() -> DateFormatter { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "YYYY-MM-dd HH:mm:ss.SSS" return dateFormatter } - init(label: String, streams: [TextOutputStream]) { + public init(label: String, streams: [TextOutputStream]) { self.label = label self.streams = streams } - subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? { + public subscript(metadataKey metadataKey: String) -> Logger.Metadata.Value? { get { return metadata[metadataKey] } @@ -38,7 +38,7 @@ struct CustomFormatLogHandler: LogHandler { } } - func log( + public func log( level: Logger.Level, message: Logger.Message, metadata: Logger.Metadata?, diff --git a/ios/MullvadVPN/Logging/LogFormatting.swift b/ios/MullvadLogging/Date+LogFormat.swift index c41c2b758b..dca177599f 100644 --- a/ios/MullvadVPN/Logging/LogFormatting.swift +++ b/ios/MullvadLogging/Date+LogFormat.swift @@ -1,5 +1,5 @@ // -// LogFormatting.swift +// Date+LogFormat.swift // LogFormatting // // Created by pronebird on 09/09/2021. @@ -9,7 +9,7 @@ import Foundation extension Date { - func logFormatDate() -> String { + public func logFormatDate() -> String { let formatter = DateFormatter() formatter.dateFormat = "dd/MM/yyyy @ HH:mm:ss" diff --git a/ios/MullvadLogging/Error+LogFormat.swift b/ios/MullvadLogging/Error+LogFormat.swift new file mode 100644 index 0000000000..993f6d2c4f --- /dev/null +++ b/ios/MullvadLogging/Error+LogFormat.swift @@ -0,0 +1,24 @@ +// +// Error+LogFormat.swift +// MullvadLogging +// +// Created by pronebird on 26/09/2022. +// Copyright © 2022 Mullvad VPN AB. All rights reserved. +// + +import Foundation +import MullvadTypes + +extension Error { + public func logFormatError() -> String { + let nsError = self as NSError + var message = "" + + let description = (self as? CustomErrorDescriptionProtocol)? + .customErrorDescription ?? localizedDescription + + message += "\(description) (domain = \(nsError.domain), code = \(nsError.code))" + + return message + } +} diff --git a/ios/MullvadVPN/Logging/LogRotation.swift b/ios/MullvadLogging/LogRotation.swift index a4c3be01f5..132b0c31c7 100644 --- a/ios/MullvadVPN/Logging/LogRotation.swift +++ b/ios/MullvadLogging/LogRotation.swift @@ -7,13 +7,14 @@ // import Foundation +import MullvadTypes -enum LogRotation { - enum Error: LocalizedError, WrappingError { +public enum LogRotation { + public enum Error: LocalizedError, WrappingError { case noSourceLogFile case moveSourceLogFile(Swift.Error) - var errorDescription: String? { + public var errorDescription: String? { switch self { case .noSourceLogFile: return "Source log file does not exist." @@ -22,7 +23,7 @@ enum LogRotation { } } - var underlyingError: Swift.Error? { + public var underlyingError: Swift.Error? { switch self { case .noSourceLogFile: return nil @@ -32,7 +33,7 @@ enum LogRotation { } } - static func rotateLog(logsDirectory: URL, logFileName: String) throws { + public static func rotateLog(logsDirectory: URL, logFileName: String) throws { let source = logsDirectory.appendingPathComponent(logFileName) let backup = source.deletingPathExtension().appendingPathExtension("old.log") diff --git a/ios/MullvadVPN/Logging/Logger+Errors.swift b/ios/MullvadLogging/Logger+Errors.swift index 0b2811a68e..8a1dc6602c 100644 --- a/ios/MullvadVPN/Logging/Logger+Errors.swift +++ b/ios/MullvadLogging/Logger+Errors.swift @@ -8,9 +8,10 @@ import Foundation import Logging +import MullvadTypes extension Logger { - func error<T: Error>( + public func error<T: Error>( error: T, message: @autoclosure () -> String? = nil, metadata: @autoclosure () -> Logger.Metadata? = nil, diff --git a/ios/MullvadVPN/Logging/Logging.swift b/ios/MullvadLogging/Logging.swift index 1e65249ec8..9120dcb886 100644 --- a/ios/MullvadVPN/Logging/Logging.swift +++ b/ios/MullvadLogging/Logging.swift @@ -7,14 +7,16 @@ // import Foundation -import Logging +@_exported import Logging -func initLoggingSystem(bundleIdentifier: String, metadata: Logger.Metadata? = nil) { - let containerURL = FileManager.default - .containerURL( - forSecurityApplicationGroupIdentifier: ApplicationConfiguration - .securityGroupIdentifier - )! +public func initLoggingSystem( + bundleIdentifier: String, + applicationGroupIdentifier: String, + metadata: Logger.Metadata? = nil +) { + let containerURL = FileManager.default.containerURL( + forSecurityApplicationGroupIdentifier: applicationGroupIdentifier + )! let logsDirectoryURL = containerURL.appendingPathComponent("Logs", isDirectory: true) let logFileName = "\(bundleIdentifier).log" let logFileURL = logsDirectoryURL.appendingPathComponent(logFileName) diff --git a/ios/MullvadVPN/Logging/OSLogHandler.swift b/ios/MullvadLogging/OSLogHandler.swift index 0b71bd08e5..61375b37ea 100644 --- a/ios/MullvadVPN/Logging/OSLogHandler.swift +++ b/ios/MullvadLogging/OSLogHandler.swift @@ -10,9 +10,9 @@ import Foundation import Logging import os -struct OSLogHandler: LogHandler { - var metadata: Logging.Logger.Metadata = [:] - var logLevel: Logging.Logger.Level = .debug +public struct OSLogHandler: LogHandler { + public var metadata: Logging.Logger.Metadata = [:] + public var logLevel: Logging.Logger.Level = .debug private let label: String private let osLog: OSLog @@ -39,12 +39,12 @@ struct OSLogHandler: LogHandler { } } - init(subsystem: String, category: String) { + public init(subsystem: String, category: String) { label = category osLog = OSLogHandler.getOSLog(subsystem: subsystem, category: category) } - subscript(metadataKey metadataKey: String) -> Logging.Logger.Metadata.Value? { + public subscript(metadataKey metadataKey: String) -> Logging.Logger.Metadata.Value? { get { return metadata[metadataKey] } @@ -53,7 +53,7 @@ struct OSLogHandler: LogHandler { } } - func log( + public func log( level: Logging.Logger.Level, message: Logging.Logger.Message, metadata: Logging.Logger.Metadata?, @@ -77,7 +77,7 @@ struct OSLogHandler: LogHandler { } } -extension Logging.Logger.Level { +private extension Logging.Logger.Level { var osLogType: OSLogType { switch self { case .trace, .debug: diff --git a/ios/MullvadVPN/Logging/TextFileOutputStream.swift b/ios/MullvadLogging/TextFileOutputStream.swift index 95387b53ec..95387b53ec 100644 --- a/ios/MullvadVPN/Logging/TextFileOutputStream.swift +++ b/ios/MullvadLogging/TextFileOutputStream.swift diff --git a/ios/MullvadVPN/CustomErrorDescriptionProtocol.swift b/ios/MullvadTypes/CustomErrorDescriptionProtocol.swift index 448d848686..b5999df387 100644 --- a/ios/MullvadVPN/CustomErrorDescriptionProtocol.swift +++ b/ios/MullvadTypes/CustomErrorDescriptionProtocol.swift @@ -9,7 +9,7 @@ import Foundation /// A protocol providing error a way to override error description when printing error chain. -protocol CustomErrorDescriptionProtocol { +public protocol CustomErrorDescriptionProtocol { /// A custom error description that overrides `localizedDescription` when printing error chain. var customErrorDescription: String? { get } } diff --git a/ios/MullvadVPN/Error+Chain.swift b/ios/MullvadTypes/Error+Chain.swift index 8ddd0df219..a349da7a8a 100644 --- a/ios/MullvadVPN/Error+Chain.swift +++ b/ios/MullvadTypes/Error+Chain.swift @@ -10,7 +10,7 @@ import Foundation extension Error { /// Returns a flat list of errors by unrolling the underlying error chain. - var underlyingErrorChain: [Error] { + public var underlyingErrorChain: [Error] { var errors: [Error] = [] var currentError: Error? = self as Error @@ -22,7 +22,7 @@ extension Error { return errors } - func logFormatError() -> String { + public func logFormatError() -> String { let nsError = self as NSError var message = "" diff --git a/ios/MullvadVPN/WrappingError.swift b/ios/MullvadTypes/WrappingError.swift index ff217d0dae..4947fca7d4 100644 --- a/ios/MullvadVPN/WrappingError.swift +++ b/ios/MullvadTypes/WrappingError.swift @@ -9,6 +9,6 @@ import Foundation /// Protocol describing errors that may contain underlying errors. -protocol WrappingError: Error { +public protocol WrappingError: Error { var underlyingError: Error? { get } } diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index 3f30895939..4b2dc97813 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -14,6 +14,8 @@ 063687BA28EB234F00BE7161 /* PacketTunnelTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 063687B928EB234F00BE7161 /* PacketTunnelTransport.swift */; }; 063687BC28EEC00800BE7161 /* RESTTransportRegistry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 063687BB28EEC00800BE7161 /* RESTTransportRegistry.swift */; }; 0697D6E728F01513007A9E99 /* TransportMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0697D6E628F01513007A9E99 /* TransportMonitor.swift */; }; + 5804BEBD28F811F600B49CA5 /* PacketTunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */; }; + 5804BEBE28F8121300B49CA5 /* IPEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58561C98239A5D1500BD6B5E /* IPEndpoint.swift */; }; 5806767C27048E9B00C858CB /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58CE5E7B224146470008646E /* PacketTunnelProvider.swift */; }; 5807483B27DB8A980020ECBF /* WireGuardKitTypes in Frameworks */ = {isa = PBXBuildFile; productRef = 5807483A27DB8A980020ECBF /* WireGuardKitTypes */; }; 5807E2C02432038B00F5FF30 /* String+Split.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5807E2BF2432038B00F5FF30 /* String+Split.swift */; }; @@ -30,22 +32,24 @@ 580F8B8628197958002E0998 /* DNSSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 580F8B8528197958002E0998 /* DNSSettings.swift */; }; 580F8B872819795C002E0998 /* DNSSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 580F8B8528197958002E0998 /* DNSSettings.swift */; }; 5811DE50239014550011EB53 /* NEVPNStatus+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5811DE4F239014550011EB53 /* NEVPNStatus+Debug.swift */; }; - 5815039724D6ECAE00C9C50E /* CustomFormatLogHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815039624D6ECAE00C9C50E /* CustomFormatLogHandler.swift */; }; - 5815039824D6ECAE00C9C50E /* CustomFormatLogHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815039624D6ECAE00C9C50E /* CustomFormatLogHandler.swift */; }; - 5815039D24D6ECE600C9C50E /* TextFileOutputStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815039C24D6ECE600C9C50E /* TextFileOutputStream.swift */; }; - 5815039E24D6ECE600C9C50E /* TextFileOutputStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815039C24D6ECE600C9C50E /* TextFileOutputStream.swift */; }; - 581503A024D6F01E00C9C50E /* LogRotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815039324D6EB7200C9C50E /* LogRotation.swift */; }; - 581503A124D6F01F00C9C50E /* LogRotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5815039324D6EB7200C9C50E /* LogRotation.swift */; }; - 581503A324D6F1EC00C9C50E /* Logger+Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581503A224D6F1EC00C9C50E /* Logger+Errors.swift */; }; - 581503A424D6F1EC00C9C50E /* Logger+Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581503A224D6F1EC00C9C50E /* Logger+Errors.swift */; }; - 581503A624D6F4AE00C9C50E /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581503A524D6F4AE00C9C50E /* Logging.swift */; }; - 581503A724D6F4AE00C9C50E /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581503A524D6F4AE00C9C50E /* Logging.swift */; }; 58161C9C28352F850028ECFD /* MigrateSettingsOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58161C9B28352F850028ECFD /* MigrateSettingsOperation.swift */; }; 5818139F28E09BD8002817DE /* libOperations.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58E5126528DDF04200B0BCDE /* libOperations.a */; }; 581813A128E09DBB002817DE /* NoCancelledDependenciesCondition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581813A028E09DBB002817DE /* NoCancelledDependenciesCondition.swift */; }; 581813A328E09DCD002817DE /* NoFailedDependenciesCondition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581813A228E09DCD002817DE /* NoFailedDependenciesCondition.swift */; }; 581813A528E09DE2002817DE /* BlockCondition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581813A428E09DE2002817DE /* BlockCondition.swift */; }; 581813A728E09DF2002817DE /* MutuallyExclusive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581813A628E09DF2002817DE /* MutuallyExclusive.swift */; }; + 581943E528F8010400B0CB5E /* LogRotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943DD28F8010300B0CB5E /* LogRotation.swift */; }; + 581943E628F8010400B0CB5E /* TextFileOutputStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943DE28F8010300B0CB5E /* TextFileOutputStream.swift */; }; + 581943E728F8010400B0CB5E /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943DF28F8010300B0CB5E /* Logging.swift */; }; + 581943E828F8010400B0CB5E /* Logger+Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943E028F8010300B0CB5E /* Logger+Errors.swift */; }; + 581943E928F8010400B0CB5E /* Error+LogFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943E128F8010300B0CB5E /* Error+LogFormat.swift */; }; + 581943EA28F8010400B0CB5E /* Date+LogFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943E228F8010400B0CB5E /* Date+LogFormat.swift */; }; + 581943EB28F8010400B0CB5E /* CustomFormatLogHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943E328F8010400B0CB5E /* CustomFormatLogHandler.swift */; }; + 581943EC28F8010400B0CB5E /* OSLogHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581943E428F8010400B0CB5E /* OSLogHandler.swift */; }; + 581943F828F8019C00B0CB5E /* libMullvadTypes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 581943F128F8014500B0CB5E /* libMullvadTypes.a */; }; + 581943FA28F801B500B0CB5E /* WrappingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E028DDB7F100B0BCDE /* WrappingError.swift */; }; + 581943FB28F801D500B0CB5E /* CustomErrorDescriptionProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E328DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift */; }; + 581943FC28F8020500B0CB5E /* Error+Chain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511EA28DDE18400B0BCDE /* Error+Chain.swift */; }; 5819C2142726CC8D00D6EC38 /* DataSourceSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5819C2132726CC8D00D6EC38 /* DataSourceSnapshotTests.swift */; }; 5819C2152726CC9400D6EC38 /* DataSourceSnapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587EB66F27143B6500123C75 /* DataSourceSnapshot.swift */; }; 5819C2172729595500D6EC38 /* SettingsAddDNSEntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5819C2162729595500D6EC38 /* SettingsAddDNSEntryCell.swift */; }; @@ -91,7 +95,6 @@ 5846227726E22A7C0035F7C2 /* AppStorePaymentManagerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5846227626E22A7C0035F7C2 /* AppStorePaymentManagerDelegate.swift */; }; 584789BE264D4A2A000E45FB /* le_root_cert.cer in Resources */ = {isa = PBXBuildFile; fileRef = 584789B7264D4A2A000E45FB /* le_root_cert.cer */; }; 584789E026529D72000E45FB /* SSLPinningURLSessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584789DF26529D72000E45FB /* SSLPinningURLSessionDelegate.swift */; }; - 584789EC2652A1A2000E45FB /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 584789EB2652A1A2000E45FB /* Logging */; }; 584B17AB27637DE40057F3B8 /* ReconnectTunnelOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584B17AA27637DE40057F3B8 /* ReconnectTunnelOperation.swift */; }; 584D26BF270C550B004EA533 /* AnyIPAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584D26BE270C550B004EA533 /* AnyIPAddress.swift */; }; 584D26C0270C550E004EA533 /* AnyIPAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584D26BE270C550B004EA533 /* AnyIPAddress.swift */; }; @@ -111,9 +114,8 @@ 58561C9A239A5D1500BD6B5E /* IPEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58561C98239A5D1500BD6B5E /* IPEndpoint.swift */; }; 5857F24324C8662600CF6F47 /* SelectLocationHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5857F24224C8662600CF6F47 /* SelectLocationHeaderView.swift */; }; 5857F24724C882D700CF6F47 /* SelectLocationNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5857F24624C882D700CF6F47 /* SelectLocationNavigationController.swift */; }; - 585834F824D2BC1F00A8AF56 /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 585834F724D2BC1F00A8AF56 /* Logging */; }; - 585834FC24D2BC9500A8AF56 /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 585834FB24D2BC9500A8AF56 /* Logging */; }; 585B4B8726D9098900555C4C /* TunnelStatusNotificationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A94AE326CFD945001CB97C /* TunnelStatusNotificationProvider.swift */; }; + 585C6F4C28F80745005196BE /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = 585C6F4B28F80745005196BE /* Logging */; }; 585CA70F25F8C44600B47C62 /* UIMetrics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585CA70E25F8C44600B47C62 /* UIMetrics.swift */; }; 585DA87726B024A600B8C587 /* CachedRelays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA87626B024A600B8C587 /* CachedRelays.swift */; }; 585DA87826B024A900B8C587 /* CachedRelays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA87626B024A600B8C587 /* CachedRelays.swift */; }; @@ -127,7 +129,6 @@ 585DA89926B0329200B8C587 /* PacketTunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */; }; 585DA89A26B0329200B8C587 /* PacketTunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */; }; 585DA8A326B14E0D00B8C587 /* ServerRelaysResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA88326B0270700B8C587 /* ServerRelaysResponse.swift */; }; - 585DA8A626B14F5100B8C587 /* SSLPinningURLSessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584789DF26529D72000E45FB /* SSLPinningURLSessionDelegate.swift */; }; 585E820327F3285E00939F0E /* SendAppStoreReceiptOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585E820227F3285E00939F0E /* SendAppStoreReceiptOperation.swift */; }; 5862805422428EF100F5A6E1 /* TranslucentButtonBlurView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5862805322428EF100F5A6E1 /* TranslucentButtonBlurView.swift */; }; 5868585524054096000B8131 /* AppButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5868585424054096000B8131 /* AppButton.swift */; }; @@ -145,7 +146,6 @@ 58781CC922AE7CA8009B9D8E /* RelayConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58781CC822AE7CA8009B9D8E /* RelayConstraints.swift */; }; 58781CCE22AE8918009B9D8E /* RelayConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58781CC822AE7CA8009B9D8E /* RelayConstraints.swift */; }; 58781CD522AFBA39009B9D8E /* RelaySelector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58781CD422AFBA39009B9D8E /* RelaySelector.swift */; }; - 5878BA1426DD0B01004147D7 /* OSLogHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5823FA4F26CA690600283BF8 /* OSLogHandler.swift */; }; 587988C728A2A01F00E3DF54 /* AccountDataThrottling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587988C628A2A01F00E3DF54 /* AccountDataThrottling.swift */; }; 587A01FC23F1F0BE00B68763 /* SimulatorTunnelProviderHost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587A01FB23F1F0BE00B68763 /* SimulatorTunnelProviderHost.swift */; }; 587AD7C623421D7000E93A53 /* TunnelSettingsV1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 587AD7C523421D7000E93A53 /* TunnelSettingsV1.swift */; }; @@ -198,9 +198,11 @@ 58A1AA8C23F5584C009F7EA6 /* ConnectionPanelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A1AA8B23F5584B009F7EA6 /* ConnectionPanelView.swift */; }; 58A3BDB028A1821A00C8C2C6 /* WgStats.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A3BDAF28A1821A00C8C2C6 /* WgStats.swift */; }; 58A8055E2716EA6700681642 /* AnyIPAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584D26BE270C550B004EA533 /* AnyIPAddress.swift */; }; - 58A8BE81239FBE62006B74AC /* IPEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58561C98239A5D1500BD6B5E /* IPEndpoint.swift */; }; - 58A8D1D72892D3D60065405D /* PacketTunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */; }; 58A99ED3240014A0006599E9 /* TermsOfServiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A99ED2240014A0006599E9 /* TermsOfServiceViewController.swift */; }; + 58AC829428F803A200181C40 /* libMullvadLogging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 581943D628F800C900B0CB5E /* libMullvadLogging.a */; }; + 58AC829528F803A200181C40 /* libMullvadTypes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 581943F128F8014500B0CB5E /* libMullvadTypes.a */; }; + 58AC829628F803A700181C40 /* libMullvadLogging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 581943D628F800C900B0CB5E /* libMullvadLogging.a */; }; + 58AC829728F803A700181C40 /* libMullvadTypes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 581943F128F8014500B0CB5E /* libMullvadTypes.a */; }; 58ACF6492655365700ACE4B7 /* PreferencesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58ACF6482655365700ACE4B7 /* PreferencesViewController.swift */; }; 58ACF64B26553C3F00ACE4B7 /* SettingsSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58ACF64A26553C3F00ACE4B7 /* SettingsSwitchCell.swift */; }; 58ACF64D26567A5000ACE4B7 /* CustomSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58ACF64C26567A4F00ACE4B7 /* CustomSwitch.swift */; }; @@ -226,7 +228,6 @@ 58BFA5CC22A7CE1F00A6173D /* ApplicationConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58BFA5CB22A7CE1F00A6173D /* ApplicationConfiguration.swift */; }; 58BFA5CD22A7CE1F00A6173D /* ApplicationConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58BFA5CB22A7CE1F00A6173D /* ApplicationConfiguration.swift */; }; 58C3A4B222456F1B00340BDB /* AccountInputGroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58C3A4B122456F1A00340BDB /* AccountInputGroupView.swift */; }; - 58CAF4EF26025954007C5886 /* SimulatorTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58BA693023EADA6A009DC256 /* SimulatorTunnelProvider.swift */; }; 58CB0EE024B86751001EF0D8 /* RESTAPIProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58CB0EDF24B86751001EF0D8 /* RESTAPIProxy.swift */; }; 58CC40EF24A601900019D96E /* ObserverList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58CC40EE24A601900019D96E /* ObserverList.swift */; }; 58CCA010224249A1004F3011 /* ConnectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58CCA00F224249A1004F3011 /* ConnectViewController.swift */; }; @@ -242,7 +243,6 @@ 58CE5E81224146470008646E /* PacketTunnel.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 58CE5E79224146470008646E /* PacketTunnel.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 58D0C79E23F1CEBA00FE9BA7 /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D0C79D23F1CEBA00FE9BA7 /* SnapshotHelper.swift */; }; 58D0C7A223F1CECF00FE9BA7 /* MullvadVPNScreenshots.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D0C7A023F1CECF00FE9BA7 /* MullvadVPNScreenshots.swift */; }; - 58D67A0A26D7AE3300557C3C /* OSLogHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5823FA4F26CA690600283BF8 /* OSLogHandler.swift */; }; 58D889B328DDF4B400583FA8 /* libOperations.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58E5126528DDF04200B0BCDE /* libOperations.a */; }; 58D889B928DDF53500583FA8 /* BackgroundObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 589D287F28462CB000F9A7B3 /* BackgroundObserver.swift */; }; 58D889BA28DDF53500583FA8 /* OutputOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58059DDD28468158002B1049 /* OutputOperation.swift */; }; @@ -269,14 +269,8 @@ 58E0A98827C8F46300FE6BDD /* Tunnel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E0A98727C8F46300FE6BDD /* Tunnel.swift */; }; 58E20771274672CA00DE5D77 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E20770274672CA00DE5D77 /* LaunchViewController.swift */; }; 58E25F812837BBBB002CFB2C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E25F802837BBBB002CFB2C /* SceneDelegate.swift */; }; - 58E511E128DDB7F100B0BCDE /* WrappingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E028DDB7F100B0BCDE /* WrappingError.swift */; }; - 58E511E228DDB7FB00B0BCDE /* WrappingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E028DDB7F100B0BCDE /* WrappingError.swift */; }; - 58E511E428DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E328DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift */; }; 58E511E628DDDEAC00B0BCDE /* CodingErrors+CustomErrorDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E528DDDEAC00B0BCDE /* CodingErrors+CustomErrorDescription.swift */; }; - 58E511E728DDDF1C00B0BCDE /* CustomErrorDescriptionProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E328DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift */; }; 58E511E828DDDF2400B0BCDE /* CodingErrors+CustomErrorDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511E528DDDEAC00B0BCDE /* CodingErrors+CustomErrorDescription.swift */; }; - 58E511EB28DDE18400B0BCDE /* Error+Chain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511EA28DDE18400B0BCDE /* Error+Chain.swift */; }; - 58E511EC28DDE18400B0BCDE /* Error+Chain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E511EA28DDE18400B0BCDE /* Error+Chain.swift */; }; 58E6771F24ADFE7800AA26E7 /* SettingsNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */; }; 58EE2E3A272FF814003BFF93 /* SettingsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EE2E38272FF814003BFF93 /* SettingsDataSource.swift */; }; 58EE2E3B272FF814003BFF93 /* SettingsDataSourceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EE2E39272FF814003BFF93 /* SettingsDataSourceDelegate.swift */; }; @@ -296,11 +290,8 @@ 58F8AC0E25D3F8CE002BE0ED /* ProblemReportReviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F8AC0D25D3F8CE002BE0ED /* ProblemReportReviewViewController.swift */; }; 58F97A1B280EEBC00050C2FC /* RESTProxyFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F97A1A280EEBC00050C2FC /* RESTProxyFactory.swift */; }; 58F97A1E280FDE230050C2FC /* RESTRequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58F97A1D280FDE230050C2FC /* RESTRequestHandler.swift */; }; - 58FAEDF4245088B300CB0F5B /* KeychainError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58AEEF642344A36000C9BBD5 /* KeychainError.swift */; }; 58FB865526E8BF3100F188BC /* AppStorePaymentManagerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FB865426E8BF3100F188BC /* AppStorePaymentManagerError.swift */; }; 58FB865A26EA214400F188BC /* RelayCacheObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FB865926EA214400F188BC /* RelayCacheObserver.swift */; }; - 58FB865E26EA284E00F188BC /* LogFormatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FB865D26EA284E00F188BC /* LogFormatting.swift */; }; - 58FB865F26EA2E6D00F188BC /* LogFormatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FB865D26EA284E00F188BC /* LogFormatting.swift */; }; 58FC040A27B3EE03001C21F0 /* TunnelMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FC040927B3EE03001C21F0 /* TunnelMonitor.swift */; }; 58FD5BE724192A2C00112C88 /* AppStoreReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FD5BE624192A2B00112C88 /* AppStoreReceipt.swift */; }; 58FD5BF024238EB300112C88 /* SKProduct+Formatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FD5BEF24238EB300112C88 /* SKProduct+Formatting.swift */; }; @@ -373,6 +364,24 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 581943D428F800C900B0CB5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 581943EF28F8014500B0CB5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 58CE5E85224146470008646E /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -421,16 +430,21 @@ 580F8B8228197881002E0998 /* TunnelSettingsV2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelSettingsV2.swift; sourceTree = "<group>"; }; 580F8B8528197958002E0998 /* DNSSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNSSettings.swift; sourceTree = "<group>"; }; 5811DE4F239014550011EB53 /* NEVPNStatus+Debug.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NEVPNStatus+Debug.swift"; sourceTree = "<group>"; }; - 5815039324D6EB7200C9C50E /* LogRotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogRotation.swift; sourceTree = "<group>"; }; - 5815039624D6ECAE00C9C50E /* CustomFormatLogHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomFormatLogHandler.swift; sourceTree = "<group>"; }; - 5815039C24D6ECE600C9C50E /* TextFileOutputStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFileOutputStream.swift; sourceTree = "<group>"; }; - 581503A224D6F1EC00C9C50E /* Logger+Errors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Logger+Errors.swift"; sourceTree = "<group>"; }; - 581503A524D6F4AE00C9C50E /* Logging.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logging.swift; sourceTree = "<group>"; }; 58161C9B28352F850028ECFD /* MigrateSettingsOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigrateSettingsOperation.swift; sourceTree = "<group>"; }; 581813A028E09DBB002817DE /* NoCancelledDependenciesCondition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoCancelledDependenciesCondition.swift; sourceTree = "<group>"; }; 581813A228E09DCD002817DE /* NoFailedDependenciesCondition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoFailedDependenciesCondition.swift; sourceTree = "<group>"; }; 581813A428E09DE2002817DE /* BlockCondition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockCondition.swift; sourceTree = "<group>"; }; 581813A628E09DF2002817DE /* MutuallyExclusive.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutuallyExclusive.swift; sourceTree = "<group>"; }; + 581943D628F800C900B0CB5E /* libMullvadLogging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMullvadLogging.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 581943DD28F8010300B0CB5E /* LogRotation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogRotation.swift; sourceTree = "<group>"; }; + 581943DE28F8010300B0CB5E /* TextFileOutputStream.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextFileOutputStream.swift; sourceTree = "<group>"; }; + 581943DF28F8010300B0CB5E /* Logging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logging.swift; sourceTree = "<group>"; }; + 581943E028F8010300B0CB5E /* Logger+Errors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Logger+Errors.swift"; sourceTree = "<group>"; }; + 581943E128F8010300B0CB5E /* Error+LogFormat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Error+LogFormat.swift"; sourceTree = "<group>"; }; + 581943E228F8010400B0CB5E /* Date+LogFormat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+LogFormat.swift"; sourceTree = "<group>"; }; + 581943E328F8010400B0CB5E /* CustomFormatLogHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomFormatLogHandler.swift; sourceTree = "<group>"; }; + 581943E428F8010400B0CB5E /* OSLogHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSLogHandler.swift; sourceTree = "<group>"; }; + 581943F128F8014500B0CB5E /* libMullvadTypes.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMullvadTypes.a; sourceTree = BUILT_PRODUCTS_DIR; }; 5819C2132726CC8D00D6EC38 /* DataSourceSnapshotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataSourceSnapshotTests.swift; sourceTree = "<group>"; }; 5819C2162729595500D6EC38 /* SettingsAddDNSEntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAddDNSEntryCell.swift; sourceTree = "<group>"; }; 5820674D26E6510200655B05 /* REST.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = REST.swift; sourceTree = "<group>"; }; @@ -443,7 +457,6 @@ 58218E1428B65058000C624F /* IPv4Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPv4Header.h; sourceTree = "<group>"; }; 58218E1528B650C1000C624F /* ObjCBridgingHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjCBridgingHeader.h; sourceTree = "<group>"; }; 58218E1628B65396000C624F /* ICMPHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ICMPHeader.h; sourceTree = "<group>"; }; - 5823FA4F26CA690600283BF8 /* OSLogHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSLogHandler.swift; sourceTree = "<group>"; }; 5823FA5326CE49F600283BF8 /* TunnelObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelObserver.swift; sourceTree = "<group>"; }; 58293FAC2510CA58005D0BB5 /* ProblemReportViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProblemReportViewController.swift; sourceTree = "<group>"; }; 58293FB025124117005D0BB5 /* CustomTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextField.swift; sourceTree = "<group>"; }; @@ -640,7 +653,6 @@ 58F97A1D280FDE230050C2FC /* RESTRequestHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RESTRequestHandler.swift; sourceTree = "<group>"; }; 58FB865426E8BF3100F188BC /* AppStorePaymentManagerError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStorePaymentManagerError.swift; sourceTree = "<group>"; }; 58FB865926EA214400F188BC /* RelayCacheObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayCacheObserver.swift; sourceTree = "<group>"; }; - 58FB865D26EA284E00F188BC /* LogFormatting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogFormatting.swift; sourceTree = "<group>"; }; 58FC040927B3EE03001C21F0 /* TunnelMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelMonitor.swift; sourceTree = "<group>"; }; 58FD5BE624192A2B00112C88 /* AppStoreReceipt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStoreReceipt.swift; sourceTree = "<group>"; }; 58FD5BEF24238EB300112C88 /* SKProduct+Formatting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SKProduct+Formatting.swift"; sourceTree = "<group>"; }; @@ -661,6 +673,22 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 581943D328F800C900B0CB5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 585C6F4C28F80745005196BE /* Logging in Frameworks */, + 581943F828F8019C00B0CB5E /* libMullvadTypes.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 581943EE28F8014500B0CB5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 589A454F28E094B300565204 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -675,7 +703,6 @@ files = ( 58D889B328DDF4B400583FA8 /* libOperations.a in Frameworks */, 583E1E2C2848E1A1004838B3 /* WireGuardKitTypes in Frameworks */, - 584789EC2652A1A2000E45FB /* Logging in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -683,9 +710,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 58AC829428F803A200181C40 /* libMullvadLogging.a in Frameworks */, + 58AC829528F803A200181C40 /* libMullvadTypes.a in Frameworks */, 5818139F28E09BD8002817DE /* libOperations.a in Frameworks */, 5807483B27DB8A980020ECBF /* WireGuardKitTypes in Frameworks */, - 585834F824D2BC1F00A8AF56 /* Logging in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -693,7 +721,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 585834FC24D2BC9500A8AF56 /* Logging in Frameworks */, + 58AC829628F803A700181C40 /* libMullvadLogging.a in Frameworks */, + 58AC829728F803A700181C40 /* libMullvadTypes.a in Frameworks */, 58BA791B2578F092006FAEA0 /* WireGuardKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -743,18 +772,29 @@ path = SettingsManager; sourceTree = "<group>"; }; - 5815039F24D6ECF200C9C50E /* Logging */ = { + 581943D728F800C900B0CB5E /* MullvadLogging */ = { + isa = PBXGroup; + children = ( + 581943E328F8010400B0CB5E /* CustomFormatLogHandler.swift */, + 581943E228F8010400B0CB5E /* Date+LogFormat.swift */, + 581943E128F8010300B0CB5E /* Error+LogFormat.swift */, + 581943E028F8010300B0CB5E /* Logger+Errors.swift */, + 581943DF28F8010300B0CB5E /* Logging.swift */, + 581943DD28F8010300B0CB5E /* LogRotation.swift */, + 581943E428F8010400B0CB5E /* OSLogHandler.swift */, + 581943DE28F8010300B0CB5E /* TextFileOutputStream.swift */, + ); + path = MullvadLogging; + sourceTree = "<group>"; + }; + 581943F228F8014500B0CB5E /* MullvadTypes */ = { isa = PBXGroup; children = ( - 581503A224D6F1EC00C9C50E /* Logger+Errors.swift */, - 5815039624D6ECAE00C9C50E /* CustomFormatLogHandler.swift */, - 58FB865D26EA284E00F188BC /* LogFormatting.swift */, - 581503A524D6F4AE00C9C50E /* Logging.swift */, - 5815039324D6EB7200C9C50E /* LogRotation.swift */, - 5823FA4F26CA690600283BF8 /* OSLogHandler.swift */, - 5815039C24D6ECE600C9C50E /* TextFileOutputStream.swift */, + 58E511E028DDB7F100B0BCDE /* WrappingError.swift */, + 58E511E328DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift */, + 58E511EA28DDE18400B0BCDE /* Error+Chain.swift */, ); - path = Logging; + path = MullvadTypes; sourceTree = "<group>"; }; 5823FA5726CE4A4100283BF8 /* TunnelManager */ = { @@ -914,6 +954,8 @@ 58CE5E62224146200008646E /* MullvadVPN */, 58D0C79423F1CE7000FE9BA7 /* MullvadVPNScreenshots */, 58B0A2A1238EE67E00BC001D /* MullvadVPNTests */, + 581943D728F800C900B0CB5E /* MullvadLogging */, + 581943F228F8014500B0CB5E /* MullvadTypes */, 58E5126628DDF04200B0BCDE /* Operations */, 589A455328E094B300565204 /* OperationsTests */, 58CE5E7A224146470008646E /* PacketTunnel */, @@ -930,6 +972,8 @@ 58D0C79323F1CE7000FE9BA7 /* MullvadVPNScreenshots.xctest */, 58E5126528DDF04200B0BCDE /* libOperations.a */, 589A455228E094B300565204 /* OperationsTests.xctest */, + 581943D628F800C900B0CB5E /* libMullvadLogging.a */, + 581943F128F8014500B0CB5E /* libMullvadTypes.a */, ); name = Products; sourceTree = "<group>"; @@ -961,7 +1005,6 @@ 58CCA00F224249A1004F3011 /* ConnectViewController.swift */, 5871FB95254ADE4E0051A0A4 /* ConsolidatedApplicationLog.swift */, 5896AE83246D5889005B36CB /* CustomDateComponentsFormatting.swift */, - 58E511E328DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift */, 582BB1B0229569620055B6EF /* CustomNavigationBar.swift */, 58293FB625138B88005D0BB5 /* CustomNavigationController.swift */, 5868BD32261DCD2600E6027F /* CustomSplitViewController.swift */, @@ -978,7 +1021,6 @@ 58B9EB142489139B00095626 /* DisplayChainedError.swift */, 580F8B8528197958002E0998 /* DNSSettings.swift */, 5892A45D265FABFF00890742 /* EmptyTableViewHeaderFooterView.swift */, - 58E511EA28DDE18400B0BCDE /* Error+Chain.swift */, 58FEEB45260A028D00A621A8 /* GeoJSON.swift */, 58B3F30E2742708B00A2DD38 /* HeaderBarButton.swift */, 58F3C0A3249CB069003E76BE /* HeaderBarView.swift */, @@ -993,7 +1035,6 @@ 58E20770274672CA00DE5D77 /* LaunchViewController.swift */, 58A1AA8623F43901009F7EA6 /* Location.swift */, 583DA21325FA4B5C00318683 /* LocationDataSource.swift */, - 5815039F24D6ECF200C9C50E /* Logging */, 58B993B02608A34500BA7811 /* LoginContentView.swift */, 58CE5E65224146200008646E /* LoginViewController.swift */, 5840250322B11AB700E4CFEC /* MullvadEndpoint.swift */, @@ -1064,7 +1105,6 @@ 58CCA0152242560B004F3011 /* UIColor+Palette.swift */, 585CA70E25F8C44600B47C62 /* UIMetrics.swift */, 58F7CA872692E34000FC59FD /* WireguardKeysContentView.swift */, - 58E511E028DDB7F100B0BCDE /* WrappingError.swift */, ); path = MullvadVPN; sourceTree = "<group>"; @@ -1180,6 +1220,43 @@ /* End PBXLegacyTarget section */ /* Begin PBXNativeTarget section */ + 581943D528F800C900B0CB5E /* MullvadLogging */ = { + isa = PBXNativeTarget; + buildConfigurationList = 581943DC28F800C900B0CB5E /* Build configuration list for PBXNativeTarget "MullvadLogging" */; + buildPhases = ( + 581943D228F800C900B0CB5E /* Sources */, + 581943D328F800C900B0CB5E /* Frameworks */, + 581943D428F800C900B0CB5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MullvadLogging; + packageProductDependencies = ( + 585C6F4B28F80745005196BE /* Logging */, + ); + productName = MullvadLogging; + productReference = 581943D628F800C900B0CB5E /* libMullvadLogging.a */; + productType = "com.apple.product-type.library.static"; + }; + 581943F028F8014500B0CB5E /* MullvadTypes */ = { + isa = PBXNativeTarget; + buildConfigurationList = 581943F528F8014500B0CB5E /* Build configuration list for PBXNativeTarget "MullvadTypes" */; + buildPhases = ( + 581943ED28F8014500B0CB5E /* Sources */, + 581943EE28F8014500B0CB5E /* Frameworks */, + 581943EF28F8014500B0CB5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MullvadTypes; + productName = MullvadTypes; + productReference = 581943F128F8014500B0CB5E /* libMullvadTypes.a */; + productType = "com.apple.product-type.library.static"; + }; 589A455128E094B300565204 /* OperationsTests */ = { isa = PBXNativeTarget; buildConfigurationList = 589A455928E094B300565204 /* Build configuration list for PBXNativeTarget "OperationsTests" */; @@ -1214,7 +1291,6 @@ ); name = MullvadVPNTests; packageProductDependencies = ( - 584789EB2652A1A2000E45FB /* Logging */, 583E1E2B2848E1A1004838B3 /* WireGuardKitTypes */, ); productName = MullvadVPNTests; @@ -1238,7 +1314,6 @@ ); name = MullvadVPN; packageProductDependencies = ( - 585834F724D2BC1F00A8AF56 /* Logging */, 5807483A27DB8A980020ECBF /* WireGuardKitTypes */, ); productName = MullvadVPN; @@ -1260,7 +1335,6 @@ ); name = PacketTunnel; packageProductDependencies = ( - 585834FB24D2BC9500A8AF56 /* Logging */, 58BA791A2578F092006FAEA0 /* WireGuardKit */, ); productName = PacketTunnel; @@ -1312,6 +1386,13 @@ LastUpgradeCheck = 1400; ORGANIZATIONNAME = "Mullvad VPN AB"; TargetAttributes = { + 581943D528F800C900B0CB5E = { + CreatedOnToolsVersion = 14.0.1; + LastSwiftMigration = 1400; + }; + 581943F028F8014500B0CB5E = { + CreatedOnToolsVersion = 14.0.1; + }; 589A455128E094B300565204 = { CreatedOnToolsVersion = 14.0.1; }; @@ -1375,6 +1456,8 @@ 58D0C79223F1CE7000FE9BA7 /* MullvadVPNScreenshots */, 58E5126428DDF04200B0BCDE /* Operations */, 589A455128E094B300565204 /* OperationsTests */, + 581943D528F800C900B0CB5E /* MullvadLogging */, + 581943F028F8014500B0CB5E /* MullvadTypes */, ); }; /* End PBXProject section */ @@ -1427,6 +1510,31 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 581943D228F800C900B0CB5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 581943EB28F8010400B0CB5E /* CustomFormatLogHandler.swift in Sources */, + 581943E528F8010400B0CB5E /* LogRotation.swift in Sources */, + 581943EA28F8010400B0CB5E /* Date+LogFormat.swift in Sources */, + 581943E728F8010400B0CB5E /* Logging.swift in Sources */, + 581943E828F8010400B0CB5E /* Logger+Errors.swift in Sources */, + 581943E628F8010400B0CB5E /* TextFileOutputStream.swift in Sources */, + 581943E928F8010400B0CB5E /* Error+LogFormat.swift in Sources */, + 581943EC28F8010400B0CB5E /* OSLogHandler.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 581943ED28F8014500B0CB5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 581943FC28F8020500B0CB5E /* Error+Chain.swift in Sources */, + 581943FB28F801D500B0CB5E /* CustomErrorDescriptionProtocol.swift in Sources */, + 581943FA28F801B500B0CB5E /* WrappingError.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 589A454E28E094B300565204 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1442,30 +1550,27 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 582AE3122440CA0D00E6733A /* AccountTokenInputTests.swift in Sources */, + 582A8A3A28BCE19B00D0F9FB /* FixedWidthIntegerArithmeticsTests.swift in Sources */, + 5896AE86246D6AD8005B36CB /* CustomDateComponentsFormattingTests.swift in Sources */, + 5819C2142726CC8D00D6EC38 /* DataSourceSnapshotTests.swift in Sources */, + 5807E2C2243203D000F5FF30 /* StringTests.swift in Sources */, 582AE3132440CA2700E6733A /* AccountTokenInput.swift in Sources */, - 58CAF4EF26025954007C5886 /* SimulatorTunnelProvider.swift in Sources */, 58B0A2AA238EE6A900BC001D /* RelaySelector.swift in Sources */, - 5896AE86246D6AD8005B36CB /* CustomDateComponentsFormattingTests.swift in Sources */, 5807E2C3243203E700F5FF30 /* String+Split.swift in Sources */, 58B0A2A8238EE68200BC001D /* RelaySelectorTests.swift in Sources */, 5819C2152726CC9400D6EC38 /* DataSourceSnapshot.swift in Sources */, 584E96BE240FD4DB00D3334F /* Location.swift in Sources */, - 585DA8A626B14F5100B8C587 /* SSLPinningURLSessionDelegate.swift in Sources */, 582A8A3B28BCE1AB00D0F9FB /* FixedWidthInteger+Arithmetics.swift in Sources */, 58B0A2AC238EE6D500BC001D /* IPAddress+Codable.swift in Sources */, 58B0A2AD238EE6EC00BC001D /* MullvadEndpoint.swift in Sources */, - 58FAEDF4245088B300CB0F5B /* KeychainError.swift in Sources */, 5896AE88246D7FAF005B36CB /* CustomDateComponentsFormatting.swift in Sources */, - 582AE3122440CA0D00E6733A /* AccountTokenInputTests.swift in Sources */, - 582A8A3A28BCE19B00D0F9FB /* FixedWidthIntegerArithmeticsTests.swift in Sources */, 58B0A2A9238EE6A100BC001D /* RelayConstraints.swift in Sources */, - 5807E2C2243203D000F5FF30 /* StringTests.swift in Sources */, - 5819C2142726CC8D00D6EC38 /* DataSourceSnapshotTests.swift in Sources */, 585DA8A326B14E0D00B8C587 /* ServerRelaysResponse.swift in Sources */, - 58A8D1D72892D3D60065405D /* PacketTunnelStatus.swift in Sources */, 5820676226E75D8500655B05 /* REST.swift in Sources */, 58A8055E2716EA6700681642 /* AnyIPAddress.swift in Sources */, - 58A8BE81239FBE62006B74AC /* IPEndpoint.swift in Sources */, + 5804BEBD28F811F600B49CA5 /* PacketTunnelStatus.swift in Sources */, + 5804BEBE28F8121300B49CA5 /* IPEndpoint.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1515,7 +1620,6 @@ E158B360285381C60002F069 /* StringFormatter.swift in Sources */, 582BB1B1229569620055B6EF /* CustomNavigationBar.swift in Sources */, 58B3F30F2742708B00A2DD38 /* HeaderBarButton.swift in Sources */, - 58E511E428DDDE8900B0BCDE /* CustomErrorDescriptionProtocol.swift in Sources */, 584789E026529D72000E45FB /* SSLPinningURLSessionDelegate.swift in Sources */, 58161C9C28352F850028ECFD /* MigrateSettingsOperation.swift in Sources */, E1187ABF289BE76F0024E748 /* RESTCreateApplePaymentResponse+Localization.swift in Sources */, @@ -1571,19 +1675,16 @@ 58781CC922AE7CA8009B9D8E /* RelayConstraints.swift in Sources */, 584E96BC240FD4DA00D3334F /* Location.swift in Sources */, 58554F73280AFA5A00013055 /* RESTAuthenticationProxy.swift in Sources */, - 581503A124D6F01F00C9C50E /* LogRotation.swift in Sources */, 58E25F812837BBBB002CFB2C /* SceneDelegate.swift in Sources */, 585E820327F3285E00939F0E /* SendAppStoreReceiptOperation.swift in Sources */, 584B17AB27637DE40057F3B8 /* ReconnectTunnelOperation.swift in Sources */, 5820676426E771DB00655B05 /* TunnelManagerErrors.swift in Sources */, 585B4B8726D9098900555C4C /* TunnelStatusNotificationProvider.swift in Sources */, - 58E511E128DDB7F100B0BCDE /* WrappingError.swift in Sources */, 58FEAFB92750DA2F003C1625 /* AddressCache.swift in Sources */, 58B67B482602079E008EF58E /* RelaySelector.swift in Sources */, 58DF28A52417CB4B00E836B0 /* AppStorePaymentManager.swift in Sources */, 583DA21425FA4B5C00318683 /* LocationDataSource.swift in Sources */, 587EB6742714520600123C75 /* PreferencesDataSourceDelegate.swift in Sources */, - 5878BA1426DD0B01004147D7 /* OSLogHandler.swift in Sources */, 582BB1AF229566420055B6EF /* SettingsCell.swift in Sources */, 58F3C0A4249CB069003E76BE /* HeaderBarView.swift in Sources */, 587A01FC23F1F0BE00B68763 /* SimulatorTunnelProviderHost.swift in Sources */, @@ -1604,8 +1705,6 @@ 5835B7CC233B76CB0096D79F /* TunnelManager.swift in Sources */, 58B93A1326C3F13600A55733 /* TunnelState.swift in Sources */, 58FEEB46260A028D00A621A8 /* GeoJSON.swift in Sources */, - 5815039724D6ECAE00C9C50E /* CustomFormatLogHandler.swift in Sources */, - 5815039D24D6ECE600C9C50E /* TextFileOutputStream.swift in Sources */, 063687B028EB083800BE7161 /* ProxyURLRequest.swift in Sources */, 753D6C0C28B4BF3E0052D9E1 /* ShortcutsManager.swift in Sources */, 58CE5E64224146200008646E /* AppDelegate.swift in Sources */, @@ -1617,7 +1716,6 @@ 58421032282E42B000F24E46 /* UpdateDeviceDataOperation.swift in Sources */, 58AEEF652344A36000C9BBD5 /* KeychainError.swift in Sources */, 5872631D283F755900E14ADF /* IntentHandlers.swift in Sources */, - 581503A624D6F4AE00C9C50E /* Logging.swift in Sources */, 58CCA01222424D11004F3011 /* SettingsViewController.swift in Sources */, 580F8B8628197958002E0998 /* DNSSettings.swift in Sources */, 58FB865526E8BF3100F188BC /* AppStorePaymentManagerError.swift in Sources */, @@ -1629,7 +1727,6 @@ 063687B528EB22E000BE7161 /* RESTTransport.swift in Sources */, 58554F79280B037400013055 /* RESTAccessTokenManager.swift in Sources */, 75FD0C2328B109860021E33E /* ShortcutsDataSourceDelegate.swift in Sources */, - 58E511EB28DDE18400B0BCDE /* Error+Chain.swift in Sources */, 58421034282E4B1500F24E46 /* TunnelSettingsV2+REST.swift in Sources */, 58F2E144276A13F300A79513 /* StartTunnelOperation.swift in Sources */, 5868BD33261DCD2600E6027F /* CustomSplitViewController.swift in Sources */, @@ -1640,7 +1737,6 @@ 584EBDBD2747C98F00A0C9FD /* NSAttributedString+Markdown.swift in Sources */, 5875960A26F371FC00BF6711 /* Tunnel+Messaging.swift in Sources */, 063687B828EB231900BE7161 /* URLSessionTransport.swift in Sources */, - 58FB865E26EA284E00F188BC /* LogFormatting.swift in Sources */, 585DA88726B0277200B8C587 /* RESTError.swift in Sources */, 063687BA28EB234F00BE7161 /* PacketTunnelTransport.swift in Sources */, 58293FB725138B88005D0BB5 /* CustomNavigationController.swift in Sources */, @@ -1648,7 +1744,6 @@ 585DA87726B024A600B8C587 /* CachedRelays.swift in Sources */, 5896AE84246D5889005B36CB /* CustomDateComponentsFormatting.swift in Sources */, 587AD7C623421D7000E93A53 /* TunnelSettingsV1.swift in Sources */, - 581503A324D6F1EC00C9C50E /* Logger+Errors.swift in Sources */, 58E20771274672CA00DE5D77 /* LaunchViewController.swift in Sources */, 584D26C4270C855B004EA533 /* PreferencesDataSource.swift in Sources */, 58B5A899280AB0D7009FDE99 /* RESTAuthorization.swift in Sources */, @@ -1671,7 +1766,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 58FB865F26EA2E6D00F188BC /* LogFormatting.swift in Sources */, 587C575426D2615F005EF767 /* PacketTunnelOptions.swift in Sources */, 58BFA5CD22A7CE1F00A6173D /* ApplicationConfiguration.swift in Sources */, 5820675826E652AF00655B05 /* RelayCacheIO.swift in Sources */, @@ -1680,7 +1774,6 @@ 5806767C27048E9B00C858CB /* PacketTunnelProvider.swift in Sources */, 585DA89426B0323E00B8C587 /* TunnelProviderMessage.swift in Sources */, 587AD7C723421D8600E93A53 /* TunnelSettingsV1.swift in Sources */, - 58E511EC28DDE18400B0BCDE /* Error+Chain.swift in Sources */, 58AEEF662344A37400C9BBD5 /* KeychainError.swift in Sources */, 58CE38C828992C9200A6D6E5 /* TunnelMonitorDelegate.swift in Sources */, 5840250222B1124600E4CFEC /* IPAddress+Codable.swift in Sources */, @@ -1688,32 +1781,24 @@ 5838318B27C40A3900000571 /* Pinger.swift in Sources */, 5820675C26E6576800655B05 /* RelayCache.swift in Sources */, 585DA89A26B0329200B8C587 /* PacketTunnelStatus.swift in Sources */, - 58E511E228DDB7FB00B0BCDE /* WrappingError.swift in Sources */, 585DA88526B0270700B8C587 /* ServerRelaysResponse.swift in Sources */, - 581503A724D6F4AE00C9C50E /* Logging.swift in Sources */, 58E0729D28814AAE008902F8 /* PacketTunnelConfiguration.swift in Sources */, 58E0729F28814ACC008902F8 /* WireGuardLogLevel+Logging.swift in Sources */, 580F8B8428197884002E0998 /* TunnelSettingsV2.swift in Sources */, - 581503A424D6F1EC00C9C50E /* Logger+Errors.swift in Sources */, - 58E511E728DDDF1C00B0BCDE /* CustomErrorDescriptionProtocol.swift in Sources */, - 5815039824D6ECAE00C9C50E /* CustomFormatLogHandler.swift in Sources */, 5840250522B11AB700E4CFEC /* MullvadEndpoint.swift in Sources */, 58906DE02445C7A5002F0673 /* NEProviderStopReason+Debug.swift in Sources */, 589E63D728F7161F005FAB05 /* RESTURLSession.swift in Sources */, 580F8B872819795C002E0998 /* DNSSettings.swift in Sources */, - 5815039E24D6ECE600C9C50E /* TextFileOutputStream.swift in Sources */, 585DA87826B024A900B8C587 /* CachedRelays.swift in Sources */, 58E072A128814B0E008902F8 /* MullvadEndpoint+WgEndpoint.swift in Sources */, 584E96BD240FD4DA00D3334F /* Location.swift in Sources */, 063687B228EB083F00BE7161 /* ProxyURLRequest.swift in Sources */, - 58D67A0A26D7AE3300557C3C /* OSLogHandler.swift in Sources */, 589E63D828F71626005FAB05 /* SSLPinningURLSessionDelegate.swift in Sources */, 5820675626E6528A00655B05 /* RESTError.swift in Sources */, 58900D0328BBDCC70094E4F0 /* FixedWidthInteger+Arithmetics.swift in Sources */, 58561C9A239A5D1500BD6B5E /* IPEndpoint.swift in Sources */, 58A3BDB028A1821A00C8C2C6 /* WgStats.swift in Sources */, 58781CCE22AE8918009B9D8E /* RelayConstraints.swift in Sources */, - 581503A024D6F01E00C9C50E /* LogRotation.swift in Sources */, 58781CD522AFBA39009B9D8E /* RelaySelector.swift in Sources */, 5877D70F282137E8002FCFC7 /* SettingsManager.swift in Sources */, 58CE38C728992C8700A6D6E5 /* WireGuardAdapterError+Localization.swift in Sources */, @@ -1813,6 +1898,79 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 581943DA28F800C900B0CB5E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = CKG9MXH72F; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 581943DB28F800C900B0CB5E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = CKG9MXH72F; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 581943F628F8014500B0CB5E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = CKG9MXH72F; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 581943F728F8014500B0CB5E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = CKG9MXH72F; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 589A455A28E094B300565204 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2185,6 +2343,24 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 581943DC28F800C900B0CB5E /* Build configuration list for PBXNativeTarget "MullvadLogging" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 581943DA28F800C900B0CB5E /* Debug */, + 581943DB28F800C900B0CB5E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 581943F528F8014500B0CB5E /* Build configuration list for PBXNativeTarget "MullvadTypes" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 581943F628F8014500B0CB5E /* Debug */, + 581943F728F8014500B0CB5E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 589A455928E094B300565204 /* Build configuration list for PBXNativeTarget "OperationsTests" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -2289,17 +2465,7 @@ package = 58BA79192578F092006FAEA0 /* XCRemoteSwiftPackageReference "wireguard-apple" */; productName = WireGuardKitTypes; }; - 584789EB2652A1A2000E45FB /* Logging */ = { - isa = XCSwiftPackageProductDependency; - package = 585834F624D2BC1F00A8AF56 /* XCRemoteSwiftPackageReference "swift-log" */; - productName = Logging; - }; - 585834F724D2BC1F00A8AF56 /* Logging */ = { - isa = XCSwiftPackageProductDependency; - package = 585834F624D2BC1F00A8AF56 /* XCRemoteSwiftPackageReference "swift-log" */; - productName = Logging; - }; - 585834FB24D2BC9500A8AF56 /* Logging */ = { + 585C6F4B28F80745005196BE /* Logging */ = { isa = XCSwiftPackageProductDependency; package = 585834F624D2BC1F00A8AF56 /* XCRemoteSwiftPackageReference "swift-log" */; productName = Logging; diff --git a/ios/MullvadVPN/AccountInputGroupView.swift b/ios/MullvadVPN/AccountInputGroupView.swift index 3644069c6c..e70be56f96 100644 --- a/ios/MullvadVPN/AccountInputGroupView.swift +++ b/ios/MullvadVPN/AccountInputGroupView.swift @@ -6,7 +6,7 @@ // Copyright © 2019 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import UIKit private let accountInputGroupViewAnimationDuration: TimeInterval = 0.25 diff --git a/ios/MullvadVPN/AccountViewController.swift b/ios/MullvadVPN/AccountViewController.swift index c55d503619..148a6352ce 100644 --- a/ios/MullvadVPN/AccountViewController.swift +++ b/ios/MullvadVPN/AccountViewController.swift @@ -6,7 +6,7 @@ // Copyright © 2019 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import Operations import StoreKit import UIKit diff --git a/ios/MullvadVPN/AddressCache/AddressCacheStore.swift b/ios/MullvadVPN/AddressCache/AddressCacheStore.swift index 57e5a9bed8..aed04fd59b 100644 --- a/ios/MullvadVPN/AddressCache/AddressCacheStore.swift +++ b/ios/MullvadVPN/AddressCache/AddressCacheStore.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging extension AddressCache { struct CachedAddresses: Codable { diff --git a/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift b/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift index e88b14dfe6..56b92d06e3 100644 --- a/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift +++ b/ios/MullvadVPN/AddressCache/AddressCacheTracker.swift @@ -6,7 +6,7 @@ // Copyright © 2021 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import Operations import UIKit diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index 422814b64a..46bd65f1b9 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -8,7 +8,7 @@ import BackgroundTasks import Intents -import Logging +import MullvadLogging import Operations import StoreKit import UIKit @@ -36,7 +36,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - initLoggingSystem(bundleIdentifier: Bundle.main.bundleIdentifier!) + initLoggingSystem( + bundleIdentifier: Bundle.main.bundleIdentifier!, + applicationGroupIdentifier: ApplicationConfiguration.securityGroupIdentifier + ) logger = Logger(label: "AppDelegate") diff --git a/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManager.swift b/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManager.swift index ed5f829fa3..957fe3d621 100644 --- a/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManager.swift +++ b/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManager.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations import StoreKit diff --git a/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManagerError.swift b/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManagerError.swift index f88b6255d4..d7332c7331 100644 --- a/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManagerError.swift +++ b/ios/MullvadVPN/AppStorePaymentManager/AppStorePaymentManagerError.swift @@ -7,6 +7,7 @@ // import Foundation +import MullvadTypes extension AppStorePaymentManager { /// An error type emitted by `AppStorePaymentManager`. diff --git a/ios/MullvadVPN/AppStorePaymentManager/SendAppStoreReceiptOperation.swift b/ios/MullvadVPN/AppStorePaymentManager/SendAppStoreReceiptOperation.swift index 0711817c6e..2dc04af29e 100644 --- a/ios/MullvadVPN/AppStorePaymentManager/SendAppStoreReceiptOperation.swift +++ b/ios/MullvadVPN/AppStorePaymentManager/SendAppStoreReceiptOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations class SendAppStoreReceiptOperation: ResultOperation< diff --git a/ios/MullvadVPN/AutomaticKeyboardResponder.swift b/ios/MullvadVPN/AutomaticKeyboardResponder.swift index 110b2dccc9..443bfc3889 100644 --- a/ios/MullvadVPN/AutomaticKeyboardResponder.swift +++ b/ios/MullvadVPN/AutomaticKeyboardResponder.swift @@ -6,7 +6,7 @@ // Copyright © 2021 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import UIKit class AutomaticKeyboardResponder { diff --git a/ios/MullvadVPN/CodingErrors+CustomErrorDescription.swift b/ios/MullvadVPN/CodingErrors+CustomErrorDescription.swift index 25c65d8b82..2ab52cb8c0 100644 --- a/ios/MullvadVPN/CodingErrors+CustomErrorDescription.swift +++ b/ios/MullvadVPN/CodingErrors+CustomErrorDescription.swift @@ -7,9 +7,10 @@ // import Foundation +import MullvadTypes extension DecodingError: CustomErrorDescriptionProtocol { - var customErrorDescription: String? { + public var customErrorDescription: String? { switch self { case let .typeMismatch(type, context): return "Type mismatch, expected \(type) for key at \"\(context.codingPath.codingPathString)\"." @@ -30,7 +31,7 @@ extension DecodingError: CustomErrorDescriptionProtocol { } extension EncodingError: CustomErrorDescriptionProtocol { - var customErrorDescription: String? { + public var customErrorDescription: String? { switch self { case let .invalidValue(_, context): return "Invalid value at \"\(context.codingPath.codingPathString)\"" diff --git a/ios/MullvadVPN/ConnectViewController.swift b/ios/MullvadVPN/ConnectViewController.swift index 078edaf8f0..71f620d237 100644 --- a/ios/MullvadVPN/ConnectViewController.swift +++ b/ios/MullvadVPN/ConnectViewController.swift @@ -6,8 +6,8 @@ // Copyright © 2019 Mullvad VPN AB. All rights reserved. // -import Logging import MapKit +import MullvadLogging import UIKit class CustomOverlayRenderer: MKOverlayRenderer { diff --git a/ios/MullvadVPN/DeviceManagementViewController.swift b/ios/MullvadVPN/DeviceManagementViewController.swift index 2b9f588c9d..8e78d45d55 100644 --- a/ios/MullvadVPN/DeviceManagementViewController.swift +++ b/ios/MullvadVPN/DeviceManagementViewController.swift @@ -6,7 +6,7 @@ // Copyright © 2022 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import Operations import UIKit diff --git a/ios/MullvadVPN/LoginViewController.swift b/ios/MullvadVPN/LoginViewController.swift index 15ec69535d..1e64fd1663 100644 --- a/ios/MullvadVPN/LoginViewController.swift +++ b/ios/MullvadVPN/LoginViewController.swift @@ -6,7 +6,7 @@ // Copyright © 2019 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import Operations import UIKit diff --git a/ios/MullvadVPN/NotificationManager.swift b/ios/MullvadVPN/NotificationManager.swift index 5838b41d5b..ca29eccabf 100644 --- a/ios/MullvadVPN/NotificationManager.swift +++ b/ios/MullvadVPN/NotificationManager.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import UIKit import UserNotifications diff --git a/ios/MullvadVPN/PreferencesViewController.swift b/ios/MullvadVPN/PreferencesViewController.swift index 4b148a5556..5d70790569 100644 --- a/ios/MullvadVPN/PreferencesViewController.swift +++ b/ios/MullvadVPN/PreferencesViewController.swift @@ -6,7 +6,7 @@ // Copyright © 2021 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import UIKit class PreferencesViewController: UITableViewController, PreferencesDataSourceDelegate, diff --git a/ios/MullvadVPN/REST/RESTAccessTokenManager.swift b/ios/MullvadVPN/REST/RESTAccessTokenManager.swift index b3f91083a4..d40de2ef4b 100644 --- a/ios/MullvadVPN/REST/RESTAccessTokenManager.swift +++ b/ios/MullvadVPN/REST/RESTAccessTokenManager.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations extension REST { diff --git a/ios/MullvadVPN/REST/RESTError.swift b/ios/MullvadVPN/REST/RESTError.swift index d813680a9b..99ce683511 100644 --- a/ios/MullvadVPN/REST/RESTError.swift +++ b/ios/MullvadVPN/REST/RESTError.swift @@ -7,6 +7,7 @@ // import Foundation +import MullvadTypes extension REST { /// An error type returned by REST API classes. diff --git a/ios/MullvadVPN/REST/RESTNetworkOperation.swift b/ios/MullvadVPN/REST/RESTNetworkOperation.swift index 00544390b4..95c54d85c0 100644 --- a/ios/MullvadVPN/REST/RESTNetworkOperation.swift +++ b/ios/MullvadVPN/REST/RESTNetworkOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations extension REST { diff --git a/ios/MullvadVPN/REST/SSLPinningURLSessionDelegate.swift b/ios/MullvadVPN/REST/SSLPinningURLSessionDelegate.swift index e872d69937..3c20995727 100644 --- a/ios/MullvadVPN/REST/SSLPinningURLSessionDelegate.swift +++ b/ios/MullvadVPN/REST/SSLPinningURLSessionDelegate.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Security class SSLPinningURLSessionDelegate: NSObject, URLSessionDelegate { diff --git a/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift b/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift index c997ac7cd4..33a2c7fffd 100644 --- a/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift +++ b/ios/MullvadVPN/RelayCache/RelayCacheTracker.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations import UIKit diff --git a/ios/MullvadVPN/RelaySelector.swift b/ios/MullvadVPN/RelaySelector.swift index 2b2a269c41..ad40b91fc0 100644 --- a/ios/MullvadVPN/RelaySelector.swift +++ b/ios/MullvadVPN/RelaySelector.swift @@ -7,8 +7,6 @@ // import Foundation -import Logging -import Network struct RelaySelectorResult: Codable { var endpoint: MullvadEndpoint @@ -124,7 +122,7 @@ extension RelaySelector { return i == 0 } - precondition(randomRelay != nil, "At least one relay must've had a weight above 0") + assert(randomRelay != nil, "At least one relay must've had a weight above 0") return randomRelay } @@ -147,8 +145,7 @@ extension RelaySelector { } } - let logger = Logger(label: "RelaySelector") - logger.error("Port selection algorithm is broken!") + assertionFailure("Port selection algorithm is broken!") return nil } diff --git a/ios/MullvadVPN/SceneDelegate.swift b/ios/MullvadVPN/SceneDelegate.swift index f87a2ad428..6158b53794 100644 --- a/ios/MullvadVPN/SceneDelegate.swift +++ b/ios/MullvadVPN/SceneDelegate.swift @@ -6,7 +6,7 @@ // Copyright © 2022 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import Operations import UIKit diff --git a/ios/MullvadVPN/SelectLocationViewController.swift b/ios/MullvadVPN/SelectLocationViewController.swift index 5f7652477c..147fc3b54e 100644 --- a/ios/MullvadVPN/SelectLocationViewController.swift +++ b/ios/MullvadVPN/SelectLocationViewController.swift @@ -6,7 +6,7 @@ // Copyright © 2019 Mullvad VPN AB. All rights reserved. // -import Logging +import MullvadLogging import UIKit protocol SelectLocationViewControllerDelegate: AnyObject { diff --git a/ios/MullvadVPN/SettingsManager/SettingsManager.swift b/ios/MullvadVPN/SettingsManager/SettingsManager.swift index cd40ef67d1..9644272f14 100644 --- a/ios/MullvadVPN/SettingsManager/SettingsManager.swift +++ b/ios/MullvadVPN/SettingsManager/SettingsManager.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging enum SettingsManager {} diff --git a/ios/MullvadVPN/ShortcutsManager.swift b/ios/MullvadVPN/ShortcutsManager.swift index 1baa525401..a991c38c65 100644 --- a/ios/MullvadVPN/ShortcutsManager.swift +++ b/ios/MullvadVPN/ShortcutsManager.swift @@ -7,7 +7,7 @@ // import IntentsUI -import Logging +import MullvadLogging protocol ShortcutsManagerDelegate: AnyObject { func shortcutsManager( diff --git a/ios/MullvadVPN/SimulatorTunnelProviderHost.swift b/ios/MullvadVPN/SimulatorTunnelProviderHost.swift index 795743fa1e..00705b902f 100644 --- a/ios/MullvadVPN/SimulatorTunnelProviderHost.swift +++ b/ios/MullvadVPN/SimulatorTunnelProviderHost.swift @@ -9,7 +9,7 @@ #if targetEnvironment(simulator) import Foundation -import Logging +import MullvadLogging import enum NetworkExtension.NEProviderStopReason class SimulatorTunnelProviderHost: SimulatorTunnelProviderDelegate { diff --git a/ios/MullvadVPN/TunnelManager/LoadTunnelConfigurationOperation.swift b/ios/MullvadVPN/TunnelManager/LoadTunnelConfigurationOperation.swift index 91920e9643..441b5b645c 100644 --- a/ios/MullvadVPN/TunnelManager/LoadTunnelConfigurationOperation.swift +++ b/ios/MullvadVPN/TunnelManager/LoadTunnelConfigurationOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations class LoadTunnelConfigurationOperation: ResultOperation<Void, Error> { diff --git a/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift b/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift index 14aacf3c7d..9f2b07ef76 100644 --- a/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift +++ b/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import NetworkExtension import Operations diff --git a/ios/MullvadVPN/TunnelManager/MigrateSettingsOperation.swift b/ios/MullvadVPN/TunnelManager/MigrateSettingsOperation.swift index b22f4a988f..d860e71ef5 100644 --- a/ios/MullvadVPN/TunnelManager/MigrateSettingsOperation.swift +++ b/ios/MullvadVPN/TunnelManager/MigrateSettingsOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations import class WireGuardKitTypes.PrivateKey diff --git a/ios/MullvadVPN/TunnelManager/RotateKeyOperation.swift b/ios/MullvadVPN/TunnelManager/RotateKeyOperation.swift index 78cdc89e31..a4821f3bc4 100644 --- a/ios/MullvadVPN/TunnelManager/RotateKeyOperation.swift +++ b/ios/MullvadVPN/TunnelManager/RotateKeyOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations import class WireGuardKitTypes.PrivateKey diff --git a/ios/MullvadVPN/TunnelManager/SendTunnelProviderMessageOperation.swift b/ios/MullvadVPN/TunnelManager/SendTunnelProviderMessageOperation.swift index 5a31cbd7d1..5fa81f6248 100644 --- a/ios/MullvadVPN/TunnelManager/SendTunnelProviderMessageOperation.swift +++ b/ios/MullvadVPN/TunnelManager/SendTunnelProviderMessageOperation.swift @@ -7,6 +7,7 @@ // import Foundation +import MullvadTypes import NetworkExtension import Operations diff --git a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift index 8231eee9fe..543f809073 100644 --- a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift +++ b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations import class WireGuardKitTypes.PrivateKey import class WireGuardKitTypes.PublicKey diff --git a/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift b/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift index f7ab198463..71210438e5 100644 --- a/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift +++ b/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import NetworkExtension import Operations diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift index 04b55ff204..f487131a1e 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import NetworkExtension import Operations import StoreKit diff --git a/ios/MullvadVPN/TunnelManager/TunnelManagerErrors.swift b/ios/MullvadVPN/TunnelManager/TunnelManagerErrors.swift index 35b804a711..8b5301c0ff 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManagerErrors.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManagerErrors.swift @@ -7,7 +7,7 @@ // import Foundation -import NetworkExtension +import MullvadTypes struct UnsetTunnelError: LocalizedError { var errorDescription: String? { diff --git a/ios/MullvadVPN/TunnelManager/UpdateAccountDataOperation.swift b/ios/MullvadVPN/TunnelManager/UpdateAccountDataOperation.swift index 19543ae469..cf9c490732 100644 --- a/ios/MullvadVPN/TunnelManager/UpdateAccountDataOperation.swift +++ b/ios/MullvadVPN/TunnelManager/UpdateAccountDataOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations class UpdateAccountDataOperation: ResultOperation<Void, Error> { diff --git a/ios/MullvadVPN/TunnelManager/UpdateDeviceDataOperation.swift b/ios/MullvadVPN/TunnelManager/UpdateDeviceDataOperation.swift index 2d8708f795..e914a369e2 100644 --- a/ios/MullvadVPN/TunnelManager/UpdateDeviceDataOperation.swift +++ b/ios/MullvadVPN/TunnelManager/UpdateDeviceDataOperation.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Operations import class WireGuardKitTypes.PublicKey diff --git a/ios/PacketTunnel/PacketTunnelProvider.swift b/ios/PacketTunnel/PacketTunnelProvider.swift index 1c896c5018..4485e8d0df 100644 --- a/ios/PacketTunnel/PacketTunnelProvider.swift +++ b/ios/PacketTunnel/PacketTunnelProvider.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import Network import NetworkExtension import WireGuardKit @@ -67,7 +67,11 @@ class PacketTunnelProvider: NEPacketTunnelProvider, TunnelMonitorDelegate { var metadata = Logger.Metadata() metadata["pid"] = .string("\(pid)") - initLoggingSystem(bundleIdentifier: Bundle.main.bundleIdentifier!, metadata: metadata) + initLoggingSystem( + bundleIdentifier: Bundle.main.bundleIdentifier!, + applicationGroupIdentifier: ApplicationConfiguration.securityGroupIdentifier, + metadata: metadata + ) providerLogger = Logger(label: "PacketTunnelProvider") tunnelLogger = Logger(label: "WireGuard") diff --git a/ios/PacketTunnel/TunnelMonitor/Pinger.swift b/ios/PacketTunnel/TunnelMonitor/Pinger.swift index f063ac51e7..5e5032266a 100644 --- a/ios/PacketTunnel/TunnelMonitor/Pinger.swift +++ b/ios/PacketTunnel/TunnelMonitor/Pinger.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import protocol Network.IPAddress import struct Network.IPv4Address import struct Network.IPv6Address diff --git a/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift b/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift index f9082fa161..00a43108d9 100644 --- a/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift +++ b/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import NetworkExtension import WireGuardKit diff --git a/ios/PacketTunnel/WireGuardLogLevel+Logging.swift b/ios/PacketTunnel/WireGuardLogLevel+Logging.swift index 4a59b8dbfb..c2bdd051ab 100644 --- a/ios/PacketTunnel/WireGuardLogLevel+Logging.swift +++ b/ios/PacketTunnel/WireGuardLogLevel+Logging.swift @@ -7,7 +7,7 @@ // import Foundation -import Logging +import MullvadLogging import WireGuardKit extension WireGuardLogLevel { |
