Skip to content
Merged
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
9 changes: 9 additions & 0 deletions ios/RNInstabug/InstabugCrashReportingBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ + (BOOL)requiresMainQueueSetup
RCT_EXPORT_METHOD(sendJSCrash:(NSDictionary *)stackTrace
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject) {

dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul);
dispatch_async(queue, ^{
[IBGCrashReporting cp_reportFatalCrashWithStackTrace:stackTrace];
Expand All @@ -40,6 +41,14 @@ + (BOOL)requiresMainQueueSetup
userAttributes:(nullable NSDictionary *)userAttributes fingerprint:(nullable NSString *)fingerprint nonFatalExceptionLevel:(IBGNonFatalLevel)nonFatalExceptionLevel
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject) {

if([fingerprint isKindOfClass:NSNull.class]){
fingerprint = nil;
}

if([userAttributes isKindOfClass:NSNull.class]){
userAttributes = nil;
}
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
dispatch_async(queue, ^{
[IBGCrashReporting cp_reportNonFatalCrashWithStackTrace:stackTrace level:nonFatalExceptionLevel groupingString:fingerprint userAttributes:userAttributes];
Expand Down