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.

    Note that simulated is not supported by verifoneP400.

    Declaration

    Objective-C

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

    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 and not all readers support simulated mode. If the specified configuration is invalid, discoverReaders will fail.

    DeviceType DiscoveryMethod simulated
    chipper2X bluetoothProximity (recommended), bluetoothScan true or false
    verifoneP400 internet true or false

    Declaration

    Objective-C

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

    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.

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

    Not all deviceType and discovery method combinations are valid and not all readers support locationId or simulated mode. If the specified configuration is invalid, discoverReaders will fail. Only the following DiscoveryConfiguration combinations are allowed:

    DeviceType DiscoveryMethod locationId simulated
    chipper2X bluetoothProximity (recommended), bluetoothScan nil true or false
    verifoneP400 internet nil or string true or false

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDeviceType:(SCPDeviceType)deviceType
                               discoveryMethod:(SCPDiscoveryMethod)discoveryMethod
                                    locationId:(nullable NSString *)locationId
                                     simulated:(BOOL)simulated;

    Parameters

    deviceType

    The device type to discover.

    discoveryMethod

    The discovery method to use.

    locationId

    The optional location ID to filter the discovered list to only readers at the specific location. Currently updating and creating locations is not supported by this SDK and will need to take place on the backend.

    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 (nonatomic) NSUInteger timeout;
  • The reader device type to discover.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPDeviceType deviceType;
  • The method by which to discover readers.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPDiscoveryMethod discoveryMethod;
  • 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 (nonatomic, readonly) BOOL simulated;
  • A location ID that can be used to filter discovery result so only readers registered to that location are returned. Currently this is only applicable to VerifoneP400 readers.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *locationId;
  • 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;