SCPReaderInteractionDelegate
Objective-C
@protocol SCPReaderInteractionDelegate <SCPReaderDelegate>
Swift
protocol ReaderInteractionDelegate : ReaderDelegate
A base delegate for interactions shared by mobile and Tap to Pay readers.
Don’t implement this protocol directly. Instead, implement SCPMobileReaderDelegate
or SCPTapToPayReaderDelegate for the reader types your integration supports.
-
The reader has started installing a software update.
The installation lifecycle callbacks cover both Mobile Reader software updates and mandatory Tap to Pay configuration installation during
-[SCPTerminal connectReader:completion:].Declaration
Objective-C
- (void)reader:(nonnull SCPReader *)reader didStartInstallingUpdate:(nonnull SCPReaderSoftwareUpdate *)update cancelable:(nullable SCPCancelable *)cancelable;Swift
func reader(_ reader: SCPReader, didStartInstallingUpdate update: SCPReaderSoftwareUpdate, cancelable: SCPCancelable?)Parameters
readerThe originating reader.
updateThe
SCPReaderSoftwareUpdatewith adurationEstimatethat can be used to communicate how long the update is expected to take.cancelableA cancelable that can be used to cancel the installation when cancellation is supported.
-
The reader reported progress on a software update.
Declaration
Objective-C
- (void)reader:(nonnull SCPReader *)reader didReportReaderSoftwareUpdateProgress:(float)progress;Swift
func reader(_ reader: SCPReader, didReportReaderSoftwareUpdateProgress progress: Float)Parameters
readerThe originating reader.
progressAn estimate of the progress of the software update in the range
[0.0, 1.0]. -
The reader has finished installing an update.
Declaration
Objective-C
- (void)reader:(nonnull SCPReader *)reader didFinishInstallingUpdate:(nullable SCPReaderSoftwareUpdate *)update error:(nullable NSError *)error;Swift
func reader(_ reader: SCPReader, didFinishInstallingUpdate update: SCPReaderSoftwareUpdate?, error: (any Error)?)Parameters
readerThe originating reader.
updateThe update that was being installed, if any.
errorThe error that prevented installation, or
nilif the installation succeeded. -
This method is called when the reader begins waiting for input. Your app should prompt the customer to present one of the given payment methods.
Declaration
Objective-C
- (void)reader:(nonnull SCPReader *)reader didRequestReaderInput:(SCPReaderInputOptions)inputOptions;Swift
func reader(_ reader: SCPReader, didRequestReaderInput inputOptions: ReaderInputOptions = [])Parameters
readerThe originating reader.
inputOptionsThe armed input options on the reader.
-
This method is called when the reader requests that a prompt be displayed in your app.
Declaration
Objective-C
- (void)reader:(nonnull SCPReader *)reader didRequestReaderDisplayMessage:(SCPReaderDisplayMessage)displayMessage;Swift
func reader(_ reader: SCPReader, didRequestReaderDisplayMessage displayMessage: ReaderDisplayMessage)Parameters
readerThe originating reader.
displayMessageThe message to display to the user.