diff options
| author | mojganii <mojgan.jelodar@codic.se> | 2024-12-02 15:49:28 +0100 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2024-12-03 11:35:30 +0100 |
| commit | 82062e2e21f880dfdd58db07997029b6de967c2b (patch) | |
| tree | 20d05969709305d05a67c46fb573b859c9121f41 /ios/Shared | |
| parent | 8e490385b0b86f5c0998980774566294c4f414e3 (diff) | |
| download | mullvadvpn-82062e2e21f880dfdd58db07997029b6de967c2b.tar.xz mullvadvpn-82062e2e21f880dfdd58db07997029b6de967c2b.zip | |
Fix log redaction loading issue
Diffstat (limited to 'ios/Shared')
| -rw-r--r-- | ios/Shared/LaunchArguments.swift | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ios/Shared/LaunchArguments.swift b/ios/Shared/LaunchArguments.swift index ab75e73b69..e1f3c0ad41 100644 --- a/ios/Shared/LaunchArguments.swift +++ b/ios/Shared/LaunchArguments.swift @@ -7,6 +7,7 @@ // import Foundation +import MullvadTypes public protocol Taggable { static var tag: String { get } @@ -46,7 +47,9 @@ public extension ProcessInfo { extension Encodable { public func toJSON(_ encoder: JSONEncoder = JSONEncoder()) throws -> String { let data = try encoder.encode(self) - let result = String(decoding: data, as: UTF8.self) + guard let result = String(bytes: data, encoding: .utf8) else { + throw StringDecodingError(data: data) + } return result } } |
