SCPDiscoveryConfiguration


@interface SCPDiscoveryConfiguration : NSObject

Configuration for discovering readers.

  • Initializes a discovery configuration with the given device type, selecting the default discovery method for the device type.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDeviceType:(SCPDeviceType)deviceType
                                     simulated:(BOOL)simulated;

    Swift

    init(deviceType: DeviceType, simulated: Bool)

    Parameters

    deviceType

    The device type to discover.

    simulated

    Whether to use simulated discovery to discover a device simulator. The SDK comes with the ability to simulate behavior without using physical hardware. This makes it easy to quickly test your integration end-to-end, from pairing with a reader to taking payments.

  • Initializes a discovery configuration with the given device type and discovery method.

    Note that not all deviceType and discovery method combinations are valid. If the specified configuration is invalid, discoverReaders will fail.

    DeviceType valid DiscoveryMethods
    chipper2X bluetoothProximity (recommended), bluetoothScan

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDeviceType:(SCPDeviceType)deviceType
                               discoveryMethod:(SCPDiscoveryMethod)discoveryMethod
                                     simulated:(BOOL)simulated;

    Swift

    init(deviceType: DeviceType, discoveryMethod: DiscoveryMethod, simulated: Bool)

    Parameters

    deviceType

    The device type to discover.

    discoveryMethod

    The discovery method to use.

    simulated

    Whether to use simulated discovery to discover a device simulator. The SDK comes with the ability to simulate behavior without using physical hardware. This makes it easy to quickly test your integration end-to-end, from pairing with a reader to taking payments.

  • The timeout (in seconds) after which discoverReaders: should fail. If the value is 0 (the default), discoverReaders will never timeout.

    Note that setting a timeout is not currently supported when using SCPDiscoveryMethodBluetoothProximity, or any simulated discovery. If you set a timeout when using these configurations, the timeout will be ignored.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSUInteger timeout;

    Swift

    var timeout: UInt { get set }
  • The reader device type to discover.

    Declaration

    Objective-C

    @property (readonly, nonatomic) SCPDeviceType deviceType;

    Swift

    var deviceType: DeviceType { get }
  • The method by which to discover readers.

    Declaration

    Objective-C

    @property (readonly, nonatomic) SCPDiscoveryMethod discoveryMethod;

    Swift

    var discoveryMethod: DiscoveryMethod { get }
  • Whether to use simulated discovery to discover a device simulator.

    The Terminal SDK comes with the ability to simulate behavior without using physical hardware. This makes it easy to quickly test your integration end-to-end, from pairing with a reader to taking payments.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL simulated;

    Swift

    var simulated: Bool { get }
  • Unavailable

    Use initWithDeviceType:simulated: or initWithDeviceType:discoveryMethod:simulated:

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Use initWithDeviceType:simulated: or initWithDeviceType:discoveryMethod:simulated:

    Declaration

    Objective-C

    - (nonnull instancetype)new;