Skip to content

Commit

Permalink
Merge pull request #84 from xmtp/np/sqlcipher-try
Browse files Browse the repository at this point in the history
Link SQL Cipher Directly
  • Loading branch information
nplasterer authored Nov 22, 2024
2 parents 77fd4bb + ea9feda commit 54a10a9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
8 changes: 5 additions & 3 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 = '3.0.5'
s.version = '3.0.6'
s.summary = 'XMTP shared Rust code that powers cross-platform SDKs'

s.homepage = 'https://github.com/xmtp/libxmtp-swift'
Expand All @@ -10,7 +10,9 @@ 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-64ccd3a/LibXMTPSwiftFFI.zip", :type => :zip }
s.source = { :http => "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-ab9d335/LibXMTPSwiftFFI.zip", :type => :zip }
s.vendored_frameworks = 'LibXMTPSwiftFFI.xcframework'
s.source_files = 'Sources/LibXMTP/**/*'
s.source_files = 'Sources/LibXMTP/**/*'

s.dependency 'SQLCipher', '= 4.5.7'
end
18 changes: 14 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,30 @@ let package = Package(
targets: ["LibXMTP", "LibXMTPSwiftFFI"]
),
],
dependencies: [
.package(
url: "https://github.com/sqlcipher/sqlcipher",
exact: "4.5.7"
)
],
targets: [
.target(
name: "LibXMTP",
dependencies: ["LibXMTPSwiftFFI"],
dependencies: [
"LibXMTPSwiftFFI",
.product(name: "SQLCipher", package: "sqlcipher")
],
path: "Sources/LibXMTP",
linkerSettings: [
.linkedFramework("CoreFoundation"),
.linkedFramework("SystemConfiguration")
.linkedFramework("SystemConfiguration"),
.unsafeFlags(["-lsqlcipher"]) // Ensure SQLCipher is linked
]
),
.binaryTarget(
name: "LibXMTPSwiftFFI",
url: "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-64ccd3a/LibXMTPSwiftFFI.zip",
checksum: "02590abb8f12f84daeb59b34e86c8d53422d155c3d4347a4493b79dd7f2600a3"
url: "https://github.com/xmtp/libxmtp/releases/download/swift-bindings-ab9d335/LibXMTPSwiftFFI.zip",
checksum: "f3b85d4241a1708da4d0d02e518b93974e5a97a7cf1ae445f05f1d63f72aba12"
),
.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: cbff7296
Version: d07fb2bf
Branch: main
Date: 2024-11-21 17:51:27 +0000
Date: 2024-11-22 18:36:31 +0000
12 changes: 6 additions & 6 deletions Sources/LibXMTP/xmtpv3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3257,9 +3257,9 @@ public func FfiConverterTypeFfiV2SubscriptionCallback_lower(_ value: FfiV2Subscr

public protocol FfiXmtpClientProtocol: AnyObject {
/**
* Adds an identity - really a wallet address - to the existing client
* Adds a wallet address to the existing client
*/
func addWallet(existingWalletAddress: String, newWalletAddress: String) async throws -> FfiSignatureRequest
func addWallet(newWalletAddress: String) async throws -> FfiSignatureRequest

/**
* * Get the inbox state for each `inbox_id`.
Expand Down Expand Up @@ -3383,15 +3383,15 @@ open class FfiXmtpClient:
}

/**
* Adds an identity - really a wallet address - to the existing client
* Adds a wallet address to the existing client
*/
open func addWallet(existingWalletAddress: String, newWalletAddress: String) async throws -> FfiSignatureRequest {
open func addWallet(newWalletAddress: String) async throws -> FfiSignatureRequest {
return
try await uniffiRustCallAsync(
rustFutureFunc: {
uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet(
self.uniffiClonePointer(),
FfiConverterString.lower(existingWalletAddress), FfiConverterString.lower(newWalletAddress)
FfiConverterString.lower(newWalletAddress)
)
},
pollFunc: ffi_xmtpv3_rust_future_poll_pointer,
Expand Down Expand Up @@ -7449,7 +7449,7 @@ private var initializationResult: InitializationResult = {
if uniffi_xmtpv3_checksum_method_ffiv2subscriptioncallback_on_error() != 24930 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_method_ffixmtpclient_add_wallet() != 23786 {
if uniffi_xmtpv3_checksum_method_ffixmtpclient_add_wallet() != 24482 {
return InitializationResult.apiChecksumMismatch
}
if uniffi_xmtpv3_checksum_method_ffixmtpclient_addresses_from_inbox_id() != 29264 {
Expand Down

0 comments on commit 54a10a9

Please sign in to comment.