Skip to content

feat(visionos): Add visionOS sample app - #6676

Open
antonis wants to merge 9 commits into
mainfrom
feat/visionos-sample
Open

feat(visionos): Add visionOS sample app#6676
antonis wants to merge 9 commits into
mainfrom
feat/visionos-sample

Conversation

@antonis

@antonis antonis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • New feature
  • Bugfix

📜 Description

💡 Motivation and Context

Closes #6669.
Partially #6648

💚 How did you test it?

Screenshot 2026-09-04 at 14 23 28

📝 Checklist

  • I added tests to verify 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.
  • All tests passing.
  • No breaking changes.

🔮 Next steps

antonis and others added 2 commits September 4, 2026 14:26
`postDidBecomeActiveNotification` references `UIApplication`/`NSApplication`
without importing the owning framework. On iOS/tvOS these were pulled in
transitively; visionOS's stricter module compilation requires the import
before use. Add an explicit guarded import mirroring the usage site.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a visionOS sample built on @callstack/react-native-visionos, wired to
@sentry/react-native and driven by yarn like the other samples. Verified to
build against the local SDK on the visionOS Simulator.

Two sample-local Podfile workarounds are documented inline:
- REACT_NATIVE_NODE_MODULES_DIR pins the podspec's RN feature detection to
  this sample's react-native (0.79), since CocoaPods evaluates RNSentry.podspec
  from packages/core and would otherwise resolve the SDK's own newer RN.
- A post_install patch forces FMT_USE_CONSTEVAL off for fmt 11.0.2 under
  Xcode 26's stricter C++20 consteval.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(visionos): Add visionOS sample app by antonis in #6676
  • ref(ios): Remove deprecated private SDK API usage by philprime in #6647
  • chore(deps): update Cocoa SDK to v9.27.0 by github-actions in #6670
  • chore(deps): update Sentry Android Gradle Plugin to v6.21.0 by github-actions in #6671
  • chore(deps): Bump fast-uri to ^3.1.6 to resolve security alerts by antonis in #6662
  • chore(deps): Bump qs to ^6.16.0 to resolve security alerts by antonis in #6663
  • chore(deps): Bump @xmldom/xmldom pins to patched versions to resolve security alerts by antonis in #6664
  • docs: Revamp root and nested AGENTS.md by antonis in #6666

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Sep 4, 2026

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

Generated by 🚫 dangerJS against c6f9dec

@socket-security

socket-security Bot commented Sep 4, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis
antonis force-pushed the feat/visionos-sample branch from b9c1ce4 to e9ca804 Compare September 4, 2026 12:28
Comment thread yarn.lock Outdated
Comment thread yarn.lock Outdated
antonis and others added 3 commits September 4, 2026 14:43
Resolves the Critical OS command injection advisory (CVE-2025-11953 /
GHSA-399j-vxmf-hjvr) in the Metro dev server. Dev-only sample dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Compile the visionOS sample against the local SDK on macos-26 (Xcode 26,
visionOS Simulator SDK preinstalled) for a generic simulator destination.
Build-only gate, mirroring build-macos. Fold the sample into the existing
sample_react_native change filter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fixes clang-format violations in the scaffolded XCTest file flagged by the
Lint job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Sep 4, 2026
Drop the stale `< 1.3.4` pin (a template workaround for the dropped implicit
logger dependency, already mitigated by the explicit `gem 'logger'`) so the
gem floats to a patched release, matching the other samples. Clears the
high-severity AtomicReference#update Float::NAN livelock advisory.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis

antonis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@cursor review

@antonis

antonis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@sentry review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit aa9892f. Configure here.

@sentry

sentry Bot commented Sep 4, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.25.0 (105) Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3856.33 ms 1224.19 ms -2632.14 ms
Size 5.15 MiB 6.88 MiB 1.73 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
64630e5+dirty 3842.70 ms 1218.11 ms -2624.60 ms
b0d3373+dirty 3831.75 ms 1227.29 ms -2604.46 ms
b04af96+dirty 3818.92 ms 1219.76 ms -2599.16 ms
3d31fcf+dirty 3838.09 ms 1223.46 ms -2614.63 ms
a0a3177+dirty 3844.73 ms 1225.23 ms -2619.51 ms
af33f3b+dirty 3849.98 ms 1236.45 ms -2613.53 ms
09a902f+dirty 3835.67 ms 1217.11 ms -2618.57 ms
5a316ea+dirty 3820.11 ms 1211.28 ms -2608.83 ms
acd838e+dirty 3849.78 ms 1230.00 ms -2619.78 ms
c2e182c+dirty 3848.40 ms 1211.79 ms -2636.61 ms

