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

Commit 06e1372

Browse files
authored
Merge pull request #284 from tangem/release/3.7.0
Release version 3.7.0
2 parents 2ecdf90 + 35ff887 commit 06e1372

File tree

6 files changed

+43
-18
lines changed

6 files changed

+43
-18
lines changed

CHANGELOG

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
* 7c0c3ef - (HEAD -> release/3.6.0, tag: develop-228, origin/develop, develop) Merge pull request #279 from tangem/IOS-3574_derivedkeys_serialization
2-
|\
3-
| * 2a2d69d - IOS-3574 Serialize derivedKeys as object
4-
|/
5-
* c2b460c - (tag: develop-227) Merge pull request #277 from tangem/IOS-3533-sdk-chaining-example-command-does-not-execute
6-
|\
7-
| * b632a9d - Merge branch 'develop' into IOS-3533-sdk-chaining-example-command-does-not-execute
8-
| |\
9-
| |/
10-
|/|
11-
* | 0f6b2c4 - (tag: develop-226) Merge pull request #278 from tangem/master
12-
/
13-
* f22dcfd - IOS-3533 Added a hack to delay the execution of the second command in chaining example
1+
* 36a3eb9 - (HEAD -> release/3.7.0, tag: develop-230, origin/develop, develop) Merge pull request #283 from tangem/master
2+
* 134866c - (tag: develop-229, tag: 29) Merge pull request #280 from tangem/IOS-3575-sdk-research-implement-custom-card-image
3+
* 4751c9c - Merge branch 'develop' into IOS-3575-sdk-research-implement-custom-card-image
4+
* b6fabd2 - IOS-3575 Displaying UIImage as an NFC tag for more flexibility
5+
* 15cfa9a - IOS-3575 Renamed the type
6+
* e3d7b78 - IOS-3575 Changed the code order
7+
* 69bf337 - IOS-3575 Added some docs
8+
* 83fe4f6 - IOS-3575 Whitespace
9+
* 3f9e59c - IOS-3575 Added a way to show an image in the ReadView

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.6.0'
11+
s.version = '3.7.0'
1212
s.summary = 'Use TangemSdk for Tangem cards integration'
1313

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

TangemSdk/TangemSdk/UI/TangemSdkStyle.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class TangemSdkStyle: ObservableObject {
1414
public var colors: Colors = .default
1515
public var textSizes: TextSizes = .default
1616
public var indicatorWidth: Float = 12
17+
public var nfcTag: NFCTag = .genericCard
1718

1819
public static var `default`: TangemSdkStyle = .init()
1920
}
@@ -66,3 +67,18 @@ public extension TangemSdkStyle {
6667
public static var `default`: TextSizes = .init()
6768
}
6869
}
70+
71+
@available(iOS 13.0, *)
72+
public extension TangemSdkStyle {
73+
/// Options for displaying different tags on the scanning screen
74+
enum NFCTag {
75+
/// Generic card provided by the SDK
76+
case genericCard
77+
78+
/// A custom tag made out of an UIImage instance.
79+
/// The image can be shifted vertically from the standard position by specifying `verticalOffset`.
80+
/// Note that the width of the image will be limited to a certain size, while the height will be determined by the aspect ratio of the image.
81+
/// The value of the width can be found in ReadView.swift and is 210 points at the time of the writing.
82+
case image(uiImage: UIImage, verticalOffset: Double)
83+
}
84+
}

TangemSdk/TangemSdk/UI/Views/Scan/CardView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ struct CardView: View {
1717
RoundedRectangle(cornerRadius: 10)
1818
.fill(cardColor)
1919
.overlay(overlay)
20+
.aspectRatio(CGSize(width: 210, height: 130), contentMode: .fit)
2021
}
2122

2223
@ViewBuilder

TangemSdk/TangemSdk/UI/Views/Scan/ReadView.swift

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ struct ReadView: View {
2121
.frame(width: 240, height: 240)
2222
.offset(y: -160)
2323

24-
CardView(cardColor: style.colors.cardColor,
25-
starsColor: style.colors.starsColor)
26-
.frame(width: 210, height: 130)
24+
tagView
25+
.frame(minWidth: 210, maxWidth: 210)
2726
.offset(cardOffset)
2827
.animation(Animation
2928
.easeInOut(duration: 1)
@@ -40,6 +39,19 @@ struct ReadView: View {
4039
cardOffset.width = 0
4140
}
4241
}
42+
43+
@ViewBuilder
44+
private var tagView: some View {
45+
switch style.nfcTag {
46+
case .genericCard:
47+
CardView(cardColor: style.colors.cardColor, starsColor: style.colors.starsColor)
48+
case .image(let uiImage, let verticalOffset):
49+
Image(uiImage: uiImage)
50+
.resizable()
51+
.aspectRatio(contentMode: .fit)
52+
.offset(y: verticalOffset)
53+
}
54+
}
4355
}
4456

4557
@available(iOS 13.0, *)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.0
1+
3.7.0

0 commit comments

Comments
 (0)