SBSDKPassportReaderDelegate

@protocol SBSDKPassportReaderDelegate <NSObject>

The delegate protocol for SBSDKPassportReader class.

  • Informs the delegate that the reader did connect to the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReaderDidConnect:(nonnull SBSDKNFCPassportReader *)reader;

    Swift

    func passportReaderDidConnect(_ reader: SBSDKNFCPassportReader)

    Parameters

    reader

    The passport reader instance that established the connection.

  • Informs the delegate that the reader failed to connect to the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReaderDidFailToConnect:(nonnull SBSDKNFCPassportReader *)reader;

    Swift

    optional func passportReaderDidFail(toConnect reader: SBSDKNFCPassportReader)

    Parameters

    reader

    The passport reader instance that tried to establish the connection.

  • Informs the delegate that the reader finished the session with the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReaderDidFinishSession:(nonnull SBSDKNFCPassportReader *)reader;

    Swift

    optional func passportReaderDidFinishSession(_ reader: SBSDKNFCPassportReader)

    Parameters

    reader

    The passport reader instance that finished the session.

  • Informs the delegate that the reader cancelled the session with the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReaderDidCancelSession:(nonnull SBSDKNFCPassportReader *)reader;

    Swift

    optional func passportReaderDidCancelSession(_ reader: SBSDKNFCPassportReader)

    Parameters

    reader

    The passport reader instance that cancelled the session.

  • Informs the delegate that the reader started reading a data group from the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReader:(nonnull SBSDKNFCPassportReader *)reader
        didStartReadingGroup:(nonnull SBSDKNFCDatagroupType *)type;

    Swift

    optional func passportReader(_ reader: SBSDKNFCPassportReader, didStartReadingGroup type: String)

    Parameters

    reader

    The passport reader instance that started reading the data group.

    type

    The type of the data group being read.

  • Informs the delegate that the reader finished reading a data group from the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReader:(nonnull SBSDKNFCPassportReader *)reader
        didFinishReadingGroup:(nonnull SBSDKNFCDatagroupType *)type;

    Swift

    optional func passportReader(_ reader: SBSDKNFCPassportReader, didFinishReadingGroup type: String)

    Parameters

    reader

    The passport reader instance that finished reading the data group.

    type

    The type of the data group being read.

  • Informs the delegate that the reader progressed reading a data group from the passports NFC chip.

    Declaration

    Objective-C

    - (void)passportReader:(nonnull SBSDKNFCPassportReader *)reader
        didProgressReadingGroup:(float)progress;

    Swift

    optional func passportReader(_ reader: SBSDKNFCPassportReader, didProgressReadingGroup progress: Float)

    Parameters

    reader

    The passport reader instance that progressed reading the data group.

    progress

    The progress of reading. Ranges from 0.0 (0%) to 1.0 (100%) read progress.

  • Asks the delegate for the text to display in case an error occures. Optional. If not implemented - english standard strings are applied.

    Declaration

    Objective-C

    - (nullable NSString *)passportReader:(nonnull SBSDKNFCPassportReader *)reader
                    localizedTextForError:(SBSDKNFCPassportReaderError)error;

    Swift

    optional func passportReader(_ reader: SBSDKNFCPassportReader, localizedTextForError error: SBSDKNFCPassportReaderError) -> String?

    Parameters

    reader

    The calling SBSDKNFCPassportReader.

    error

    Occurred error.

    Return Value

    The localized error string to display. If you return nil - the default values will be used.