App size

Revision Plain With Sentry Diff
64630e5+dirty 4.98 MiB 6.46 MiB 1.49 MiB
b0d3373+dirty 5.15 MiB 6.68 MiB 1.53 MiB
b04af96+dirty 4.98 MiB 6.54 MiB 1.56 MiB
3d31fcf+dirty 4.98 MiB 6.56 MiB 1.58 MiB
a0a3177+dirty 4.98 MiB 6.55 MiB 1.58 MiB
af33f3b+dirty 4.98 MiB 6.51 MiB 1.54 MiB
09a902f+dirty 4.98 MiB 6.46 MiB 1.49 MiB
5a316ea+dirty 4.98 MiB 6.51 MiB 1.53 MiB
acd838e+dirty 5.15 MiB 6.70 MiB 1.55 MiB
c2e182c+dirty 4.98 MiB 6.50 MiB 1.52 MiB

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 418.14 ms 432.35 ms 14.20 ms
Size 50.56 MiB 56.46 MiB 5.90 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
68672fc+dirty 425.02 ms 487.56 ms 62.54 ms
71abba0+dirty 496.54 ms 525.16 ms 28.63 ms
7ff4d0f+dirty 413.81 ms 450.64 ms 36.83 ms
9ad4522+dirty 420.73 ms 444.18 ms 23.45 ms
0a147b2+dirty 464.71 ms 538.81 ms 74.09 ms
d2eadf8+dirty 414.64 ms 454.56 ms 39.92 ms
57e0069+dirty 413.82 ms 453.47 ms 39.65 ms
26843eb+dirty 532.15 ms 624.13 ms 91.98 ms
9210ae6+dirty 475.41 ms 525.24 ms 49.84 ms
1e5d96d+dirty 519.43 ms 543.62 ms 24.19 ms

App size

Revision Plain With Sentry Diff
68672fc+dirty 48.30 MiB 53.61 MiB 5.31 MiB
71abba0+dirty 48.30 MiB 53.49 MiB 5.19 MiB
7ff4d0f+dirty 48.30 MiB 53.60 MiB 5.30 MiB
9ad4522+dirty 49.74 MiB 55.38 MiB 5.63 MiB
0a147b2+dirty 49.74 MiB 55.08 MiB 5.34 MiB
d2eadf8+dirty 48.30 MiB 53.48 MiB 5.18 MiB
57e0069+dirty 49.74 MiB 54.85 MiB 5.11 MiB
26843eb+dirty 49.74 MiB 55.26 MiB 5.52 MiB
9210ae6+dirty 48.30 MiB 53.54 MiB 5.23 MiB
1e5d96d+dirty 49.74 MiB 54.81 MiB 5.07 MiB

Previous results on branch: feat/visionos-sample

Startup times

Revision Plain With Sentry Diff
50f60e2+dirty 422.98 ms 472.66 ms 49.68 ms

App size

Revision Plain With Sentry Diff
50f60e2+dirty 50.56 MiB 56.46 MiB 5.90 MiB

Comment thread samples/react-native-visionos/visionos/VisionSampleTests/VisionSampleTests.m Outdated
@antonis
antonis marked this pull request as ready for review September 4, 2026 13:17
Comment thread samples/react-native-visionos/visionos/VisionSample.xcodeproj/project.pbxproj Outdated
Comment thread samples/react-native-visionos/visionos/VisionSampleTests/VisionSampleTests.m Outdated
@antonis
antonis marked this pull request as draft September 4, 2026 13:41
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 422.15 ms 444.58 ms 22.43 ms
Size 50.56 MiB 56.46 MiB 5.90 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
eb93136+dirty 500.37 ms 532.58 ms 32.21 ms
9210ae6+dirty 444.14 ms 459.80 ms 15.66 ms
94af3bd+dirty 413.04 ms 451.76 ms 38.71 ms
7d6fd3a+dirty 435.06 ms 458.78 ms 23.72 ms
15d4514+dirty 413.63 ms 449.62 ms 35.99 ms
9ad4522+dirty 432.43 ms 450.91 ms 18.49 ms
0a147b2+dirty 442.80 ms 522.24 ms 79.44 ms
7887847+dirty 420.47 ms 460.55 ms 40.08 ms
a3265b6+dirty 410.96 ms 444.76 ms 33.80 ms
57e0069+dirty 442.25 ms 486.64 ms 44.39 ms

