Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Dec 1, 2025

📜 Description

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

💡 Motivation and Context

Closes #3824
Closes #3825

💚 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.

📝 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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

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

Generated by 🚫 dangerJS against 460cb35

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.753%. Comparing base (33ade5e) to head (460cb35).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #6939       +/-   ##
=============================================
+ Coverage   84.716%   84.753%   +0.037%     
=============================================
  Files          459       459               
  Lines        27494     27528       +34     
  Branches     12120     12137       +17     
=============================================
+ Hits         23292     23331       +39     
- Misses        3942      4158      +216     
+ Partials       260        39      -221     
Files with missing lines Coverage Δ
...Utils/Sources/TestSentryNSProcessInfoWrapper.swift 88.888% <100.000%> (+1.388%) ⬆️
Sources/Swift/Helper/SentryProcessInfo.swift 92.307% <100.000%> (+42.307%) ⬆️
Sources/Swift/SentryCrash/SentryCrashWrapper.swift 93.700% <100.000%> (+0.538%) ⬆️

... and 33 files with indirect coverage changes


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 33ade5e...460cb35. Read the comment docs.

@philprime philprime self-assigned this Dec 3, 2025
@itaybre
Copy link
Contributor

itaybre commented Dec 12, 2025

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

@philprime philprime marked this pull request as ready for review December 23, 2025 14:00
@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Dec 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 23, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1226.02 ms 1254.11 ms 28.09 ms
Size 24.14 KiB 1.03 MiB 1.01 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
35c962f 1207.61 ms 1235.90 ms 28.29 ms
650d802 1231.86 ms 1255.64 ms 23.78 ms
8ea5293 1242.70 ms 1262.25 ms 19.55 ms
e58d7bf 1219.98 ms 1242.39 ms 22.41 ms
4558de2 1225.29 ms 1258.35 ms 33.06 ms
32f2329 1224.36 ms 1257.33 ms 32.98 ms
0f410ad 1193.34 ms 1255.49 ms 62.15 ms
4be5cd8 1222.35 ms 1251.43 ms 29.07 ms
018037b 1209.31 ms 1228.33 ms 19.03 ms
5aa3ce5 1222.78 ms 1245.39 ms 22.61 ms

App size

Revision Plain With Sentry Diff
35c962f 23.75 KiB 854.77 KiB 831.02 KiB
650d802 23.74 KiB 913.13 KiB 889.39 KiB
8ea5293 23.75 KiB 852.24 KiB 828.49 KiB
e58d7bf 24.15 KiB 1.01 MiB 1014.91 KiB
4558de2 24.14 KiB 1.03 MiB 1.00 MiB
32f2329 23.75 KiB 1.01 MiB 1016.02 KiB
0f410ad 24.14 KiB 1.01 MiB 1014.82 KiB
4be5cd8 23.75 KiB 980.80 KiB 957.06 KiB
018037b 23.75 KiB 867.16 KiB 843.41 KiB
5aa3ce5 23.75 KiB 904.54 KiB 880.79 KiB

Previous results on branch: philprime/ios-on-other-platforms-detection

Startup times

Revision Plain With Sentry Diff
dcd43f4 1207.49 ms 1244.20 ms 36.71 ms
1eb6214 1219.90 ms 1237.98 ms 18.08 ms

App size

Revision Plain With Sentry Diff
dcd43f4 24.14 KiB 1.03 MiB 1.01 MiB
1eb6214 24.14 KiB 1.03 MiB 1.01 MiB

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks 🚀

@philprime philprime merged commit e99de93 into main Jan 9, 2026
217 of 222 checks passed
@philprime philprime deleted the philprime/ios-on-other-platforms-detection branch January 9, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows Waiting for: Review ⏳

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identify when iOS app runs on a Mac Identify when iOS app runs on VisionOS

3 participants