puriprasoon
puriprasoon

Reputation: 41

Not able to extract particular field from "MBRecognitionResult*" in BlinkIDUI-iOS sdk?

I am using your new BlinkIDUI sdk for iOS and I can have the list of all the scanned fields from "recognitionResult.resultEntries" like Secondary ID = Jason", "Primary ID = Bourne", "Sex = F", "Date Of Birth = 3/23/83", "Nationality = UAE", "Document Code = P" from the delegate method "- (void)didScanEntireDocumentWithRecognitionResult:(MBRecognitionResult * _Nonnull)recognitionResult successFrame:(UIImage * _Nullable)successFrame". My query is How to get value for particular key like “"Document Code” ?

Additional Details are: The Framework addition in Project: Manual. Xcode version : 10.1. Language: Objective-C (ARC OFF). Device: iPhone8 / iOS(11.1.1)

Upvotes: 1

Views: 37

Answers (1)

puriprasoon
puriprasoon

Reputation: 41

That's because resultEntries is an array not a dictionary, Use like this:

for (MBField *field in recognitionResult.resultEntries) { if (field.key == MBFieldKeyDocumentCode) {

    }

}

If you are using it in ObjectiveC project then also check if @objc tag is there in front of MBFieldKey public property in "MBField" class, if it is not there just put it as:

public class MBField: NSObject {

@objc public let key: MBFieldKey

@objc public let value: String

..... }

Upvotes: 1

Related Questions