diff --git a/Sources/Amplitude/ObjC/ObjCPlugin.swift b/Sources/Amplitude/ObjC/ObjCPlugin.swift index 1d0d916..4fca3f3 100644 --- a/Sources/Amplitude/ObjC/ObjCPlugin.swift +++ b/Sources/Amplitude/ObjC/ObjCPlugin.swift @@ -80,7 +80,7 @@ public class ObjCPlugin: NSObject { public init( type: PluginType, execute: @escaping (ObjCBaseEvent) -> ObjCBaseEvent?, - flush: @escaping() -> Void) + flush: @escaping () -> Void) { self.type = type self.setup = nil diff --git a/Tests/AmplitudeTests/Utilities/HttpClientTests.swift b/Tests/AmplitudeTests/Utilities/HttpClientTests.swift index 63159ac..dee3b56 100644 --- a/Tests/AmplitudeTests/Utilities/HttpClientTests.swift +++ b/Tests/AmplitudeTests/Utilities/HttpClientTests.swift @@ -81,7 +81,7 @@ final class HttpClientTests: XCTestCase { return XCTFail("not getting httpError error") } XCTAssertEqual(code, 400) - XCTAssertTrue(String(decoding: data!, as: UTF8.self).contains("Invalid API key: testApiKey")) + XCTAssertTrue(String(data: data!, encoding: .utf8)!.contains("Invalid API key: testApiKey")) asyncExpectation.fulfill() } _ = XCTWaiter.wait(for: [asyncExpectation], timeout: 5)