Skip to content

Commit

Permalink
Expose SDK Metadata (#59)
Browse files Browse the repository at this point in the history
* expose sdk metadata

* fixed sourceSdkVersion

* bumped up sdk version

* fixed missing values on tests

* fixed setting default values
  • Loading branch information
jumaallan authored Aug 15, 2023
1 parent 0a6ceec commit 3a5f14e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 10.0.0-beta05

### Changed
- Expose `sourceSdk` and `sourceSdkVersion` initializers and properties

## 10.0.0-beta04

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can add SmileID as a dependency by adding it to the `dependencies` value of

```swift
dependencies: [
.package(url: "https://github.com/smileidentity/ios.git", .upToNextMajor(from: "10.0.0-beta04"))
.package(url: "https://github.com/smileidentity/ios.git", .upToNextMajor(from: "10.0.0-beta05"))
]
```

Expand Down
6 changes: 3 additions & 3 deletions SmileID.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'SmileID'
s.version = '10.0.0-beta04'
s.version = '10.0.0-beta05'
s.summary = 'The Official Smile Identity iOS SDK.'
s.homepage = "https://docs.smileidentity.com/mobile/ios"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Jubril O' => '[email protected]', 'Japhet' => '[email protected]'}
s.source = { :git => "https://github.com/smileidentity/ios.git", :tag => "v10.0.0-beta04" }
s.author = { 'Jubril O' => '[email protected]', 'Japhet' => '[email protected]', 'Juma Allan' => '[email protected]'}
s.source = { :git => "https://github.com/smileidentity/ios.git", :tag => "v10.0.0-beta05" }
s.ios.deployment_target = '13.0'
s.dependency 'Zip', '~> 2.1.0'
s.swift_version = '5.5'
Expand Down
8 changes: 6 additions & 2 deletions Sources/SmileID/Classes/Networking/Models/EnhancedKyc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public struct EnhancedKycRequest: Codable {
public let timestamp: String
public let signature: String
public let partnerId: String = SmileID.config.partnerId
public let sourceSdk: String = "ios"
public let sourceSdkVersion = SmileID.version
public let sourceSdk: String
public let sourceSdkVersion: String

public init(
country: String,
Expand All @@ -30,6 +30,8 @@ public struct EnhancedKycRequest: Codable {
bankCode: String? = nil,
callbackUrl: String?,
partnerParams: PartnerParams,
sourceSdk: String = "ios",
sourceSdkVersion: String = SmileID.version,
timestamp: String,
signature: String
) {
Expand All @@ -44,6 +46,8 @@ public struct EnhancedKycRequest: Codable {
self.bankCode = bankCode
self.callbackUrl = callbackUrl
self.partnerParams = partnerParams
self.sourceSdk = sourceSdk
self.sourceSdkVersion = sourceSdkVersion
self.timestamp = timestamp
self.signature = signature
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SmileID/Classes/SmileID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class SmileID {
}()

private init() {}
public static let version = "10.0.0-beta04"
public static let version = "10.0.0-beta05"
public private(set) static var config: Config!
public private(set) static var useSandbox = true
public private(set) static var theme: SmileIdTheme = DefaultTheme()
Expand Down
2 changes: 2 additions & 0 deletions Tests/Networking/EnhancedKycTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class EnhancedKycTest: BaseTestCase {
idNumber: "idNumber",
callbackUrl: "callbackUrl",
partnerParams: PartnerParams(jobId: "", userId: "", jobType: .enhancedKyc),
sourceSdk: "ios",
sourceSdkVersion: "10.0.0-beta05",
timestamp: "timestamp",
signature: "signature"
)
Expand Down

0 comments on commit 3a5f14e

Please sign in to comment.