Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To use this API converts your report if you wanna creat a custom re… #391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions Source/KSCrash/Reporting/Filters/KSCrashReportFilterAppleFmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,16 @@ typedef enum

- (NSString*)headerStringForSystemInfo:(NSDictionary*)system reportID:(NSString*)reportID crashTime:(NSDate*)crashTime;

/** Converts report to Apple format.
*
* NSArray *reportIDs = [[KSCrash sharedInstance] reportIDs];
* NSDictionary *report = reportIDs[0];
*
* To use this API converts your `report` if you wanna creat a custom report.
* To solve this issue(#390)
*
*Input: NSDictionary
*Output: NSString
*/
- (NSString *)appleStringForReport:(NSDictionary *)report;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -896,4 +896,12 @@ - (NSString*) toAppleFormat:(NSDictionary*) report
return str;
}

- (NSString *)appleStringForReport:(NSDictionary *)report
{
if (![dict objectForKey:@KSCrashField_BinaryImages] || ![dict objectForKey:@KSCrashField_Crash]) {
return nil;
}
return [self toAppleFormat:dict];
}

@end