Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 62df39a

Browse files
authored
Merge pull request #352 from tangem/release/3.10.0
Release version 3.10.0
2 parents fd4902c + dde7808 commit 62df39a

File tree

22 files changed

+213
-366
lines changed

22 files changed

+213
-366
lines changed

CHANGELOG

Lines changed: 25 additions & 319 deletions
Large diffs are not rendered by default.

Example/PrivacyInfo.xcprivacy

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyTracking</key>
6+
<false/>
7+
<key>NSPrivacyTrackingDomains</key>
8+
<array/>
9+
<key>NSPrivacyCollectedDataTypes</key>
10+
<array/>
11+
<key>NSPrivacyAccessedAPITypes</key>
12+
<array/>
13+
</dict>
14+
</plist>

Example/TangemSdkExample.xcodeproj/project.pbxproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
DC23EDA02912DD520023E626 /* ResetToFactorySettingsTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC23ED9E2912DD0D0023E626 /* ResetToFactorySettingsTask.swift */; };
4848
DC28E0F22877F84B00AE7A84 /* DebugLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC28E0F12877F84B00AE7A84 /* DebugLogger.swift */; };
4949
DC28E0F32877F9BA00AE7A84 /* DebugLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC28E0F12877F84B00AE7A84 /* DebugLogger.swift */; };
50+
DC4512802BD17F8F00DE6F94 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = DC45127F2BD17F8F00DE6F94 /* PrivacyInfo.xcprivacy */; };
51+
DC4512822BD17F9D00DE6F94 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = DC45127F2BD17F8F00DE6F94 /* PrivacyInfo.xcprivacy */; };
5052
/* End PBXBuildFile section */
5153

5254
/* Begin PBXContainerItemProxy section */
@@ -99,6 +101,7 @@
99101
B6B9589B2B2FCA9900E7B74E /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
100102
DC23ED9E2912DD0D0023E626 /* ResetToFactorySettingsTask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResetToFactorySettingsTask.swift; sourceTree = "<group>"; };
101103
DC28E0F12877F84B00AE7A84 /* DebugLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugLogger.swift; sourceTree = "<group>"; };
104+
DC45127F2BD17F8F00DE6F94 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
102105
E53EB3E423F2C7C90079CC11 /* TangemSdkExampleDevelopmentUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TangemSdkExampleDevelopmentUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
103106
E53EB3E623F2C7C90079CC11 /* TangemSdkExampleDevelopmentUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TangemSdkExampleDevelopmentUITests.swift; sourceTree = "<group>"; };
104107
E53EB3EE23F2CD860079CC11 /* RobotApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RobotApi.swift; sourceTree = "<group>"; };
@@ -162,6 +165,7 @@
162165
5D78C1AD234F435B008D7478 = {
163166
isa = PBXGroup;
164167
children = (
168+
DC45127F2BD17F8F00DE6F94 /* PrivacyInfo.xcprivacy */,
165169
B6B9589A2B2FCA9900E7B74E /* Gemfile */,
166170
B6B9589B2B2FCA9900E7B74E /* Podfile */,
167171
5D78C1B8234F435B008D7478 /* TangemSdkExample */,
@@ -301,7 +305,7 @@
301305
};
302306
};
303307
};
304-
buildConfigurationList = 5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSdkExample" */;
308+
buildConfigurationList = 5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSDKExample" */;
305309
compatibilityVersion = "Xcode 9.3";
306310
developmentRegion = en;
307311
hasScannedForEncodings = 0;
@@ -329,6 +333,7 @@
329333
B6B9589C2B2FCA9900E7B74E /* Gemfile in Resources */,
330334
5D78C1C6234F435C008D7478 /* LaunchScreen.storyboard in Resources */,
331335
B6B9589D2B2FCA9900E7B74E /* Podfile in Resources */,
336+
DC4512822BD17F9D00DE6F94 /* PrivacyInfo.xcprivacy in Resources */,
332337
5D78C1C3234F435C008D7478 /* Assets.xcassets in Resources */,
333338
);
334339
runOnlyForDeploymentPostprocessing = 0;
@@ -337,6 +342,7 @@
337342
isa = PBXResourcesBuildPhase;
338343
buildActionMask = 2147483647;
339344
files = (
345+
DC4512802BD17F8F00DE6F94 /* PrivacyInfo.xcprivacy in Resources */,
340346
5DBC25BF235F053F005F0C79 /* LaunchScreen.storyboard in Resources */,
341347
5DBC25C0235F053F005F0C79 /* Assets.xcassets in Resources */,
342348
);
@@ -641,6 +647,10 @@
641647
);
642648
PRODUCT_BUNDLE_IDENTIFIER = com.tangem.TangemSDKExample;
643649
PRODUCT_NAME = "$(TARGET_NAME)";
650+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
651+
SUPPORTS_MACCATALYST = NO;
652+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
653+
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
644654
SWIFT_VERSION = 5.0;
645655
TARGETED_DEVICE_FAMILY = 1;
646656
};
@@ -661,6 +671,10 @@
661671
);
662672
PRODUCT_BUNDLE_IDENTIFIER = com.tangem.TangemSDKExample;
663673
PRODUCT_NAME = "$(TARGET_NAME)";
674+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
675+
SUPPORTS_MACCATALYST = NO;
676+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
677+
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
664678
SWIFT_VERSION = 5.0;
665679
TARGETED_DEVICE_FAMILY = 1;
666680
};
@@ -709,7 +723,7 @@
709723
/* End XCBuildConfiguration section */
710724

