From 8ed7e47bccdeab2219b71a8fa4ab8cfc3fc538a5 Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Tue, 30 Jan 2024 18:33:58 -0800 Subject: [PATCH] Merge pre libxmtp into main (#223) * Add Key Material Function (#222) * add ket material field to ios * bump the podspec * Update podspec LibXMTP ref * Update libxmtp-swift refs * Update libxmtp-swift ref * Updated libxmtp-swift ref to tagged release * Update XMTP.podspec version --------- Co-authored-by: cameronvoell --- Package.swift | 2 +- Sources/XMTPiOS/Conversation.swift | 9 +++++++++ XMTP.podspec | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index ff6bd7a8..22f432b6 100644 --- a/Package.swift +++ b/Package.swift @@ -26,7 +26,7 @@ let package = Package( .package(url: "https://github.com/1024jp/GzipSwift", from: "5.2.0"), .package(url: "https://github.com/bufbuild/connect-swift", exact: "0.3.0"), .package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"), - .package(url: "https://github.com/xmtp/libxmtp-swift", revision: "e5d26a4"), + .package(url: "https://github.com/xmtp/libxmtp-swift", revision: "92274fe"), // .package(path: "../libxmtp-swift") ], targets: [ diff --git a/Sources/XMTPiOS/Conversation.swift b/Sources/XMTPiOS/Conversation.swift index eacbc143..e5870465 100644 --- a/Sources/XMTPiOS/Conversation.swift +++ b/Sources/XMTPiOS/Conversation.swift @@ -78,6 +78,15 @@ public enum Conversation: Sendable { return conversationV2.peerAddress } } + + public var keyMaterial: Data? { + switch self { + case let .v1(conversationV1): + return nil + case let .v2(conversationV2): + return conversationV2.keyMaterial + } + } /// An optional string that can specify a different context for a conversation with another account address. /// diff --git a/XMTP.podspec b/XMTP.podspec index 3bbf1898..c3696625 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "XMTP" - spec.version = "0.7.6-alpha0" + spec.version = "0.7.8-alpha0" spec.summary = "XMTP SDK Cocoapod" # This description is used to generate tags and improve search results. @@ -44,5 +44,5 @@ Pod::Spec.new do |spec| spec.dependency "web3.swift" spec.dependency "GzipSwift" spec.dependency "Connect-Swift", "= 0.3.0" - spec.dependency 'LibXMTP', '= 0.0.1-timeout0' + spec.dependency 'LibXMTP', '= 0.4.1-beta0' end diff --git a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 32c84f1a..230d80f3 100644 --- a/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/XMTPiOSExample/XMTPiOSExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/xmtp/libxmtp-swift", "state" : { - "branch" : "e5d26a4", - "revision" : "e5d26a45966f568829e71cd087952de30234de58" + "branch" : "92274fe", + "revision" : "92274fe0dde1fc7f8f716ebcffa3d252813be56d" } }, {