ALNFCDetector Class Reference
Inherits from | NSObject |
---|---|
Declared in | ALNFCDetector.h |
Overview
The main class for reading NFC chips in passports. - Note: NFC functionality requires iOS 13 or later.
+ readingAvailable
whether this device is capable of reading passport NFC
+ (BOOL)readingAvailable
Return Value
whether this device is capable of reading passport NFC
Declared In
ALNFCDetector.h
– initWithDelegate:error:
Initialize the NFC Detector
- (instancetype _Nullable)initWithDelegate:(id<ALNFCDetectorDelegate> _Nonnull)delegate error:(NSError *_Nullable *_Nullable)error
Parameters
delegate |
The delegate to receive results from the NFC once the data has been read |
---|---|
error |
An error object that contains an error in case initialization failed. |
Declared In
ALNFCDetector.h
– startNfcDetectionWithPassportNumber:dateOfBirth:expirationDate:
Call this to start reading a passport NFC. This will automatically show UI telling the user to bring the phone near a passport, and informing them of the progress. Results will be given to the delegate via the ALNFCDetectorDelegate protocol methods. The parameters are needed to authenticate with the NFC chip; for security, the chip can not be read without some visible information from the passport.
- (void)startNfcDetectionWithPassportNumber:(NSString *_Nonnull)passportNumber dateOfBirth:(NSDate *_Nonnull)dateOfBirth expirationDate:(NSDate *_Nonnull)expirationDate
Parameters
passportNumber |
the passport number of the passport, including a trailing < if there is one in the MRZ string |
---|---|
dateOfBirth |
the date of birth on the passport |
expirationDate |
the expiration date of the passport |
Declared In
ALNFCDetector.h