|
2 | 2 |
|
3 | 3 | #import "SentryDefaultThreadInspector.h" |
4 | 4 | #import "SentryDelayedFramesTracker.h" |
| 5 | +#import "SentryDependencyContainerSwiftHelper.h" |
5 | 6 | #import "SentryInternalCDefines.h" |
6 | 7 | #import "SentryInternalDefines.h" |
7 | 8 | #import "SentryLogC.h" |
@@ -59,6 +60,9 @@ @interface SentryFileManager () <SentryFileManagerProtocol> |
59 | 60 | @end |
60 | 61 |
|
61 | 62 | #if SENTRY_HAS_UIKIT |
| 63 | +@interface SentryDefaultRedactOptions () <SentryRedactOptions> |
| 64 | +@end |
| 65 | + |
62 | 66 | @interface SentryWatchdogTerminationScopeObserver () <SentryScopeObserver> |
63 | 67 | @end |
64 | 68 |
|
@@ -272,21 +276,23 @@ - (nonnull SentryScreenshotSource *)screenshotSource SENTRY_THREAD_SANITIZER_DOU |
272 | 276 | if (_screenshotSource == nil) { |
273 | 277 | // The options could be null here, but this is a general issue in the dependency |
274 | 278 | // container and will be fixed in a future refactoring. |
275 | | - SentryViewScreenshotOptions *_Nonnull options = SENTRY_UNWRAP_NULLABLE( |
276 | | - SentryViewScreenshotOptions, SentrySDKInternal.options.screenshot); |
| 279 | + SentryOptions *_Nonnull options |
| 280 | + = SENTRY_UNWRAP_NULLABLE(SentryOptions, SentrySDKInternal.options); |
277 | 281 |
|
278 | 282 | id<SentryViewRenderer> viewRenderer; |
279 | | - if (options.enableViewRendererV2) { |
| 283 | + if ([SentryDependencyContainerSwiftHelper viewRendererV2Enabled:options]) { |
280 | 284 | viewRenderer = [[SentryViewRendererV2 alloc] |
281 | | - initWithEnableFastViewRendering:options.enableFastViewRendering]; |
| 285 | + initWithEnableFastViewRendering:[SentryDependencyContainerSwiftHelper |
| 286 | + fastViewRenderingEnabled:options]]; |
282 | 287 | } else { |
283 | 288 | viewRenderer = [[SentryDefaultViewRenderer alloc] init]; |
284 | 289 | } |
285 | 290 |
|
286 | | - SentryViewPhotographer *photographer = |
287 | | - [[SentryViewPhotographer alloc] initWithRenderer:viewRenderer |
288 | | - redactOptions:options |
289 | | - enableMaskRendererV2:options.enableViewRendererV2]; |
| 291 | + SentryViewPhotographer *photographer = [[SentryViewPhotographer alloc] |
| 292 | + initWithRenderer:viewRenderer |
| 293 | + redactOptions:[SentryDependencyContainerSwiftHelper redactOptions:options] |
| 294 | + enableMaskRendererV2:[SentryDependencyContainerSwiftHelper |
| 295 | + viewRendererV2Enabled:options]]; |
290 | 296 | _screenshotSource = [[SentryScreenshotSource alloc] initWithPhotographer:photographer]; |
291 | 297 | } |
292 | 298 |
|
|
0 commit comments