From 1b50cb0f923a0fde65d9c0d9e9de13af42c87d7e Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 25 Jun 2021 09:57:25 +0200 Subject: [PATCH] feat(apple): ClearAttachments on Scope --- .../enriching-events/attachment-upload/apple.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/includes/enriching-events/attachment-upload/apple.mdx b/src/includes/enriching-events/attachment-upload/apple.mdx index 664088b1230d4..3fac11d2e439a 100644 --- a/src/includes/enriching-events/attachment-upload/apple.mdx +++ b/src/includes/enriching-events/attachment-upload/apple.mdx @@ -12,6 +12,11 @@ SentrySDK.configureScope { scope in SentrySDK.captureMessage(message: "my message", block: { scope in scope.addAttachment(fileAttachment) }) + +// Clear all attachments in the global Scope +SentrySDK.configureScope { scope in + scope.clearAttachments() +} ``` ```objc {tabTitle:Objective-C} @@ -30,4 +35,8 @@ SentryAttachment *fileAttachment = [scope addAttachment:fileAttachment]; }]; +// Clear all attachments in the global Scope +[SentrySDK configureScope:^(SentryScope *_Nonnull scope) { + [scope clearAttachments]; +}]; ```