1 |
efrain |
1 |
// Copyright 2021 Google LLC
|
|
|
2 |
//
|
|
|
3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
4 |
// you may not use this file except in compliance with the License.
|
|
|
5 |
// You may obtain a copy of the License at
|
|
|
6 |
//
|
|
|
7 |
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
8 |
//
|
|
|
9 |
// Unless required by applicable law or agreed to in writing, software
|
|
|
10 |
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
12 |
// See the License for the specific language governing permissions and
|
|
|
13 |
// limitations under the License.
|
|
|
14 |
|
|
|
15 |
#import "Crashlytics/Crashlytics/Controllers/FIRCLSManagerData.h"
|
|
|
16 |
|
|
|
17 |
#import "Crashlytics/Crashlytics/Components/FIRCLSApplication.h"
|
|
|
18 |
#import "Crashlytics/Crashlytics/Models/FIRCLSExecutionIdentifierModel.h"
|
|
|
19 |
#import "Crashlytics/Crashlytics/Models/FIRCLSInstallIdentifierModel.h"
|
|
|
20 |
#import "Crashlytics/Crashlytics/Models/FIRCLSSettings.h"
|
|
|
21 |
#import "Crashlytics/Crashlytics/Private/FIRCLSOnDemandModel_Private.h"
|
|
|
22 |
#import "Crashlytics/Crashlytics/Settings/Models/FIRCLSApplicationIdentifierModel.h"
|
|
|
23 |
|
|
|
24 |
@implementation FIRCLSManagerData
|
|
|
25 |
|
|
|
26 |
- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
|
|
|
27 |
googleTransport:(GDTCORTransport *)googleTransport
|
|
|
28 |
installations:(FIRInstallations *)installations
|
|
|
29 |
analytics:(nullable id<FIRAnalyticsInterop>)analytics
|
|
|
30 |
fileManager:(FIRCLSFileManager *)fileManager
|
|
|
31 |
dataArbiter:(FIRCLSDataCollectionArbiter *)dataArbiter
|
|
|
32 |
settings:(FIRCLSSettings *)settings
|
|
|
33 |
onDemandModel:(FIRCLSOnDemandModel *)onDemandModel {
|
|
|
34 |
self = [super init];
|
|
|
35 |
if (!self) {
|
|
|
36 |
return nil;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
_googleAppID = googleAppID;
|
|
|
40 |
_googleTransport = googleTransport;
|
|
|
41 |
_installations = installations;
|
|
|
42 |
_analytics = analytics;
|
|
|
43 |
_fileManager = fileManager;
|
|
|
44 |
_dataArbiter = dataArbiter;
|
|
|
45 |
_settings = settings;
|
|
|
46 |
_onDemandModel = onDemandModel;
|
|
|
47 |
|
|
|
48 |
_appIDModel = [[FIRCLSApplicationIdentifierModel alloc] init];
|
|
|
49 |
_installIDModel = [[FIRCLSInstallIdentifierModel alloc] initWithInstallations:installations];
|
|
|
50 |
_executionIDModel = [[FIRCLSExecutionIdentifierModel alloc] init];
|
|
|
51 |
|
|
|
52 |
NSString *sdkBundleID = FIRCLSApplicationGetSDKBundleID();
|
|
|
53 |
_operationQueue = [NSOperationQueue new];
|
|
|
54 |
[_operationQueue setMaxConcurrentOperationCount:1];
|
|
|
55 |
[_operationQueue setName:[sdkBundleID stringByAppendingString:@".work-queue"]];
|
|
|
56 |
|
|
|
57 |
_dispatchQueue = dispatch_queue_create("com.google.firebase.crashlytics.startup", 0);
|
|
|
58 |
_operationQueue.underlyingQueue = _dispatchQueue;
|
|
|
59 |
|
|
|
60 |
return self;
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
@end
|