diff --git a/Sources/Sentry/PrivateSentrySDKOnly.m b/Sources/Sentry/PrivateSentrySDKOnly.m index 30a62ab1a2a..040038fa55f 100644 --- a/Sources/Sentry/PrivateSentrySDKOnly.m +++ b/Sources/Sentry/PrivateSentrySDKOnly.m @@ -8,6 +8,7 @@ #import "SentrySerialization.h" #import #import +#import @implementation PrivateSentrySDKOnly @@ -120,6 +121,11 @@ + (SentryScreenFrames *)currentScreenFrames return [SentryFramesTracker sharedInstance].currentFrames; } ++ (NSArray *)captureScreenshots +{ + return [SentryDependencyContainer.sharedInstance.screenshot takeScreenshots]; +} + #endif @end diff --git a/Sources/Sentry/include/PrivateSentrySDKOnly.h b/Sources/Sentry/include/PrivateSentrySDKOnly.h index 6cef3c3ce31..4a81c3f7347 100644 --- a/Sources/Sentry/include/PrivateSentrySDKOnly.h +++ b/Sources/Sentry/include/PrivateSentrySDKOnly.h @@ -95,6 +95,8 @@ typedef void (^SentryOnAppStartMeasurementAvailable)( @property (class, nonatomic, assign, readonly) BOOL isFramesTrackingRunning; @property (class, nonatomic, assign, readonly) SentryScreenFrames *currentScreenFrames; + ++ (NSArray *)captureScreenshots; #endif @end diff --git a/Sources/Sentry/include/SentryScreenshot.h b/Sources/Sentry/include/SentryScreenshot.h index 84afd494836..32d4fdcd556 100644 --- a/Sources/Sentry/include/SentryScreenshot.h +++ b/Sources/Sentry/include/SentryScreenshot.h @@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN - (nullable NSArray *)appScreenshots; - (void)saveScreenShots:(NSString *)path; + +- (NSArray *)takeScreenshots; @end NS_ASSUME_NONNULL_END