SCPDiscoveryConfiguration
Objective-C
@interface SCPDiscoveryConfiguration : NSObject
Swift
class DiscoveryConfiguration : NSObject
Configuration options for discovering readers.
Objects of this type get passed into the Terminal.shared.discoverReaders()
method to control which devices get discovered, and how.
-
Deprecated
All
initWithDeviceType
constructors of SCPDiscoveryConfiguration are deprecated; please use the correspondinginitWithDiscoveryMethod
constructor instead.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.
-
Deprecated
All
initWithDeviceType
constructors of SCPDiscoveryConfiguration are deprecated; please use the correspondinginitWithDiscoveryMethod
constructor instead.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.- The BBPOS Chipper 2X supports the Bluetooth Proximity and Bluetooth Scan discovery methods.
- The BBPOS WisePad 3 only supports the Bluetooth Scan discovery method.
The Verifone P400 and BBPOS WisePOS E only support the Internet discovery method.
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.
-
Initializes a discovery configuration with the given discovery method. All discoverable readers for that method will be discovered.
Declaration
Objective-C
- (nonnull instancetype)initWithDiscoveryMethod: (SCPDiscoveryMethod)discoveryMethod simulated:(BOOL)simulated;
Swift
init(discoveryMethod: DiscoveryMethod, simulated: Bool)
Parameters
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 discovery method. All discoverable readers for that method will be discovered.
Declaration
Objective-C
- (nonnull instancetype)initWithDiscoveryMethod: (SCPDiscoveryMethod)discoveryMethod locationId:(nullable NSString *)locationId simulated:(BOOL)simulated;
Swift
init(discoveryMethod: DiscoveryMethod, locationId: String?, simulated: Bool)
Parameters
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. Only available for the Internet discovery method.
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.
-
Deprecated
All
initWithDeviceType
constructors of SCPDiscoveryConfiguration are deprecated; please use the correspondinginitWithDiscoveryMethod
constructor instead.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. If the specified configuration is invalid,
discoverReaders
will fail. Only the followingDiscoveryConfiguration
combinations are allowed:- The BBPOS Chipper 2X supports the Bluetooth Proximity and Bluetooth Scan discovery methods.
- The BBPOS WisePad 3 only supports the Bluetooth Scan discovery method.
The Verifone P400 and BBPOS WisePOS E only support the Internet discovery method.
Declaration
Objective-C
- (nonnull instancetype)initWithDeviceType:(SCPDeviceType)deviceType discoveryMethod:(SCPDiscoveryMethod)discoveryMethod locationId:(nullable NSString *)locationId simulated:(BOOL)simulated;
Swift
init(deviceType: DeviceType, discoveryMethod: DiscoveryMethod, locationId: String?, simulated: Bool)
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. Only available for the Internet discovery method.
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 is0
(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;
Swift
var timeout: UInt { get set }
-
Deprecated
The
deviceType
property of SCPDiscoveryConfiguration is deprecated; please do not rely on the behavior of this property in your app.The reader device type to discover. Deprecated.
Declaration
Objective-C
@property (nonatomic, readonly) SCPDeviceType deviceType;
Swift
var deviceType: DeviceType { get }
-
The method by which to discover readers.
Declaration
Objective-C
@property (nonatomic, readonly) 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 (nonatomic, readonly) BOOL simulated;
Swift
var simulated: Bool { get }
-
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;
Swift
var locationId: String? { get }
-
Unavailable
Use
initWithDeviceType:simulated:
orinitWithDeviceType:discoveryMethod:simulated:
Declaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
Use
initWithDeviceType:simulated:
orinitWithDeviceType:discoveryMethod:simulated:
Declaration
Objective-C
+ (nonnull instancetype)new;