Skip to content

Commit

Permalink
Removing custom sentry-cocoa fork.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeper-luke committed Feb 29, 2024
1 parent d37430d commit fdc574b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
34 changes: 20 additions & 14 deletions ios/RNSentry.m
Original file line number Diff line number Diff line change
Expand Up @@ -429,21 +429,27 @@ - (void)setEventEnvironmentTag:(SentryEvent *)event
rejecter:(RCTPromiseRejectBlock)reject)
{
[SentrySDK configureScope:^(SentryScope * _Nonnull scope) {
NSArray<SentryBreadcrumb *> *breadcrumbs = [scope breadcrumbs];
NSMutableArray *breadcrumbsArray = [NSMutableArray arrayWithCapacity:[breadcrumbs count]];

for (SentryBreadcrumb *breadcrumb in breadcrumbs) {
NSDictionary *breadcrumbDict = @{
@"message": breadcrumb.message ?: [NSNull null],
@"category": breadcrumb.category ?: [NSNull null],
@"type": breadcrumb.type ?: [NSNull null],
@"data": breadcrumb.data ?: [NSNull null],
@"level": @(breadcrumb.level).stringValue,
};
[breadcrumbsArray addObject:breadcrumbDict];
}
@try {
NSArray<SentryBreadcrumb *> *breadcrumbs = [scope valueForKey:@"breadcrumbs"];
NSMutableArray *breadcrumbsArray = [NSMutableArray arrayWithCapacity:[breadcrumbs count]];

for (SentryBreadcrumb *breadcrumb in breadcrumbs) {
NSDictionary *breadcrumbDict = @{
@"message": breadcrumb.message ?: [NSNull null],
@"category": breadcrumb.category ?: [NSNull null],
@"type": breadcrumb.type ?: [NSNull null],
@"data": breadcrumb.data ?: [NSNull null],
@"level": @(breadcrumb.level).stringValue,
};
[breadcrumbsArray addObject:breadcrumbDict];
}

resolve(breadcrumbsArray);
resolve(breadcrumbsArray);
}
@catch (NSException *exception) {
// Handle the error if the property is not accessible.
reject(@"error", @"Unable to access breadcrumbs", nil);
}
}];
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sentry/react-native",
"homepage": "https://github.com/getsentry/sentry-react-native",
"repository": "https://github.com/getsentry/sentry-react-native",
"version": "1.5.9",
"version": "1.5.10",
"description": "Official Sentry SDK for react-native",
"typings": "dist/js/index.d.ts",
"types": "dist/js/index.d.ts",
Expand Down
2 changes: 0 additions & 2 deletions sample/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ target 'sample' do
pod 'RNSentry', :path => '../../RNSentry.podspec'
end

pod 'Sentry', :git => 'https://github.com/blitzstudios/sentry-cocoa.git', :branch => 'release/1.0'

target 'sampleTests' do
inherit! :complete
# Pods for testing
Expand Down

0 comments on commit fdc574b

Please sign in to comment.