SCPSimulatedOfflineModeConfiguration

Objective-C


@interface SCPSimulatedOfflineModeConfiguration : NSObject <NSCopying>

Swift

class SimulatedOfflineModeConfiguration : NSObject, NSCopying

Configuration for simulating offline mode for testing offline payment flows without physically disconnecting from the network.

Set this via SCPTerminal.shared.setSimulatedOfflineModeConfiguration. The SDK and the connected smart reader can be configured independently, allowing you to test scenarios where only one side loses connectivity.

Note

For testing only. Setting a non-default configuration while connected to a livemode reader raises an error.
  • The simulated network state for the SDK.

    Default: SCPSimulatedOfflineModeDisabled

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPSimulatedOfflineMode sdkOfflineMode;

    Swift

    var sdkOfflineMode: SimulatedOfflineMode { get }
  • The simulated network state for the connected smart reader. This setting only applies to smart readers which have independent network connectivity. For Bluetooth and USB readers, this setting is ignored since all network calls flow through the SDK.

    Default: SCPSimulatedOfflineModeDisabled

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPSimulatedOfflineMode readerOfflineMode;

    Swift

    var readerOfflineMode: SimulatedOfflineMode { get }
  • Unavailable

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • The default configuration: both SDK and reader offline modes are SCPSimulatedOfflineModeDisabled.

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) SCPSimulatedOfflineModeConfiguration *_Nonnull defaultConfiguration;

    Swift

    class var `default`: SimulatedOfflineModeConfiguration { get }
  • Convenience preset that puts both the SDK and a connected smart reader into immediate offline mode (SCPSimulatedOfflineModeOfflineImmediate).

    Declaration

    Objective-C

    @property (class, nonatomic, readonly) SCPSimulatedOfflineModeConfiguration *_Nonnull fullOfflineConfiguration;

    Swift

    class var fullOffline: SimulatedOfflineModeConfiguration { get }