Skip to content

Commit 45c6798

Browse files
Merge pull request #264 from skyflowapi/public-release/1.22.1
SK-1440 Public release/1.22.1
2 parents f7be022 + 0e1ae38 commit 45c6798

11 files changed

Lines changed: 44 additions & 25 deletions

File tree

Samples/CollectAndRevealSample/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ source 'https://github.com/CocoaPods/Specs.git'
55

66
target 'CollectAndRevealSample' do
77
#use_frameworks!
8+
pod 'AEXML', '4.6.1'
89

910
# Pods for skyflow-iOS-sample-app
1011
pod 'Skyflow', ">= 1.22.0"

Samples/ComposableElements/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
target 'ComposableElements' do
55
# Comment the next line if you don't want to use dynamic frameworks
66
use_frameworks!
7+
pod 'AEXML', '4.6.1'
78
pod 'Skyflow', ">= 1.22.0"
89
# Pods for ComposableElements
910

Samples/GetSample/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'https://github.com/CocoaPods/Specs.git'
55

66
target 'GetSample' do
77
#use_frameworks!
8-
8+
pod 'AEXML', '4.6.1'
99
# Pods for GetSample
1010
pod 'Skyflow', ">= 1.22.0"
1111

Samples/InputFormatting/Podfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
target 'InputFormatting' do
44
# Comment the next line if you don't want to use dynamic frameworks
55
use_frameworks!
6-
6+
pod 'AEXML', '4.6.1'
7+
78
pod 'Skyflow', ">= 1.22.0"
89

910
# Pods for InputFormatting

Samples/Validations/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'https://github.com/CocoaPods/Specs.git'
55

66
target 'Validations' do
77
#use_frameworks!
8-
8+
pod 'AEXML', '4.6.1'
99
# Pods for skyflow-iOS-sample-app
1010
pod 'Skyflow', ">= 1.22.0"
1111

Skyflow.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Pod::Spec.new do |spec|
22

33
spec.name = "Skyflow"
44

5-
spec.version = "1.22.0"
5+
spec.version = "1.22.1"
66

77
spec.summary = "skyflow-iOS"
88

@@ -20,12 +20,12 @@ Pod::Spec.new do |spec|
2020

2121
spec.ios.deployment_target = "9.0"
2222

23-
spec.source = { :git => "https://github.com/skyflowapi/skyflow-iOS.git", :tag => "1.22.0" }
23+
spec.source = { :git => "https://github.com/skyflowapi/skyflow-iOS.git", :tag => "1.22.1" }
2424

2525
spec.source_files = "Sources/Skyflow/**/*.{swift}"
2626

2727
spec.resource_bundles = {'Skyflow' => ['Sources/Skyflow/Resources/**/*.{xcassets}'] }
2828

29-
spec.dependency "AEXML"
29+
spec.dependency "AEXML", "4.6.1"
3030
end
3131

Sources/Skyflow/Version.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111

1212
import Foundation
1313

14-
var SDK_VERSION = "1.22.0"
14+
var SDK_VERSION = "1.22.1"

