New
- Added support for reading and setting the buzzer volume on supported readers.
- Read the current volume from
SCPReaderSettings.buzzerVolumeviaretrieveReaderSettings:.SCPReaderBuzzerVolumereports the current and maximum volume. - Set the volume by calling
setReaderSettings:completion:withSCPBuzzerVolumeParameters, usinginit(level:)forLoworHigh, orinit(volume:)for a custom volume in the range1...maxVolume. - On a connected reader that does not support buzzer volume control, the volume is reported as unavailable and
setReaderSettings:fails.
- Read the current volume from
- Added
generatedCardExpandedproperty toSCPSetupAttemptCardPresentDetails, exposing the fullSCPPaymentMethodobject when saving a card viaSetupIntent. Fixes #392. - Added
paymentMethodExpandedproperty toSCPSetupIntent, exposing the fullSCPPaymentMethodobject attached to theSetupIntent. - Added
SCPLogLevelError,SCPLogLevelWarning, andSCPLogLevelInfotoSCPLogLevel, matching the granularity available in the Android SDK. Setting a level now prints logs at that severity and above, rather than all-or-nothing. - Added
SCPErrorPrinterLowBatteryerror code. This error is returned when the reader's battery is too low to complete a print operation. - Added
SCPDeviceTypeUnknown(DeviceType.unknown). A reader whosedevice_typethis version of the SDK does not recognize is now surfaced with this device type instead of being omitted, mirroring the Android SDK. The SDK exposes no known capabilities for a reader of this type.
Fixes
- Fixed inaccurate
SCPDisconnectReasonvalues reported for mobile readers connecting over Bluetooth, such as the Stripe Reader M2. A Bluetooth signal loss corroborated by the OS as an out-of-range link timeout is now reported asSCPDisconnectReasonBluetoothSignalLost, selecting "Forget this device" in iOS Settings is now reported asSCPDisconnectReasonPeerRemovedPairingInformation, and an unexpected internal disconnect is no longer misreported asSCPDisconnectReasonDisconnectRequested. Fixes #391. - Fixed a crash during Tap to Pay on iPhone
collectPaymentMethodwhen the connected reader or reader account ID was unexpectedly unavailable. Fixes #395.