Skip to content

Commit

Permalink
update libxmtp ref, default history sync on
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Feb 6, 2025
1 parent 895af71 commit c619323
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/xmtp/libxmtp-swift.git",
"state" : {
"revision" : "3d13358d041b27fb4180f0d15b21d184bdac9077",
"version" : "3.0.22"
"revision" : "dbdd1b31656ef8973ec305c030745b361f3b335c",
"version" : "3.0.23"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.22")
.package(url: "https://github.com/xmtp/libxmtp-swift.git", exact: "3.0.23")
],
targets: [
.target(
Expand Down
43 changes: 28 additions & 15 deletions Sources/XMTPiOS/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,34 @@ public struct ClientOptions {
public var dbDirectory: String?
public var historySyncUrl: String?

public init(
api: Api = Api(),
codecs: [any ContentCodec] = [],
preAuthenticateToInboxCallback: PreEventCallback? = nil,
dbEncryptionKey: Data,
dbDirectory: String? = nil,
historySyncUrl: String? = nil
) {
self.api = api
self.codecs = codecs
self.preAuthenticateToInboxCallback = preAuthenticateToInboxCallback
self.dbEncryptionKey = dbEncryptionKey
self.dbDirectory = dbDirectory
self.historySyncUrl = historySyncUrl
}
public init(
api: Api = Api(),
codecs: [any ContentCodec] = [],
preAuthenticateToInboxCallback: PreEventCallback? = nil,
dbEncryptionKey: Data,
dbDirectory: String? = nil,
historySyncUrl: String? = nil
) {
self.api = api
self.codecs = codecs
self.preAuthenticateToInboxCallback = preAuthenticateToInboxCallback
self.dbEncryptionKey = dbEncryptionKey
self.dbDirectory = dbDirectory
if historySyncUrl == nil {
switch api.env {
case .production:
self.historySyncUrl =
"https://message-history.production.ephemera.network/"
case .local:
self.historySyncUrl = "http://localhost:5558"
default:
self.historySyncUrl =
"https://message-history.dev.ephemera.network/"
}
} else {
self.historySyncUrl = historySyncUrl
}
}
}

actor ApiClientCache {
Expand Down
2 changes: 1 addition & 1 deletion XMTP.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Pod::Spec.new do |spec|

spec.dependency 'CSecp256k1', '~> 0.2'
spec.dependency "Connect-Swift", "= 1.0.0"
spec.dependency 'LibXMTP', '= 3.0.22'
spec.dependency 'LibXMTP', '= 3.0.23'
spec.dependency 'CryptoSwift', '= 1.8.3'
spec.dependency 'SQLCipher', '= 4.5.7'

Expand Down

0 comments on commit c619323

Please sign in to comment.