MBXOfflineSwitch
@interface MBXOfflineSwitch : NSObject
Instance that allows connecting or disconnecting the Mapbox stack to the network.
-
Connects or disconnects the Mapbox stack. If set to false, current and new HTTP requests will fail with HttpRequestErrorType#ConnectionError.
Declaration
Objective-C
- (void)setMapboxStackConnectedForConnected:(BOOL)connected;
Parameters
connected
Set false to disconnect the Mapbox stack
-
Provides information if the Mapbox stack is connected or disconnected via OfflineSwitch.
Declaration
Objective-C
- (BOOL)isMapboxStackConnected;
Return Value
True if the Mapbox stack is disconnected via setMapboxStackConnected(), false otherwise.
-
Returns the OfflineSwitch singleton instance.
Declaration
Objective-C
+ (nonnull MBXOfflineSwitch *)getInstance;