SCPDiscoveryFilter
Objective-C
@interface SCPDiscoveryFilter : NSObject
Swift
class DiscoveryFilter : NSObject
The SCPDiscoveryFilter contains information used to single out a reader during the discovery process.
When a filter is provided, only the reader matching the filter will be returned during discovery,
and discovery will complete once the reader is found.
-
Creates a filter to discover a reader by its serial number.
Declaration
Objective-C
+ (nullable instancetype)filterBySerialNumber:(nonnull NSString *)serialNumber;Swift
class func bySerialNumber(_ serialNumber: String) -> Self?Parameters
serialNumberThe serial number of the reader to discover. Must not be empty.
Return Value
A discovery filter configured to match the specified serial number, or nil if serialNumber is empty.
-
Creates a filter to discover a reader by its reader ID (tmr_*).
Declaration
Objective-C
+ (nullable instancetype)filterByReaderId:(nonnull NSString *)readerId;Swift
class func byReaderId(_ readerId: String) -> Self?Parameters
readerIdThe ID of the reader to discover. Must start with “tmr_”.
Return Value
A discovery filter configured to match the specified reader ID, or nil if readerId is invalid.
-
Creates a filter that allows all readers to be discovered (no filtering).
Declaration
Objective-C
+ (nonnull instancetype)none;Swift
class func none() -> SelfReturn Value
A discovery filter that does not restrict discovery.
-
Unavailable
Use the factory methods to create instances.
Declaration
Objective-C
- (nonnull instancetype)init; -
Unavailable
Use the factory methods to create instances.
Declaration
Objective-C
+ (nonnull instancetype)new;