Skip to content

Commit

Permalink
Expose public functions (#424)
Browse files Browse the repository at this point in the history
* update package

* need more functions public

* bump the pod
  • Loading branch information
nplasterer authored Nov 11, 2024
1 parent 1727b34 commit 4569e6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions Sources/XMTPiOS/PrivatePreferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ public enum EntryType: String, Codable {
}

public struct ConsentListEntry: Codable, Hashable {
public init(value: String, entryType: EntryType, consentType: ConsentState) {
self.value = value
self.entryType = entryType
self.consentType = consentType
}

static func address(_ address: String, type: ConsentState = .unknown)
-> ConsentListEntry
{
Expand Down Expand Up @@ -65,25 +71,25 @@ public class ConsentList {
self.ffiClient = ffiClient
}

func setConsentState(entries: [ConsentListEntry]) async throws {
public func setConsentState(entries: [ConsentListEntry]) async throws {
try await ffiClient.setConsentStates(records: entries.map(\.toFFI))
}

func addressState(address: String) async throws -> ConsentState {
public func addressState(address: String) async throws -> ConsentState {
return try await ffiClient.getConsentState(
entityType: .address,
entity: address
).fromFFI
}

func conversationState(conversationId: String) async throws -> ConsentState {
public func conversationState(conversationId: String) async throws -> ConsentState {
return try await ffiClient.getConsentState(
entityType: .conversationId,
entity: conversationId
).fromFFI
}

func inboxIdState(inboxId: String) async throws -> ConsentState {
public func inboxIdState(inboxId: String) async throws -> ConsentState {
return try await ffiClient.getConsentState(
entityType: .inboxId,
entity: inboxId
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 = "3.0.1"
spec.version = "3.0.2"
spec.summary = "XMTP SDK Cocoapod"

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

0 comments on commit 4569e6b

Please sign in to comment.