From 4569e6b71e9e51a47cb50858dab70b42685cf70c Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Mon, 11 Nov 2024 15:46:06 -0800 Subject: [PATCH] Expose public functions (#424) * update package * need more functions public * bump the pod --- Sources/XMTPiOS/PrivatePreferences.swift | 14 ++++++++++---- XMTP.podspec | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Sources/XMTPiOS/PrivatePreferences.swift b/Sources/XMTPiOS/PrivatePreferences.swift index c8980f3d..703c54e5 100644 --- a/Sources/XMTPiOS/PrivatePreferences.swift +++ b/Sources/XMTPiOS/PrivatePreferences.swift @@ -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 { @@ -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 diff --git a/XMTP.podspec b/XMTP.podspec index 947da570..db313f6b 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -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.