Skip to content

Commit

Permalink
Fix history sync url (#382)
Browse files Browse the repository at this point in the history
* fix: allow setting of history url

* bump the pod
  • Loading branch information
nplasterer authored Aug 7, 2024
1 parent ec3f78e commit e0aa202
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
26 changes: 16 additions & 10 deletions Sources/XMTPiOS/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,30 @@ public struct ClientOptions {
preAuthenticateToInboxCallback: PreEventCallback? = nil,
enableV3: Bool = false,
encryptionKey: Data? = nil,
dbDirectory: String? = nil
dbDirectory: String? = nil,
historySyncUrl: String? = nil
) {
self.api = api
self.codecs = codecs
self.preEnableIdentityCallback = preEnableIdentityCallback
self.preCreateIdentityCallback = preCreateIdentityCallback
self.preAuthenticateToInboxCallback = preAuthenticateToInboxCallback
self.preAuthenticateToInboxCallback = preAuthenticateToInboxCallback
self.enableV3 = enableV3
self.dbEncryptionKey = encryptionKey
self.dbDirectory = dbDirectory
switch api.env {
case .production:
self.historySyncUrl = "https://message-history.production.ephemera.network/"
case .local:
self.historySyncUrl = "http://0.0.0.0:5558"
default:
self.historySyncUrl = "https://message-history.dev.ephemera.network/"
} }
if (historySyncUrl == nil) {
switch api.env {
case .production:
self.historySyncUrl = "https://message-history.production.ephemera.network/"
case .local:
self.historySyncUrl = "http://0.0.0.0:5558"
default:
self.historySyncUrl = "https://message-history.dev.ephemera.network/"
}
} else {
self.historySyncUrl = historySyncUrl
}
}
}

/// Client is the entrypoint into the XMTP SDK.
Expand Down
2 changes: 1 addition & 1 deletion XMTP.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |spec|
#

spec.name = "XMTP"
spec.version = "0.14.0"
spec.version = "0.14.1"
spec.summary = "XMTP SDK Cocoapod"

# This description is used to generate tags and improve search results.
Expand Down

0 comments on commit e0aa202

Please sign in to comment.