This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios, macos] Expose the url session configuration object.
- Loading branch information
1 parent
65cec8b
commit 6d5814d
Showing
12 changed files
with
97 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,40 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
#import "MGLFoundation.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
The MGLNetworkConfiguration object provides a global way to set a base API URL for | ||
retrieval of map data, styles, and other resources. | ||
Currently, MGLNetworkConfiguration is private API in code but is able to be used | ||
by any applications via the `MGLMapboxAPIBaseURL` dictionary key in the | ||
application's `Info.plist`. | ||
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. | ||
/** | ||
Returns the shared instance of the `MGLNetworkConfiguration` class. | ||
*/ | ||
@property (class, nonatomic, readonly) MGLNetworkConfiguration *sharedManager; | ||
|
||
/// The current API base URL. If `nil`, the Mapbox default base API URL is in use. | ||
@property (atomic, nullable) NSURL *apiBaseURL; | ||
|
||
/** | ||
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 (strong, null_resettable) NSURLSessionConfiguration *sessionConfiguration; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#import "MGLNetworkConfiguration.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface MGLNetworkConfiguration (Private) | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.