SCPTestReaderUpdate

Objective-C


@interface SCPTestReaderUpdate : NSObject <NSCopying>

Swift

class TestReaderUpdate : NSObject, NSCopying

Describes a simulated software update to apply during a test-mode connection.

Create instances with the provided factory methods rather than init.

  • The kind of simulated update.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPTestReaderUpdateType updateType;

    Swift

    var updateType: TestReaderUpdateType { get }
  • The component(s) the simulated update contains. Only applicable for available, required, and requiredOffline types.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPUpdateComponent components;

    Swift

    var components: UpdateComponent { get }
  • A simulated optional update containing the given component(s).

    Declaration

    Objective-C

    + (nonnull instancetype)availableWithComponents:(SCPUpdateComponent)components;

    Swift

    class func available(_ components: UpdateComponent) -> Self
  • A simulated required update containing the given component(s).

    Declaration

    Objective-C

    + (nonnull instancetype)requiredWithComponents:(SCPUpdateComponent)components;

    Swift

    class func required(_ components: UpdateComponent) -> Self
  • A simulated required-for-offline update containing the given component(s).

    Declaration

    Objective-C

    + (nonnull instancetype)requiredOfflineWithComponents:
        (SCPUpdateComponent)components;

    Swift

    class func requiredOffline(_ components: UpdateComponent) -> Self
  • Simulates a required update that fails because the reader’s battery is too low. The connection will also fail.

    Declaration

    Objective-C

    + (nonnull instancetype)lowBattery;

    Swift

    class func lowBattery() -> Self
  • Simulates a required update that fails because the reader’s battery is too low, but the connection succeeds because the reader is on a recent version.

    Declaration

    Objective-C

    + (nonnull instancetype)lowBatterySucceedConnect;

    Swift

    class func lowBatterySucceedConnect() -> Self
  • Randomly selects and returns a concrete update scenario to exercise various states, or nil to simulate no update being available.

    Declaration

    Objective-C

    + (nullable instancetype)random;

    Swift

    class func random() -> Self?
  • Unavailable

    Unavailable. Use the factory methods on SCPTestReaderUpdate.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Unavailable. Use the factory methods on SCPTestReaderUpdate.

    Declaration

    Objective-C

    + (nonnull instancetype)new;