Skip to content

Conversation

tustanivsky
Copy link

@tustanivsky tustanivsky commented Oct 20, 2025

📜 Description

Updated SentryFeedback to accept [Attachment] objects instead of raw [Data] arrays, enabling proper support for
multiple attachments with full metadata (filename, content type, etc.).

This also introduces some breaking changes to public API:

  • init method signature
  • dataDictionary() method now returns attachments as [[String: Any]] with metadata instead of [Data] affecting consumers of the onSubmitSuccess callback

This issue originally came up in Unreal SDK while adding attachment support for user feedback:

💡 Motivation and Context

The previous implementation had several limitations:

  1. Hardcoded metadata: attachmentsForEnvelope() assumed all attachments were screenshots and hardcoded filename: "screenshot.png" and contentType: "application/png"
  2. Single attachment limitation: Only the first attachment was processed despite accepting an array
  3. Lost metadata: Converting Attachment → Data → Attachment discarded important information like custom filenames and content types
  4. Backend supports multiple: The Sentry backend can successfully process and display multiple feedback attachments, but the SDK wasn't taking advantage of this

💚 How did you test it?

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant