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.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@f5c28e7). Learn more about missing BASE report.
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
...ift/Integrations/UserFeedback/SentryFeedback.swift 0.000% 11 Missing ⚠️
...UserFeedback/SentryUserFeedbackFormViewModel.swift 0.000% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6459   +/-   ##
=======================================
  Coverage        ?   8.096%           
=======================================
  Files           ?      419           
  Lines           ?    29865           
  Branches        ?    11745           
=======================================
  Hits            ?     2418           
  Misses          ?    27137           
  Partials        ?      310           
Files with missing lines Coverage Δ
...UserFeedback/SentryUserFeedbackFormViewModel.swift 0.000% <0.000%> (ø)
...ift/Integrations/UserFeedback/SentryFeedback.swift 0.000% <0.000%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5c28e7...8d5be89. Read the comment docs.

@itaybre itaybre closed this Oct 27, 2025
@itaybre itaybre reopened this Oct 27, 2025
@itaybre
Copy link
Contributor

itaybre commented Oct 27, 2025

(Closed and reopened this to retrigger workflows)

@tustanivsky
Copy link
Author

(Closed and reopened this to retrigger workflows)

@itaybre Apparently running workflows require manual approval

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.

2 participants