Sources/Skyflow/reveal/GetAPICallback.swift

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ class GetAPICallback: Callback {
9090
internal func buildFieldsDict(dict: [String: Any]) -> [String: Any] {
9191
var temp: [String: Any] = [:]
9292
for (key, val) in dict {
93-
if let v = val as? [String: Any] {
94-
temp[key] = buildFieldsDict(dict: v)
95-
} else {
96-
temp[key] = val
97-
}
93+
if let v = val as? [String: Any] {
94+
temp[key] = buildFieldsDict(dict: v)
95+
} else {
96+
temp[key] = val
97+
}
9898
}
9999
return temp
100100
}
@@ -133,10 +133,13 @@ class GetAPICallback: Callback {
133133
urlComponents?.queryItems?.append(URLQueryItem(name: "skyflow_ids", value: id))
134134
}
135135
} else if record.columnValues != nil && record.columnName != nil{
136-
137-
for columnValue in record.columnValues! {
138-
urlComponents?.queryItems?.append(URLQueryItem(name: "column_name", value: record.columnName))
139-
urlComponents?.queryItems?.append(URLQueryItem(name: "column_values", value: columnValue))
136+
if let array = record.columnValues {
137+
for (index, value) in array.enumerated() {
138+
if index == 0 {
139+
urlComponents?.queryItems?.append(URLQueryItem(name: "column_name", value: record.columnName))
140+
}
141+
urlComponents?.queryItems?.append(URLQueryItem(name: "column_values", value: value))
142+
}
140143
}
141144
}
142145
if(record.redaction != nil && getOptions.tokens == false){
@@ -186,6 +189,7 @@ class GetAPICallback: Callback {
186189
for entry in jsonDataArray {
187190
var entryDict = self.buildFieldsDict(dict: entry)
188191
entryDict["table"] = record.table
192+
entryDict.removeValue(forKey: "tokens")
189193
outputArray.append(entryDict)
190194
}
191195
}

Sources/Skyflow/reveal/RevealByIDAPICallback.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class RevealByIDAPICallback: Callback {
167167
for entry in jsonDataArray {
168168
var entryDict = self.buildFieldsDict(dict: entry)
169169
entryDict["table"] = record.table
170+
entryDict.removeValue(forKey: "tokens")
170171
outputArray.append(entryDict)
171172
}
172173
}

Tests/skyflow-iOS-elementTests/skyflow_iOS_elementTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,28 +208,28 @@ class skyflow_iOS_elementTests: XCTestCase {
208208
}
209209

210210
func testCardExpiryValidationMMYY() {
211-
let mmyy = "12/23"
211+
let mmyy = "12/24"
212212

213213
let cardexpValidation = SkyflowValidateCardExpirationDate(format: "mm/yy", error: "Invalid Card expiration date")
214214
XCTAssertTrue(SkyflowValidator.validate(input: mmyy, rules: ValidationSet(rules: [cardexpValidation])).isEmpty)
215215
}
216216

217217
func testCardExpiryValidationMMYYYY() {
218-
let mmyyyy = "12/2023"
218+
let mmyyyy = "12/2029"
219219

220220
let cardexpValidation = SkyflowValidateCardExpirationDate(format: "mm/yyyy", error: "Invalid Card expiration date")
221221
XCTAssertTrue(SkyflowValidator.validate(input: mmyyyy, rules: ValidationSet(rules: [cardexpValidation])).isEmpty)
222222
}
223223

224224
func testCardExpiryValidationYYMM() {
225-
let yymm = "23/12"
225+
let yymm = "28/12"
226226

227227
let cardexpValidation = SkyflowValidateCardExpirationDate(format: "yy/mm", error: "Invalid Card expiration date")
228228
XCTAssertTrue(SkyflowValidator.validate(input: yymm, rules: ValidationSet(rules: [cardexpValidation])).isEmpty)
229229
}
230230

231231
func testCardExpiryValidationYYYYMM() {
232-
let yyyymm = "2023/12"
232+
let yyyymm = "2028/12"
233233

234234
let cardexpValidation = SkyflowValidateCardExpirationDate(format: "yyyy/mm", error: "Invalid Card expiration date")
235235
XCTAssertTrue(SkyflowValidator.validate(input: yyyymm, rules: ValidationSet(rules: [cardexpValidation])).isEmpty)
@@ -292,7 +292,7 @@ class skyflow_iOS_elementTests: XCTestCase {
292292
let yearValidation = SkyflowValidateExpirationYear(format: "yy", error: SkyflowValidationErrorType.expirationYear.rawValue)
293293

294294
XCTAssertFalse(yearValidation.validate("234"))
295-
XCTAssertTrue(yearValidation.validate("23"))
295+
XCTAssertTrue(yearValidation.validate("27"))
296296

297297
}
298298

0 commit comments

Comments
 (0)