SCPSimulatedOfflineMode
Objective-C
enum SCPSimulatedOfflineMode : NSUInteger {}
Swift
enum SimulatedOfflineMode : UInt, @unchecked Sendable
Types of network failure that can be simulated.
-
Disables simulated offline mode. Network requests proceed normally and connectivity status reflects actual network conditions. This is the default state.
Declaration
Objective-C
SCPSimulatedOfflineModeDisabled = 0Swift
case disabled = 0 -
Immediate connection failure. Requests fail instantly with a network error. This is the fastest mode for testing but least realistic.
Declaration
Objective-C
SCPSimulatedOfflineModeOfflineImmediateSwift
case offlineImmediate = 1 -
Timeout simulation. Requests hang until timeout (15 seconds), then fail. More realistic but slower due to retry logic being exercised.
Declaration
Objective-C
SCPSimulatedOfflineModeOfflineTimeoutSwift
case offlineTimeout = 2 -
Intermittent failures. Approximately 50% of requests will fail randomly. Useful for testing retry behavior and partial connectivity.
Declaration
Objective-C
SCPSimulatedOfflineModeOfflineIntermittentSwift
case offlineIntermittent = 3