sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

feat: Add isiOSAppOnVisionOS, isiOSAppOnMac, isMacCatalystApp to device context

Open philprime opened this issue 3 weeks ago • 3 comments

:scroll: Description

  • Adds check for isiOSAppOnVisionOS supporting all visionOS versions
  • Adds isiOSAppOnVisionOS, isiOSAppOnMac, isMacCatalystApp to device context

:bulb: Motivation and Context

Closes #3824 Closes #3825

:green_heart: How did you test it?

visionOS

  • Added "Apple Vision (Designed for iPad)" to the list of supported destinations for the sample app iOS-Swift
  • Ran the scheme iOS-Swift
  • Tapped on "Capture Error" to send an error event
  • Checked the event context in Sentry if ios_app_on_visionos, ios_app_on_macos and mac_catalyst_app are set
OS Version Event ios_app_on_visionos ios_app_on_macos mac_catalyst_app
visionOS 26.1 Link
visionOS 26.0 Link
visionOS 2.5 Link
visionOS 2.4 Link
visionOS 2.3 Link
visionOS 2.2 Link
visionOS 2.1 Link
visionOS 2.0 Link
visionOS 1.2 Link
visionOS 1.1 Link
visionOS 1.0 Link

Note: During testing I encountered an unrecognized selector SDK crash on visionOS 1.1, even though it was gated with an availability check. I fixed it by adding the recognized selector check.

Unit Tests

In addition I added a unit test which asserts that the flag isiOSAppOnVisionOS is default false.

:pencil: Checklist

You have to check all boxes before merging:

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

philprime avatar Dec 01 '25 14:12 philprime

Messages
:book: Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by :no_entry_sign: dangerJS against 65c21cbae5744e9c22233a804111e868e2210e35

github-actions[bot] avatar Dec 01 '25 14:12 github-actions[bot]

:warning: JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload. For more help, visit our troubleshooting guide.

codecov[bot] avatar Dec 01 '25 15:12 codecov[bot]

@philprime are you waiting on something in particular for this?

itaybre avatar Dec 12 '25 19:12 itaybre