File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
- Remove ` GCC_TREAT_WARNINGS_AS_ERRORS ` from the podspec.
3
+ - Reduce pre-main startup time footprint. (#6855 )
3
4
4
5
# v8.0.0
5
6
- Source restructuring to limit the public API surface.
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ @interface GDTCCTUploader () <NSURLSessionDelegate>
80
80
81
81
@implementation GDTCCTUploader
82
82
83
+ @synthesize uploaderSession = _uploaderSession;
84
+
83
85
+ (void )load {
84
86
GDTCCTUploader *uploader = [GDTCCTUploader sharedInstance ];
85
87
[[GDTCORRegistrar sharedInstance ] registerUploader: uploader target: kGDTCORTargetCCT ];
@@ -101,12 +103,18 @@ - (instancetype)init {
101
103
self = [super init ];
102
104
if (self) {
103
105
_uploaderQueue = dispatch_queue_create (" com.google.GDTCCTUploader" , DISPATCH_QUEUE_SERIAL);
104
- NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration ];
106
+ }
107
+ return self;
108
+ }
109
+
110
+ - (NSURLSession *)uploaderSession {
111
+ if (_uploaderSession == nil ) {
112
+ NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration ];
105
113
_uploaderSession = [NSURLSession sessionWithConfiguration: config
106
114
delegate: self
107
115
delegateQueue: nil ];
108
116
}
109
- return self ;
117
+ return _uploaderSession ;
110
118
}
111
119
112
120
/* *
You can’t perform that action at this time.
0 commit comments