711725
/* Begin XCConfigurationList section */
712-
5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSdkExample" */ = {
726+
5D78C1B1234F435B008D7478 /* Build configuration list for PBXProject "TangemSDKExample" */ = {
713727
isa = XCConfigurationList;
714728
buildConfigurations = (
715729
5D78C1C8234F435C008D7478 /* Debug */,

TangemSdk.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'TangemSdk'
11-
s.version = '3.9.0'
11+
s.version = '3.10.0'
1212
s.summary = 'Use TangemSdk for Tangem cards integration'
1313
s.description = <<-DESC
1414
Tangem is a Swiss-based secure hardware wallet manufacturer that enables blockchain-based assets to be kept in custody within smart physical banknotes and accessed via NFC technology. Tangem’s mission is to make digital assets accessible, affordable and convenient for consumers.

TangemSdk/TangemSdk.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2448,6 +2448,10 @@
24482448
PRODUCT_BUNDLE_IDENTIFIER = com.tangem.tangemSdk.example;
24492449
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
24502450
SKIP_INSTALL = YES;
2451+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
2452+
SUPPORTS_MACCATALYST = NO;
2453+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
2454+
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
24512455
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/TangemSdk/";
24522456
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
24532457
SWIFT_VERSION = 5.0;
@@ -2497,6 +2501,10 @@
24972501
PRODUCT_BUNDLE_IDENTIFIER = com.tangem.tangemSdk.example;
24982502
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
24992503
SKIP_INSTALL = YES;
2504+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
2505+
SUPPORTS_MACCATALYST = NO;
2506+
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
2507+
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
25002508
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/TangemSdk/";
25012509
SWIFT_VERSION = 5.0;
25022510
TARGETED_DEVICE_FAMILY = 1;

TangemSdk/TangemSdk/Common/Core/CardSession.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public class CardSession {
246246
/// - Parameter error: The error to show
247247
public func stop(error: Error, completion: (() -> Void)?) {
248248
Log.session("Stop session")
249-
reader.stopSession(with: error.localizedDescription)
249+
reader.stopSession(with: error)
250250
sessionDidStop(completion: completion)
251251
}
252252

@@ -321,7 +321,6 @@ public class CardSession {
321321
.sink(receiveCompletion: {[weak self] readerCompletion in
322322
self?.sendSubscription = []
323323
if case let .failure(error) = readerCompletion {
324-
Log.error(error)
325324
completion(.failure(error))
326325
}
327326
}, receiveValue: {[weak self] responseApdu in

TangemSdk/TangemSdk/Common/Core/TangemSdkError.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,12 @@ public enum TangemSdkError: Error, LocalizedError, Encodable {
511511
case .backupFailedNotEmptyWallets: return "error_backup_not_empty_wallets".localized
512512
case .backupFailedWrongIssuer, .backupFailedHDWalletSettings, .backupFailedNotEnoughCurves,
513513
.backupFailedNotEnoughWallets, .backupFailedFirmware, .backupNotAllowed,
514-
.backupFailedIncompatibleBatch, .backupFailedIncompatibleFirmware, .backupFailedKeysImportSettings,
515-
.backupFailedAlreadyCreated:
514+
.backupFailedIncompatibleBatch, .backupFailedIncompatibleFirmware, .backupFailedKeysImportSettings:
516515
return "error_backup_wrong_card".localized("\(self.code)")
516+
case .backupFailedAlreadyCreated:
517+
return "error_backup_failed_already_created".localized
518+
case .noActiveBackup:
519+
return "error_no_active_backup".localized
517520
case .resetPinWrongCard:
518521
return "error_reset_wrong_card".localized("\(self.code)")
519522
case .oldCard: return "error_old_card".localized

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

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,36 @@ 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()
9999
}
100+
101+
/// Combine wrapper for `startSession` method.
102+
/// - Parameters:
103+
/// - runnable: A custom task, adopting `CardSessionRunnable` protocol
104+
/// - filter: Filters card to be read. Optional.
105+
/// - initialMessage: A custom description that shows at the beginning of the NFC session. If nil, default message will be used
106+
/// - accessCode: Access code that will be used for a card session initialization. If nil, Tangem SDK will handle it automatically.
107+
/// - Returns: `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> {
112+
return Deferred { Future() {
113+
self.startSession(with: runnable, filter: filter, initialMessage: initialMessage, accessCode: accessCode, completion: $0)
114+
}}.eraseToAnyPublisher()
115+
}
100116
}

TangemSdk/TangemSdk/Common/Localization/Resources/de.lproj/Localizable.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
"common_warning" = "Warning";
2020
"error_already_created" = "Ein Wallet ist bereits erstellt worden";
2121
"error_backup_card_already_added" = "This card has already been added to the list";
22+
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
2223
"error_backup_not_empty_wallets" = "This card already has a wallet. If you want to proceed you have to reset it to factory settings first.";
2324
"error_backup_wrong_card" = "This card can't be used as a backup card. Error code: %@.";
2425
"error_card_verification_failed" = "Die Kartenverifizierung ist fehlgeschlagen";
2526
"error_file_not_found" = "File not found";
27+
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
2628
"error_old_card" = "Tangem cards issued before September 2019 cannot sign data using an iPhone due to iOS restrictions";
2729
"error_pin_cannot_be_changed_format" = "%@ cannot be changed";
2830
"error_pin_cannot_be_default_format" = "%@ cannot be changed to this value. Please, enter another one.";

TangemSdk/TangemSdk/Common/Localization/Resources/en.lproj/Localizable.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
"common_warning" = "Warning";
2020
"error_already_created" = "A wallet has already been created";
2121
"error_backup_card_already_added" = "This card has already been added to the list";
22+
"error_backup_failed_already_created" = "This card cannot be used as a backup because it already contains a wallet. Ensure that no funds are stored on the card by scanning it in the app. Then, reset it to factory settings.";
2223
"error_backup_not_empty_wallets" = "This card already has a wallet. If you want to proceed you have to reset it to factory settings first.";
2324
"error_backup_wrong_card" = "This card can't be used as a backup card. Error code: %@.";
2425
"error_card_verification_failed" = "Card verification failed";
2526
"error_file_not_found" = "File not found";
27+
"error_no_active_backup" = "The selected card cannot be used to reset the card access code, because there is no backup on it. Please contact support team.";
2628
"error_old_card" = "Tangem cards issued before September 2019 cannot sign data using an iPhone due to iOS restrictions";
2729
"error_pin_cannot_be_changed_format" = "%@ cannot be changed";
2830
"error_pin_cannot_be_default_format" = "%@ cannot be changed to this value. Please, enter another one.";

0 commit comments

Comments
 (0)