Skip to content

Commit 7a1ff80

Browse files
authored
Merge pull request #347 from tangem/IOS-5193_refactor_extension
IOS-5193 Refactor extensions
2 parents b2b15a4 + 9cab3b9 commit 7a1ff80

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

TangemSdk/TangemSdk/Common/Extensions/TangemSdk+Combine.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ extension NFCTagReaderSession {
8181
}
8282

8383
@available(iOS 13.0, *)
84-
extension TangemSdk {
84+
public extension TangemSdk {
8585
/// Combine wrapper for `startSession` method.
8686
/// - Parameters:
8787
/// - runnable: A custom task, adopting `CardSessionRunnable` protocol
8888
/// - cardId: CID, Unique Tangem card ID number. If not nil, the SDK will check that you tapped the card with this cardID and will return the `wrongCard` error' otherwise
8989
/// - initialMessage: A custom description that shows at the beginning of the NFC session. If nil, default message will be used
9090
/// - accessCode: Access code that will be used for a card session initialization. If nil, Tangem SDK will handle it automatically.
9191
/// - Returns: `AnyPublisher<T.Response, TangemSdkError>`
92-
public func startSessionPublisher<T: CardSessionRunnable>(with runnable: T,
93-
cardId: String? = nil,
94-
initialMessage: Message? = nil,
95-
accessCode: String? = nil) -> AnyPublisher<T.Response, TangemSdkError> {
92+
func startSessionPublisher<T: CardSessionRunnable>(with runnable: T,
93+
cardId: String?,
94+
initialMessage: Message? = nil,
95+
accessCode: String? = nil) -> AnyPublisher<T.Response, TangemSdkError> {
9696
return Deferred { Future() {
9797
self.startSession(with: runnable, cardId: cardId, initialMessage: initialMessage, accessCode: accessCode, completion: $0)
9898
}}.eraseToAnyPublisher()
@@ -105,10 +105,10 @@ extension TangemSdk {
105105
/// - initialMessage: A custom description that shows at the beginning of the NFC session. If nil, default message will be used
106106
/// - accessCode: Access code that will be used for a card session initialization. If nil, Tangem SDK will handle it automatically.
107107
/// - Returns: `AnyPublisher<T.Response, TangemSdkError>`
108-
public func startSessionPublisher<T: CardSessionRunnable>(with runnable: T,
109-
filter: SessionFilter?,
110-
initialMessage: Message? = nil,
111-
accessCode: String? = nil) -> AnyPublisher<T.Response, TangemSdkError> {
108+
func startSessionPublisher<T: CardSessionRunnable>(with runnable: T,
109+
filter: SessionFilter?,
110+
initialMessage: Message? = nil,
111+
accessCode: String? = nil) -> AnyPublisher<T.Response, TangemSdkError> {
112112
return Deferred { Future() {
113113
self.startSession(with: runnable, filter: filter, initialMessage: initialMessage, accessCode: accessCode, completion: $0)
114114
}}.eraseToAnyPublisher()

0 commit comments

Comments
 (0)