Skip to content

Commit 282016d

Browse files
feat(apple): ClearAttachments on Scope (#3797)
1 parent a974769 commit 282016d

File tree

1 file changed

+9
-0
lines changed
  • src/includes/enriching-events/attachment-upload

1 file changed

+9
-0
lines changed

src/includes/enriching-events/attachment-upload/apple.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ SentrySDK.configureScope { scope in
1212
SentrySDK.captureMessage(message: "my message", block: { scope in
1313
scope.addAttachment(fileAttachment)
1414
})
15+
16+
// Clear all attachments in the global Scope
17+
SentrySDK.configureScope { scope in
18+
scope.clearAttachments()
19+
}
1520
```
1621

1722
```objc {tabTitle:Objective-C}
@@ -30,4 +35,8 @@ SentryAttachment *fileAttachment =
3035
[scope addAttachment:fileAttachment];
3136
}];
3237

38+
// Clear all attachments in the global Scope
39+
[SentrySDK configureScope:^(SentryScope *_Nonnull scope) {
40+
[scope clearAttachments];
41+
}];
3342
```

0 commit comments

Comments
 (0)