Skip to content

Commit

Permalink
fix: replace deprecated api from swift-protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
YoloMao committed Oct 8, 2024
1 parent 5ae45bc commit 68d309d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Services/SwiftProtobuf/SwiftProtobuf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SwiftProtobufWrapper: NSObject {
@objc(parseFromData:)
public static func parse(from data: Data) -> SwiftProtobufWrapper? {
do {
let dto = try EventDto(serializedData: data)
let dto = try EventDto(serializedBytes: data)
return SwiftProtobufWrapper(dto)
} catch {
return nil
Expand Down Expand Up @@ -171,7 +171,7 @@ public extension SwiftProtobufWrapper {
@objc(convertProtobufDataToJsonArray:)
static func convertProtobufDataToJsonArray(from data: Data) -> [[String: AnyObject]]? {
do {
let list = try EventList(serializedData: data)
let list = try EventList(serializedBytes: data)
var array = [[String: AnyObject]]()
for dto in list.values {
let jsonData = try dto.jsonUTF8Data()
Expand Down

0 comments on commit 68d309d

Please sign in to comment.