Skip to content

Commit

Permalink
Fix UITest builds
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Dec 3, 2024
1 parent 2aa3a24 commit 0bc41b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ios/Shared/LaunchArguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import Foundation
import MullvadTypes

public protocol Taggable {
static var tag: String { get }
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 0bc41b3

Please sign in to comment.