From 0f4821b86c9d0708168d89364f36ceb87737ffb8 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Wed, 4 Dec 2024 17:59:16 -0800 Subject: [PATCH] Bump bindings for sync work fix (#445) * update the bindings * make history sync null --- Package.swift | 2 +- Sources/XMTPiOS/Client.swift | 5 +--- Sources/XMTPiOS/XMTPLogger.swift | 29 ------------------- XMTP.podspec | 4 +-- .../xcshareddata/swiftpm/Package.resolved | 4 +-- 5 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 Sources/XMTPiOS/XMTPLogger.swift diff --git a/Package.swift b/Package.swift index 7000c8e0..061a1ade 100644 --- a/Package.swift +++ b/Package.swift @@ -21,7 +21,7 @@ let package = Package( .package(url: "https://github.com/bufbuild/connect-swift", exact: "1.0.0"), .package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.4.3"), .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", exact: "1.8.3"), - .package(url: "https://github.com/xmtp/libxmtp-swift.git", exact: "3.0.9") + .package(url: "https://github.com/xmtp/libxmtp-swift.git", exact: "3.0.10") ], targets: [ .target( diff --git a/Sources/XMTPiOS/Client.swift b/Sources/XMTPiOS/Client.swift index 584d3abe..3c2e546b 100644 --- a/Sources/XMTPiOS/Client.swift +++ b/Sources/XMTPiOS/Client.swift @@ -204,7 +204,6 @@ public final class Client { let dbURL = directoryURL.appendingPathComponent(alias).path let ffiClient = try await LibXMTP.createClient( - logger: XMTPLogger(), host: options.api.env.url, isSecure: options.api.env.isSecure == true, db: dbURL, @@ -213,7 +212,7 @@ public final class Client { accountAddress: address, nonce: 0, legacySignedPrivateKeyProto: nil, - historySyncUrl: options.historySyncUrl + historySyncUrl: nil ) try await options.preAuthenticateToInboxCallback?() @@ -273,7 +272,6 @@ public final class Client { do { inboxId = try await getInboxIdForAddress( - logger: XMTPLogger(), host: api.env.url, isSecure: api.env.isSecure == true, accountAddress: address.lowercased() @@ -299,7 +297,6 @@ public final class Client { let dbURL = directoryURL.appendingPathComponent(alias).path let ffiClient = try await LibXMTP.createClient( - logger: XMTPLogger(), host: api.env.url, isSecure: api.env.isSecure == true, db: dbURL, diff --git a/Sources/XMTPiOS/XMTPLogger.swift b/Sources/XMTPiOS/XMTPLogger.swift deleted file mode 100644 index 0759bf60..00000000 --- a/Sources/XMTPiOS/XMTPLogger.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// Logger.swift -// -// -// Created by Pat Nakajima on 8/28/23. -// - -import Foundation -import LibXMTP -import os - -class XMTPLogger: FfiLogger { - let logger = Logger(subsystem: "XMTP", category: "libxmtp") - - func log(level: UInt32, levelLabel: String, message: String) { - switch level { - case 1: - logger.error("libxmtp[\(levelLabel, privacy: .public)] - \(message, privacy: .public)") - case 2, 3: - logger.info("libxmtp[\(levelLabel, privacy: .public)] - \(message, privacy: .public)") - case 4: - logger.debug("libxmtp[\(levelLabel, privacy: .public)] - \(message, privacy: .public)") - case 5: - logger.trace("libxmtp[\(levelLabel, privacy: .public)] - \(message, privacy: .public)") - default: - print("libxmtp[\(levelLabel)] - \(message)") - } - } -} diff --git a/XMTP.podspec b/XMTP.podspec index 665bda3e..94becff8 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "XMTP" - spec.version = "3.0.13" + spec.version = "3.0.14" spec.summary = "XMTP SDK Cocoapod" spec.description = <<-DESC @@ -22,7 +22,7 @@ Pod::Spec.new do |spec| spec.dependency 'CSecp256k1', '~> 0.2' spec.dependency "Connect-Swift", "= 1.0.0" - spec.dependency 'LibXMTP', '= 3.0.9' + spec.dependency 'LibXMTP', '= 3.0.10' spec.dependency 'CryptoSwift', '= 1.8.3' spec.dependency 'SQLCipher', '= 4.5.7' diff --git a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index b42daae7..80edabbc 100644 --- a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/xmtp/libxmtp-swift.git", "state" : { - "revision" : "082dcb8a270c549c7aa55c2cef59698eae389a49", - "version" : "3.0.9" + "revision" : "bab83b5de3ed4713d50535e61bca281179bf04fd", + "version" : "3.0.10" } }, {