Skip to content

Commit

Permalink
more updates based on upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Jun 24, 2024
1 parent 96c7aab commit 1a13827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
5 changes: 0 additions & 5 deletions ios/RNSentryBreadcrumbConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,5 @@

- (instancetype _Nonnull)init;

- (NSArray<SentryRRWebEvent *> *_Nonnull)
convertWithBreadcrumbs:(NSArray<SentryBreadcrumb *> *_Nonnull)breadcrumbs
from:(NSDate *_Nonnull)from
until:(NSDate *_Nonnull)until;

@end
#endif
31 changes: 3 additions & 28 deletions ios/RNSentryBreadcrumbConverter.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,10 @@ - (instancetype _Nonnull)init {
return self;
}

- (NSArray<SentryRRWebEvent *> *_Nonnull)
convertWithBreadcrumbs:(NSArray<SentryBreadcrumb *> *_Nonnull)breadcrumbs
from:(NSDate *_Nonnull)from
until:(NSDate *_Nonnull)until {
NSMutableArray<SentryRRWebEvent *> *outBreadcrumbs = [NSMutableArray array];
for (SentryBreadcrumb *breadcrumb in breadcrumbs) {
// - (NSComparisonResult)compare:(NSDate *)other;
// If:
// The receiver and `other` are exactly equal to each other, NSOrderedSame
// The receiver is later in time than `other`, NSOrderedDescending
// The receiver is earlier in time than `other`, NSOrderedAscending.
if (!breadcrumb.timestamp ||
[breadcrumb.timestamp compare:from] == NSOrderedAscending ||
[breadcrumb.timestamp compare:until] == NSOrderedDescending) {
continue;
}

SentryRRWebEvent *rrwebBreadcrumb = [self convertFrom:breadcrumb];
if (rrwebBreadcrumb) {
[outBreadcrumbs addObject:rrwebBreadcrumb];
}
}
return outBreadcrumbs;
}

- (id<SentryRRWebEvent> _Nullable)convertFrom:

Check failure on line 20 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production dynamic-frameworks

type argument 'SentryRRWebEvent' must be a pointer (requires a '*')

Check failure on line 20 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production dynamic-frameworks

type arguments cannot be applied to non-class type 'id'

Check failure on line 20 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios dev dynamic-frameworks

type argument 'SentryRRWebEvent' must be a pointer (requires a '*')

Check failure on line 20 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios dev dynamic-frameworks

type arguments cannot be applied to non-class type 'id'

Check failure on line 20 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production no-frameworks

type argument 'SentryRRWebEvent' must be a pointer (requires a '*')

Check failure on line 20 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production no-frameworks

type arguments cannot be applied to non-class type 'id'
(SentryBreadcrumb *_Nonnull)breadcrumb {
assert(breadcrumb.timestamp != nil);
assert(breadcrumb.timestamp != nil);

if ([breadcrumb.category isEqualToString:@"touch"]) {
return [SentrySessionReplayIntegration
createBreadcrumbwithTimestamp:breadcrumb.timestamp

Check failure on line 26 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production dynamic-frameworks

no known class method for selector 'createBreadcrumbwithTimestamp:category:message:level:data:'

Check failure on line 26 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios dev dynamic-frameworks

no known class method for selector 'createBreadcrumbwithTimestamp:category:message:level:data:'

Check failure on line 26 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production no-frameworks

no known class method for selector 'createBreadcrumbwithTimestamp:category:message:level:data:'
Expand All @@ -58,7 +33,7 @@ - (instancetype _Nonnull)init {
data:breadcrumb.data];
} else if ([breadcrumb.category isEqualToString:@"navigation"]) {
return [SentrySessionReplayIntegration
createBreadcrumbwithTimestamp:breadcrumb.timestamp ?: 0
createBreadcrumbwithTimestamp:breadcrumb.timestamp ?: 0

Check failure on line 36 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production dynamic-frameworks

no known class method for selector 'createBreadcrumbwithTimestamp:category:message:level:data:'

Check failure on line 36 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios dev dynamic-frameworks

no known class method for selector 'createBreadcrumbwithTimestamp:category:message:level:data:'

Check failure on line 36 in ios/RNSentryBreadcrumbConverter.m

View workflow job for this annotation

GitHub Actions / Build legacy ios production no-frameworks

no known class method for selector 'createBreadcrumbwithTimestamp:category:message:level:data:'
category:breadcrumb.category
message:nil
level:breadcrumb.level
Expand Down

0 comments on commit 1a13827

Please sign in to comment.