1 |
efrain |
1 |
// Copyright 2019 Google
|
|
|
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 <Foundation/Foundation.h>
|
|
|
16 |
|
|
|
17 |
#include "Crashlytics/Crashlytics/Helpers/FIRCLSFeatures.h"
|
|
|
18 |
|
|
|
19 |
extern NSString *const FIRCLSCustomFatalIndicatorFile;
|
|
|
20 |
extern NSString *const FIRCLSReportBinaryImageFile;
|
|
|
21 |
extern NSString *const FIRCLSReportExceptionFile;
|
|
|
22 |
extern NSString *const FIRCLSReportCustomExceptionAFile;
|
|
|
23 |
extern NSString *const FIRCLSReportCustomExceptionBFile;
|
|
|
24 |
extern NSString *const FIRCLSReportSignalFile;
|
|
|
25 |
extern NSString *const FIRCLSMetricKitFatalReportFile;
|
|
|
26 |
extern NSString *const FIRCLSMetricKitNonfatalReportFile;
|
|
|
27 |
#if CLS_MACH_EXCEPTION_SUPPORTED
|
|
|
28 |
extern NSString *const FIRCLSReportMachExceptionFile;
|
|
|
29 |
#endif
|
|
|
30 |
extern NSString *const FIRCLSReportErrorAFile;
|
|
|
31 |
extern NSString *const FIRCLSReportErrorBFile;
|
|
|
32 |
extern NSString *const FIRCLSReportLogAFile;
|
|
|
33 |
extern NSString *const FIRCLSReportLogBFile;
|
|
|
34 |
extern NSString *const FIRCLSReportMetadataFile;
|
|
|
35 |
extern NSString *const FIRCLSReportInternalIncrementalKVFile;
|
|
|
36 |
extern NSString *const FIRCLSReportInternalCompactedKVFile;
|
|
|
37 |
extern NSString *const FIRCLSReportUserIncrementalKVFile;
|
|
|
38 |
extern NSString *const FIRCLSReportUserCompactedKVFile;
|
|
|
39 |
|
|
|
40 |
@class FIRCLSFileManager;
|
|
|
41 |
|
|
|
42 |
@interface FIRCLSInternalReport : NSObject
|
|
|
43 |
|
|
|
44 |
+ (instancetype)reportWithPath:(NSString *)path;
|
|
|
45 |
- (instancetype)initWithPath:(NSString *)path
|
|
|
46 |
executionIdentifier:(NSString *)identifier NS_DESIGNATED_INITIALIZER;
|
|
|
47 |
- (instancetype)initWithPath:(NSString *)path;
|
|
|
48 |
- (instancetype)init NS_UNAVAILABLE;
|
|
|
49 |
+ (instancetype)new NS_UNAVAILABLE;
|
|
|
50 |
|
|
|
51 |
+ (NSArray *)crashFileNames;
|
|
|
52 |
|
|
|
53 |
@property(nonatomic, copy, readonly) NSString *directoryName;
|
|
|
54 |
@property(nonatomic, copy) NSString *path;
|
|
|
55 |
@property(nonatomic, assign, readonly) BOOL hasAnyEvents;
|
|
|
56 |
|
|
|
57 |
// content paths
|
|
|
58 |
@property(nonatomic, copy, readonly) NSString *binaryImagePath;
|
|
|
59 |
@property(nonatomic, copy, readonly) NSString *metadataPath;
|
|
|
60 |
|
|
|
61 |
- (void)enumerateSymbolicatableFilesInContent:(void (^)(NSString *path))block;
|
|
|
62 |
|
|
|
63 |
- (NSString *)pathForContentFile:(NSString *)name;
|
|
|
64 |
|
|
|
65 |
// Metadata Helpers
|
|
|
66 |
|
|
|
67 |
/**
|
|
|
68 |
* Returns the org id for the report.
|
|
|
69 |
**/
|
|
|
70 |
@property(nonatomic, copy, readonly) NSString *orgID;
|
|
|
71 |
|
|
|
72 |
/**
|
|
|
73 |
* Returns the Install UUID for the report.
|
|
|
74 |
**/
|
|
|
75 |
@property(nonatomic, copy, readonly) NSString *installID;
|
|
|
76 |
|
|
|
77 |
/**
|
|
|
78 |
* Returns true if report contains a signal, mach exception or unhandled exception record, false
|
|
|
79 |
* otherwise.
|
|
|
80 |
**/
|
|
|
81 |
@property(nonatomic, assign, readonly) BOOL isCrash;
|
|
|
82 |
|
|
|
83 |
/**
|
|
|
84 |
* Returns the session identifier for the report.
|
|
|
85 |
**/
|
|
|
86 |
@property(nonatomic, copy, readonly) NSString *identifier;
|
|
|
87 |
|
|
|
88 |
/**
|
|
|
89 |
* Returns the custom key value data for the report.
|
|
|
90 |
**/
|
|
|
91 |
@property(nonatomic, copy, readonly) NSDictionary *customKeys;
|
|
|
92 |
|
|
|
93 |
/**
|
|
|
94 |
* Returns the CFBundleVersion of the application that generated the report.
|
|
|
95 |
**/
|
|
|
96 |
@property(nonatomic, copy, readonly) NSString *bundleVersion;
|
|
|
97 |
|
|
|
98 |
/**
|
|
|
99 |
* Returns the CFBundleShortVersionString of the application that generated the report.
|
|
|
100 |
**/
|
|
|
101 |
@property(nonatomic, copy, readonly) NSString *bundleShortVersionString;
|
|
|
102 |
|
|
|
103 |
/**
|
|
|
104 |
* Returns the date that the report was created.
|
|
|
105 |
**/
|
|
|
106 |
@property(nonatomic, copy, readonly) NSDate *dateCreated;
|
|
|
107 |
|
|
|
108 |
@property(nonatomic, copy, readonly) NSDate *crashedOnDate;
|
|
|
109 |
|
|
|
110 |
/**
|
|
|
111 |
* Returns the os version that the application crashed on.
|
|
|
112 |
**/
|
|
|
113 |
@property(nonatomic, copy, readonly) NSString *OSVersion;
|
|
|
114 |
|
|
|
115 |
/**
|
|
|
116 |
* Returns the os build version that the application crashed on.
|
|
|
117 |
**/
|
|
|
118 |
@property(nonatomic, copy, readonly) NSString *OSBuildVersion;
|
|
|
119 |
|
|
|
120 |
@end
|