summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLNetworkConfiguration.h
blob: e14298f203e90b00e777edd3c4023be3c284311a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#import <Foundation/Foundation.h>

#import "MGLFoundation.h"

@protocol MGLMapboxEventsDelegate;

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;

@property (nonatomic, weak, nullable) id<MGLMapboxEventsDelegate> eventsDelegate;

@end

NS_ASSUME_NONNULL_END