diff --git a/src/includes/enriching-events/attachment-upload/apple.mdx b/src/includes/enriching-events/attachment-upload/apple.mdx index 664088b1230d4c..3fac11d2e439af 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]; +}]; ```