Skip to content

Commit 2be5991

Browse files
authored
ref: Use SentrySpan protocol instead of class (#6298)
1 parent d48a247 commit 2be5991

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Sources/Sentry/SentryTimeToDisplayTracker.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
@interface SentryTimeToDisplayTracker () <SentryFramesTrackerListener>
2727

28-
@property (nonatomic, weak) SentrySpan *initialDisplaySpan;
29-
@property (nonatomic, weak) SentrySpan *fullDisplaySpan;
28+
@property (nonatomic, weak) id<SentrySpan> initialDisplaySpan;
29+
@property (nonatomic, weak) id<SentrySpan> fullDisplaySpan;
3030
@property (nonatomic, strong, readonly) SentryDispatchQueueWrapper *dispatchQueueWrapper;
3131

3232
@end
@@ -198,7 +198,7 @@ - (void)framesTrackerHasNewFrame:(NSDate *)newFrameDate
198198
}
199199
}
200200

201-
- (void)addTimeToDisplayMeasurement:(SentrySpan *)span name:(NSString *)name
201+
- (void)addTimeToDisplayMeasurement:(id<SentrySpan>)span name:(NSString *)name
202202
{
203203
NSTimeInterval duration = [span.timestamp timeIntervalSinceDate:span.startTimestamp] * 1000;
204204
[span setMeasurement:name value:@(duration) unit:SentryMeasurementUnitDuration.millisecond];

Sources/Sentry/include/SentryTimeToDisplayTracker.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
#if SENTRY_HAS_UIKIT
44

5-
@class SentrySpan;
65
@class SentryTracer;
76
@class SentryDispatchQueueWrapper;
87
@class UIViewController;
98

9+
@protocol SentrySpan;
10+
1011
NS_ASSUME_NONNULL_BEGIN
1112

1213
/**
@@ -19,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN
1920
@interface SentryTimeToDisplayTracker : NSObject
2021
SENTRY_NO_INIT
2122

22-
@property (nullable, nonatomic, weak, readonly) SentrySpan *initialDisplaySpan;
23+
@property (nullable, nonatomic, weak, readonly) id<SentrySpan> initialDisplaySpan;
2324

24-
@property (nullable, nonatomic, weak, readonly) SentrySpan *fullDisplaySpan;
25+
@property (nullable, nonatomic, weak, readonly) id<SentrySpan> fullDisplaySpan;
2526

2627
@property (nonatomic, readonly) BOOL waitForFullDisplay;
2728

0 commit comments

Comments
 (0)