-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: Moving session replay public API and default quality (#4326)
Moved session replay API to SentrySDK.replay and changed default quality to medium
- Loading branch information
Showing
15 changed files
with
159 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
#if __has_include(<Sentry/SentryDefines.h>) | ||
# import <Sentry/SentryDefines.h> | ||
#else | ||
# import <SentryWithoutUIKit/SentryDefines.h> | ||
#endif | ||
|
||
#if SENTRY_TARGET_REPLAY_SUPPORTED | ||
|
||
@class UIView; | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface SentryReplayApi : NSObject | ||
|
||
/** | ||
* Marks this view to be redacted during replays. | ||
* | ||
* @warning This is an experimental feature and may still have bugs. | ||
*/ | ||
- (void)redactView:(UIView *)view NS_SWIFT_NAME(redactView(_:)); | ||
|
||
/** | ||
* Marks this view to be ignored during redact step of session replay. | ||
* All its content will be visible in the replay. | ||
* | ||
* @warning This is an experimental feature and may still have bugs. | ||
*/ | ||
- (void)ignoreView:(UIView *)view NS_SWIFT_NAME(ignoreView(_:)); | ||
|
||
/** | ||
* Pauses the replay. | ||
* | ||
* @warning This is an experimental feature and may still have bugs. | ||
*/ | ||
- (void)pause; | ||
|
||
/** | ||
* Resumes the ongoing replay. | ||
* | ||
* @warning This is an experimental feature and may still have bugs. | ||
*/ | ||
- (void)resume; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#import "SentryReplayApi.h" | ||
|
||
#if SENTRY_TARGET_REPLAY_SUPPORTED | ||
|
||
# import "SentryHub+Private.h" | ||
# import "SentrySDK+Private.h" | ||
# import "SentrySessionReplayIntegration.h" | ||
# import "SentrySwift.h" | ||
# import <UIKit/UIKit.h> | ||
|
||
@implementation SentryReplayApi | ||
|
||
- (void)redactView:(UIView *)view | ||
{ | ||
[SentryRedactViewHelper redactView:view]; | ||
} | ||
|
||
- (void)ignoreView:(UIView *)view | ||
{ | ||
[SentryRedactViewHelper ignoreView:view]; | ||
} | ||
|
||
- (void)pause | ||
{ | ||
SentrySessionReplayIntegration *replayIntegration = | ||
[SentrySDK.currentHub getInstalledIntegration:SentrySessionReplayIntegration.class]; | ||
[replayIntegration pause]; | ||
} | ||
|
||
- (void)resume | ||
{ | ||
SentrySessionReplayIntegration *replayIntegration = | ||
[SentrySDK.currentHub getInstalledIntegration:SentrySessionReplayIntegration.class]; | ||
[replayIntegration resume]; | ||
} | ||
|
||
@end | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.