App size

Revision Plain With Sentry Diff
eb93136+dirty 48.30 MiB 53.58 MiB 5.28 MiB
9210ae6+dirty 48.30 MiB 53.54 MiB 5.23 MiB
94af3bd+dirty 48.30 MiB 53.57 MiB 5.26 MiB
7d6fd3a+dirty 43.94 MiB 49.00 MiB 5.06 MiB
15d4514+dirty 48.30 MiB 53.60 MiB 5.30 MiB
9ad4522+dirty 49.74 MiB 55.38 MiB 5.63 MiB
0a147b2+dirty 49.74 MiB 55.08 MiB 5.34 MiB
7887847+dirty 49.74 MiB 54.81 MiB 5.07 MiB
a3265b6+dirty 48.30 MiB 53.58 MiB 5.28 MiB
57e0069+dirty 49.74 MiB 54.85 MiB 5.11 MiB

Previous results on branch: feat/visionos-sample

Startup times

Revision Plain With Sentry Diff
50f60e2+dirty 433.74 ms 443.36 ms 9.62 ms

App size

Revision Plain With Sentry Diff
50f60e2+dirty 50.56 MiB 56.46 MiB 5.90 MiB

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3870.70 ms 1239.43 ms -2631.27 ms
Size 5.15 MiB 6.88 MiB 1.73 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ef27341+dirty 3835.20 ms 1212.23 ms -2622.97 ms
d387874+dirty 3838.71 ms 1211.11 ms -2627.60 ms
4acd4e9+dirty 3806.73 ms 1208.48 ms -2598.25 ms
0b1b5e3+dirty 3820.72 ms 1207.94 ms -2612.78 ms
267d3ed+dirty 3860.14 ms 1223.39 ms -2636.76 ms
f10c99a+dirty 3829.43 ms 1212.98 ms -2616.45 ms
853723c+dirty 3849.33 ms 1221.07 ms -2628.26 ms
9474ead+dirty 3823.33 ms 1208.31 ms -2615.03 ms
3d377b5+dirty 1201.55 ms 1201.80 ms 0.25 ms
61cc206+dirty 3822.60 ms 1206.17 ms -2616.43 ms

App size

Revision Plain With Sentry Diff
ef27341+dirty 5.15 MiB 6.68 MiB 1.53 MiB
d387874+dirty 5.08 MiB 6.68 MiB 1.60 MiB
4acd4e9+dirty 4.98 MiB 6.53 MiB 1.55 MiB
0b1b5e3+dirty 5.15 MiB 6.70 MiB 1.54 MiB
267d3ed+dirty 5.15 MiB 6.69 MiB 1.54 MiB
f10c99a+dirty 5.08 MiB 6.80 MiB 1.72 MiB
853723c+dirty 5.15 MiB 6.69 MiB 1.53 MiB
9474ead+dirty 5.15 MiB 6.71 MiB 1.55 MiB
3d377b5+dirty 3.38 MiB 4.76 MiB 1.38 MiB
61cc206+dirty 4.98 MiB 6.55 MiB 1.57 MiB

Previous results on branch: feat/visionos-sample

Startup times

Revision Plain With Sentry Diff
50f60e2+dirty 3872.83 ms 1242.77 ms -2630.06 ms

App size

Revision Plain With Sentry Diff
50f60e2+dirty 5.15 MiB 6.88 MiB 1.73 MiB

Set SDKROOT to xros on both project configs to match the target's
SUPPORTED_PLATFORMS, and reach the test root view controller through the
active window scene instead of AppDelegate.window (absent under the
SwiftUI RCTMainWindow lifecycle).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis
antonis marked this pull request as ready for review September 4, 2026 14:11
Comment on lines +37 to +40
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

visionOS sample requires obsolete armv7 device capability

Replace armv7 with arm64 in UIRequiredDeviceCapabilities; visionOS is arm64-only and requiring armv7 can block device install or App Store distribution.

Evidence
  • The plist sets UIRequiredDeviceCapabilities to armv7 (lines 37-40).
  • The Xcode project targets visionOS only (SDKROOT = xros, SUPPORTED_PLATFORMS = "xros xrsimulator", TARGETED_DEVICE_FAMILY = 7).
  • The iOS sample already uses arm64 for the same key, while this visionOS template still carries the old armv7 value.

Identified by Warden · find-bugs · FT3-HBE

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

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add visionOS sample to the project

1 participant