github stripe/stripe-terminal-ios v2.0.0

latest releases: 4.0.0, 3.9.1, 3.9.0...
3 years ago

If you are using CocoaPods, update your Podfile:

pod 'StripeTerminal', '~> 2.0'

2.0.0 2021-06-23

This changelog includes a more detailed list of all the API and behavior changes since version 1.4.0 of the Stripe Terminal iOS SDK. In addition to this changelog, we've prepared a migration guide that will help you upgrade your integration and explain the differences between the two SDKs.

iOS Compatibility

The 2.0.0 Stripe Terminal iOS SDK requires iOS 10 and above.

Connecting to a Reader

connectReader is now split into two separate methods: connectBluetoothReader and connectInternetReader.

connectBluetoothReader

connectBluetoothReader should be used to connect to any Bluetooth reader like the BBPOS WisePad 3 and BBPOS Chipper 2X BT.

See Updating reader software: Required updates for more details.

connectInternetReader

connectInternetReader should be used to connect to Internet connected countertop readers like the Verifone P400 and the BBPOS WisePOS E. There are no changes required between connectReader and connectInternetReader for your countertop reader integration.

Bluetooth Reader Updates

The checkForUpdate method has been removed. The Stripe Terminal SDK now checks for required and optional updates during reader connection.

Required update installation is reported to the new BluetoothReaderDelegate with the didStartInstallingUpdate method. Progress will be reported to that same delegate with didReportReaderSoftwareUpdateProgress. When the installation of the required update finishes the delegate will receive the didFinishInstallingUpdate.

For more information about implementing reader updates, see Updating reader software and Testing Bluetooth reader updates.

Collecting Payments

collectPaymentMethod and readReusableCard no longer require a ReaderDisplayDelegate. Instead, the BluetoothReaderDelegate , provided during connectBluetoothReader, is used to communicate the didRequestReaderInput: and didRequestReaderDisplayMessage: methods. These methods are only needed when using a Bluetooth connected reader and do not apply when using connectInternetReader.

Bluetooth Reader Locations

Like Internet readers, Bluetooth readers must now be registered to Locations. Registering your Bluetooth readers to a location ensures that the readers install the proper regional configurations and are properly grouped on your account.

To register the reader to a location, create and use a BluetoothConnectionConfiguration object with the locationId set accordingly, and pass that object in when calling Terminal.shared.connectBluetoothReader().

When discovering readers that have already been registered to a location, those reader objects will have a valid locationId property during discovery. If it makes sense for your application, you can pass that locationId from the discovered Reader object into the BluetoothConnectionConfiguration initializer to keep that reader registered to the same location. This is the pattern we recommend when discovering and connecting to simulated Bluetooth readers, which are now automatically registered to a mock location.

When connecting to a reader, you may want to display a list of Locations in your app. To enable this, the SDK provides the Terminal.shared.listLocations(:completion:) method that takes the same parameters as the List all Locations API endpoint. You may want to adjust your connection flow to allow users to pick a location before they select a reader, should they want to switch that reader's location manually.

Other Changes

New features

  • Added support for Swift Package Manager.
  • Added support for running with iOS Simulator on Macs with M1 processors.
  • The SDK's card-present refund functionality now works with the BBPOS WisePad 3 reader.
  • Invite only: Stripe Terminal now supports creating SetupIntents to save card information outside the United States. When saving card information in the United States, please continue to use readReusableCard.

Don't miss a new stripe-terminal-ios release

NewReleases is sending notifications on new releases.