Skip to content

Commit 4b33deb

Browse files
Merge pull request #50 from regulaforensics/RFIDNotificationCodes
Release 6.2
2 parents 86e9b03 + 330615a commit 4b33deb

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

Samples/Advanced/DocumentReader-Swift/DocumentReader-Swift/AdditionalScreens/CustomRfidViewController.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ class CustomRfidViewController: UIViewController {
122122

123123
func handleRFIDNotify(rfidNotify: RFIDNotify) {
124124
switch rfidNotify.code {
125-
case RGLRFIDNotificationCodesProgress:
125+
case RFIDNotificationCodes.progress:
126126
DispatchQueue.main.async {
127127
var progress: Float = 0
128128
if self.currentRfidNotify != nil {
129129
progress = Float(rfidNotify.value / 100)
130130
}
131131
self.progressView.progress = progress
132132
}
133-
case RGLRFIDNotificationCodesPCSCReadingDatagroup:
133+
case RFIDNotificationCodes.pcscReadingDatagroup:
134134
if rfidNotify.value == 1 {
135135
self.currentRfidNotify = nil
136136
} else {
@@ -143,7 +143,7 @@ class CustomRfidViewController: UIViewController {
143143

144144
func currentProgress(rfidNotify: RFIDNotify) -> Float {
145145
switch rfidNotify.code {
146-
case RGLRFIDNotificationCodesProgress:
146+
case RFIDNotificationCodes.progress:
147147
return Float(rfidNotify.value)
148148
default:
149149
break
@@ -154,7 +154,8 @@ class CustomRfidViewController: UIViewController {
154154

155155
func currentDataGroupTypeName() -> String {
156156
if let notify = self.currentRfidNotify {
157-
return RFIDNotify.rfidDataFileTypeName(RFIDDataFileType.init(rawValue: Int(notify.number)) ?? RFIDDataFileType.unspecified) ?? ""
157+
let type = RFIDDataFileType(rawValue: notify.attachment) ?? .unspecified
158+
return RFIDNotify.rfidDataFileTypeName(type) ?? ""
158159
}
159160
return ""
160161
}

Samples/Advanced/DocumentReader-Swift/DocumentReader-Swift/ResultsViewController/ResultsViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class ResultsViewController: UIViewController {
221221
var dataGroup = GroupedAttributes(type: "Data Groups", items: [])
222222
applications.forEach {
223223
$0.files.forEach {
224-
guard $0.readingStatus != RGLRFIDErrorCodesNotAvailable else { return }
224+
guard $0.readingStatus != RFIDErrorCodes.notAvailable else { return }
225225
let attribute = Attribute(name: $0.typeName, rfidStatus: $0.pAStatus)
226226
dataGroup.items.append(attribute)
227227
}
@@ -372,7 +372,7 @@ extension ResultsViewController: UITableViewDataSource, UITableViewDelegate {
372372
return UITableViewCell()
373373
}
374374
cell.textLabel?.text = item.name.uppercased()
375-
let imageName = item.rfidStatus == RGLRFIDErrorCodesFailed ? "status_not_ok" : item.rfidStatus == RGLRFIDErrorCodesNoError ? "status_ok" : "status_undefined"
375+
let imageName = item.rfidStatus == RFIDErrorCodes.failed ? "status_not_ok" : item.rfidStatus == RFIDErrorCodes.noError ? "status_ok" : "status_undefined"
376376
let imageView = UIImageView(image: UIImage(named: imageName))
377377
cell.accessoryView = imageView
378378
return cell

Samples/Advanced/DocumentReader-Swift/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ platform :ios, '11.0'
44
use_frameworks!
55

66
target 'DocumentReader-Swift' do
7-
pod 'DocumentReader', '~> 6.1'
7+
pod 'DocumentReader', '~> 6.2'
88
pod 'DocumentReaderFullRFID', '~> 6.1'
99
end

Samples/Basic/DocumentReaderObjectiveC-sample/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
platform :ios, '11.0'
44

55
target 'DocumentReaderFullObjectiveC-sample' do
6-
pod 'DocumentReader', '~> 6.1'
6+
pod 'DocumentReader', '~> 6.2'
77
pod 'DocumentReaderFullRFID', '~> 6.1'
88
end

Samples/Basic/DocumentReaderSwift-sample/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ platform :ios, '11.0'
44
use_frameworks!
55

66
target 'DocumentReaderFullSwift-sample' do
7-
pod 'DocumentReader', '~> 6.1'
7+
pod 'DocumentReader', '~> 6.2'
88
pod 'DocumentReaderFullRFID', '~> 6.1'
99
end

0 commit comments

Comments
 (0)