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

Renamed RollbarCrashReport to RollbarRawCrashReport in RollbarNotifier #313

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarBody.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import "RollbarBody.h"

#import "RollbarMessage.h"
#import "RollbarCrashReport.h"
#import "RollbarRawCrashReport.h"
#import "RollbarTrace.h"
#import "RollbarTelemetry.h"
#import "RollbarTelemetryEvent.h"
Expand All @@ -27,15 +27,15 @@ - (void)setMessage:(RollbarMessage *)message {
[self setDictionary:message.jsonFriendlyData forKey:DFK_MESSAGE];
}

- (nullable RollbarCrashReport *)crashReport {
- (nullable RollbarRawCrashReport *)crashReport {
id data = [self getDataByKey:DFK_CRASH_REPORT];
if (data != nil) {
return [[RollbarCrashReport alloc] initWithDictionary:data];
return [[RollbarRawCrashReport alloc] initWithDictionary:data];
}
return nil;
}

- (void)setCrashReport:(RollbarCrashReport *)crashReport {
- (void)setCrashReport:(RollbarRawCrashReport *)crashReport {
[self setDictionary:crashReport.jsonFriendlyData forKey:DFK_CRASH_REPORT];
}

Expand Down Expand Up @@ -132,7 +132,7 @@ -(instancetype)initWithCrashReport:(nonnull NSString *)crashReport {

self = [super initWithDictionary:@{
DFK_MESSAGE: [NSNull null],
DFK_CRASH_REPORT: [[RollbarCrashReport alloc] initWithRawCrashReport:crashReport].jsonFriendlyData,
DFK_CRASH_REPORT: [[RollbarRawCrashReport alloc] initWithRawCrashReport:crashReport].jsonFriendlyData,
DFK_TRACE: [NSNull null],
// if/when we do allow a trace side-by-side with the crash report use the following line instead of code line above:
//DFK_TRACE: [[RollbarTrace alloc] initWithCrashReport:crashReport].jsonFriendlyData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#import "RollbarCrashReport.h"
#import <Foundation/Foundation.h>
#import "RollbarRawCrashReport.h"

static NSString * const DFK_RAW = @"raw";

@implementation RollbarCrashReport
@implementation RollbarRawCrashReport

#pragma mark - Properties

Expand Down
4 changes: 2 additions & 2 deletions RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@class RollbarTelemetry;
@class RollbarTrace;
@class RollbarMessage;
@class RollbarCrashReport;
@class RollbarRawCrashReport;
@class RollbarTelemetryEvent;

NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN

// Payload Option 4: "crash_report"
// Only one of "trace", "trace_chain", "message", or "crash_report" should be present.
@property (nonatomic, strong, nullable) RollbarCrashReport *crashReport;
@property (nonatomic, strong, nullable) RollbarRawCrashReport *crashReport;

#pragma mark - Optional properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#import "RollbarCallStackFrame.h"
#import "RollbarCallStackFrameContext.h"
#import "RollbarException.h"
#import "RollbarCrashReport.h"
#import "RollbarRawCrashReport.h"
#import "RollbarConfig.h"
#import "RollbarServerConfig.h"
#import "RollbarDestination.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef RollbarCrashReport_h
#define RollbarCrashReport_h
#ifndef RollbarRawCrashReport_h
#define RollbarRawCrashReport_h

@import RollbarCommon;

NS_ASSUME_NONNULL_BEGIN

/// Crash report payload element
@interface RollbarCrashReport : RollbarDTO
@interface RollbarRawCrashReport : RollbarDTO

#pragma mark - Properties

Expand All @@ -25,4 +25,4 @@ NS_ASSUME_NONNULL_BEGIN

NS_ASSUME_NONNULL_END

#endif //RollbarCrashReport_h
#endif //RollbarRawCrashReport_h