Skip to content

Commit

Permalink
Fixing UIKIT references
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin committed Feb 21, 2024
1 parent a99524d commit cc5eadf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
13 changes: 11 additions & 2 deletions Sources/Sentry/SentrySessionReplay.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#import "SentryReplaySettings+Private.h"
#import "SentryViewPhotographer.h"

#if SENTRY_HAS_UIKIT

NS_ASSUME_NONNULL_BEGIN

@implementation SentrySessionReplay {
UIView *_rootView;
BOOL _processingScreenshot;
Expand Down Expand Up @@ -77,8 +81,9 @@ - (void)stop
_displayLink = nil;
}

Check warning on line 82 in Sources/Sentry/SentrySessionReplay.m

View check run for this annotation

Codecov / codecov/patch

Sources/Sentry/SentrySessionReplay.m#L80-L82

Added lines #L80 - L82 were not covered by tests

- (NSArray<SentryAttachment *> *)processAttachments:(NSArray<SentryAttachment *> *)attachments
forEvent:(nonnull SentryEvent *)event
- (nullable NSArray<SentryAttachment *> *)processAttachments:
(nullable NSArray<SentryAttachment *> *)attachments
forEvent:(nonnull SentryEvent *)event
{
if (event.error == nil && (event.exceptions == nil || event.exceptions.count == 0)) {
return attachments;

Check warning on line 89 in Sources/Sentry/SentrySessionReplay.m

View check run for this annotation

Codecov / codecov/patch

Sources/Sentry/SentrySessionReplay.m#L89

Added line #L89 was not covered by tests
Expand Down Expand Up @@ -188,3 +193,7 @@ - (void)takeScreenshot
}

Check warning on line 193 in Sources/Sentry/SentrySessionReplay.m

View check run for this annotation

Codecov / codecov/patch

Sources/Sentry/SentrySessionReplay.m#L193

Added line #L193 was not covered by tests

@end

NS_ASSUME_NONNULL_END

#endif // SENTRY_HAS_UIKIT
9 changes: 8 additions & 1 deletion Sources/Sentry/SentrySessionReplayIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#import "SentryReplaySettings.h"
#import "SentrySDK+Private.h"
#import "SentrySessionReplay.h"
#import "SentryUIApplication.h"

#if SENTRY_HAS_UIKIT
# import "SentryUIApplication.h"

NS_ASSUME_NONNULL_BEGIN

@implementation SentrySessionReplayIntegration {
SentrySessionReplay *sessionReplay;
Expand Down Expand Up @@ -66,3 +70,6 @@ - (BOOL)shouldReplayFullSession:(CGFloat)rate
}

Check warning on line 70 in Sources/Sentry/SentrySessionReplayIntegration.m

View check run for this annotation

Codecov / codecov/patch

Sources/Sentry/SentrySessionReplayIntegration.m#L69-L70

Added lines #L69 - L70 were not covered by tests

@end
NS_ASSUME_NONNULL_END

#endif // SENTRY_HAS_UIKIT
2 changes: 2 additions & 0 deletions Sources/Sentry/SentryViewPhotographer.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "SentryViewPhotographer.h"

#if SENTRY_HAS_UIKIT
NS_ASSUME_NONNULL_BEGIN

@implementation SentryViewPhotographer {
NSMutableArray<Class> *_ignoreClasses;
Expand Down Expand Up @@ -151,4 +152,5 @@ - (BOOL)isOpaqueOrHasBackground:(UIView *)view

@end

NS_ASSUME_NONNULL_END
#endif // SENTRY_HAS_UIKIT
6 changes: 5 additions & 1 deletion Sources/Sentry/include/SentrySessionReplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#import "SentryEvent.h"
#import "SentryReplaySettings.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#if SENTRY_HAS_UIKIT

# import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -24,3 +27,4 @@ NS_ASSUME_NONNULL_BEGIN
@end

NS_ASSUME_NONNULL_END
#endif // SENTRY_HAS_UIKIT

0 comments on commit cc5eadf

Please sign in to comment.