Files
MapLibreParticleLab/platform/darwin/src/MGLNetworkConfiguration.h
Fabian Guerra Soto 1fc7a9b82e [ios, macos] Expose the url session configuration object. (#13886)
The `MGLNetworkConfiguration` class was make public, and added `sessionConfiguration` property to let developers customize the `NSURLSessionConfiguration` object that is used to make HTTP requests in the SDK.
2019-02-18 13:16:20 -08:00

38 lines
1.1 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#import <Foundation/Foundation.h>
#import "MGLFoundation.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `MGLNetworkConfiguration` object provides a global way to set a base
`NSURLSessionConfiguration`, and other resources.
*/
MGL_EXPORT
@interface MGLNetworkConfiguration : NSObject
/**
Returns the shared instance of the `MGLNetworkConfiguration` class.
*/
@property (class, nonatomic, readonly) MGLNetworkConfiguration *sharedManager;
/**
The session configuration object that is used by the `NSURLSession` objects
in this SDK.
If this property is set to nil or if no session configuration is provided this property
is set to the default session configuration.
Assign this object before instantiating any `MGLMapView` object.
@note: `NSURLSession` objects store a copy of this configuration. Any further changes
to mutable properties on this configuration object passed to a session’s initializer
will not affect the behavior of that session.
*/
@property (atomic, strong, null_resettable) NSURLSessionConfiguration *sessionConfiguration;
@end
NS_ASSUME_NONNULL_END