Skip to content

Commit

Permalink
get on latest version of libxmtp
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Oct 1, 2024
1 parent 859333f commit 22ceaf6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
4 changes: 2 additions & 2 deletions LibXMTP.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'LibXMTP'
s.version = '0.5.8-beta7'
s.version = '0.5.9-beta0'
s.summary = 'XMTP shared Rust code that powers cross-platform SDKs'

s.homepage = 'https://github.com/xmtp/libxmtp-swift'
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios, '14.0', :macos, '11.0'
s.swift_version = '5.3'

s.source = { :http => "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-4f529ae/LibXMTPSwiftFFI.zip", :type => :zip }
s.source = { :http => "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-bb7a38f/LibXMTPSwiftFFI.zip", :type => :zip }
s.vendored_frameworks = 'LibXMTPSwiftFFI.xcframework'
s.source_files = 'Sources/LibXMTP/**/*'
end
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ let package = Package(
),
.binaryTarget(
name: "LibXMTPSwiftFFI",
url: "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-4f529ae/LibXMTPSwiftFFI.zip",
checksum: "511855c643ba5c0e2f719cad5a39450a472c5b6e30d56e4faf6cd7f2b43d49f9"
url: "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-bb7a38f/LibXMTPSwiftFFI.zip",
checksum: "a867a86de9a47abf03e8b41080a1bda24463dbc4604feb0770a8922b0f8bbd71"
),
.testTarget(name: "LibXMTPTests", dependencies: ["LibXMTP"]),
]
Expand Down
4 changes: 2 additions & 2 deletions Sources/LibXMTP/libxmtp-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 4f529aeb
Version: bb7a38f7
Branch: main
Date: 2024-09-26 04:05:26 +0000
Date: 2024-10-01 18:08:33 +0000
22 changes: 22 additions & 0 deletions Sources/LibXMTP/xmtpv3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,8 @@ private struct FfiConverterData: FfiConverterRustBuffer {
}

public protocol FfiConversationsProtocol: AnyObject {
func createDm(accountAddress: String) async throws -> FfiGroup

func createGroup(accountAddresses: [String], opts: FfiCreateGroupOptions) async throws -> FfiGroup

func list(opts: FfiListConversationsOptions) async throws -> [FfiGroup]
Expand Down Expand Up @@ -563,6 +565,23 @@ open class FfiConversations:
try! rustCall { uniffi_xmtpv3_fn_free_fficonversations(pointer, $0) }
}

open func createDm(accountAddress: String) async throws -> FfiGroup {
return
try await uniffiRustCallAsync(
rustFutureFunc: {
uniffi_xmtpv3_fn_method_fficonversations_create_dm(
self.uniffiClonePointer(),
FfiConverterString.lower(accountAddress)
)
},
pollFunc: ffi_xmtpv3_rust_future_poll_pointer,
completeFunc: ffi_xmtpv3_rust_future_complete_pointer,
freeFunc: ffi_xmtpv3_rust_future_free_pointer,
liftFunc: FfiConverterTypeFfiGroup.lift,
errorHandler: FfiConverterTypeGenericError.lift
)
}

open func createGroup(accountAddresses: [String], opts: FfiCreateGroupOptions) async throws -> FfiGroup {
return
try await uniffiRustCallAsync(
Expand Down Expand Up @@ -5505,6 +5524,9 @@ private var initializationResult: InitializationResult = {
if uniffi_xmtpv3_checksum_func_verify_k256_sha256() != 25521 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_method_fficonversations_create_dm() != 61687 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_method_fficonversations_create_group() != 62996 {
return InitializationResult.apiChecksumMismatch
}
Expand Down

0 comments on commit 22ceaf6

Please sign in to comment.