summaryrefslogtreecommitdiffhomepage
path: root/ios/Shared
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2024-12-03 12:11:08 +0100
committerBug Magnet <marco.nikic@mullvad.net>2024-12-03 12:11:08 +0100
commit0bc41b3f17287a520370fca4dc05e693bc4ec9bc (patch)
tree30ac32a872ca9a2f5d153784fce3757e8f1c5333 /ios/Shared
parent2aa3a245bd194cf32577eca8bc2092a3c11259e5 (diff)
downloadmullvadvpn-0bc41b3f17287a520370fca4dc05e693bc4ec9bc.tar.xz
mullvadvpn-0bc41b3f17287a520370fca4dc05e693bc4ec9bc.zip
Fix UITest builds
Diffstat (limited to 'ios/Shared')
-rw-r--r--ios/Shared/LaunchArguments.swift6
1 files changed, 4 insertions, 2 deletions
diff --git a/ios/Shared/LaunchArguments.swift b/ios/Shared/LaunchArguments.swift
index e1f3c0ad41..0fa077f090 100644
--- a/ios/Shared/LaunchArguments.swift
+++ b/ios/Shared/LaunchArguments.swift
@@ -7,7 +7,6 @@
//
import Foundation
-import MullvadTypes
public protocol Taggable {
static var tag: String { get }
@@ -48,7 +47,10 @@ extension Encodable {
public func toJSON(_ encoder: JSONEncoder = JSONEncoder()) throws -> String {
let data = try encoder.encode(self)
guard let result = String(bytes: data, encoding: .utf8) else {
- throw StringDecodingError(data: data)
+ throw EncodingError.invalidValue(
+ self,
+ EncodingError.Context(codingPath: [], debugDescription: "Could not encode self to a utf-8 string")
+ )
}
return result
}