Skip to content

Conversation

@from2001
Copy link
Collaborator

Implements continuous real-time composite view capture using ReplayKit, allowing capture of both physical passthrough and digital content.

Key Features

  • Toggle between physical camera and composite view capture via UseCompositeCapture flag
  • Real-time texture updates via Metal pipeline (mirrors physical camera)
  • No audio capture (microphone disabled)
  • Public API: GetCompositeTexture2D()

Implementation

  • Added com.apple.developer.screen-capture.composite-passthrough entitlement
  • Created CompositeViewCapture.swift with ReplayKit-based continuous capture
  • Extended EnterpriseCameraAccessManager.cs with composite mode support
  • Updated ConfigureXcodeSettings.cs with Info.plist permissions

Resolves #16


Generated with Claude Code

Implements continuous real-time composite view capture using ReplayKit,
allowing capture of both physical passthrough and digital content.

Key changes:
- Added com.apple.developer.screen-capture.composite-passthrough entitlement
- Created CompositeViewCapture.swift with ReplayKit-based continuous capture
- Extended EnterpriseCameraAccessManager.cs with UseCompositeCapture toggle
- Added composite texture handling with Metal pipeline (mirrors physical camera)
- Updated ConfigureXcodeSettings.cs with NSPhotoLibraryUsageDescription

Features:
- Toggle between physical camera and composite view capture
- Real-time texture updates via getCompositeTexture()
- No audio capture (microphone disabled)
- Public API: GetCompositeTexture2D()

Resolves #16

Co-authored-by: Masahiro Yamaguchi <from2001@users.noreply.github.com>
@claude
Copy link

claude bot commented Jan 30, 2026


Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds composite view capture support for Apple Vision Pro, enabling capture of both physical passthrough and digital content using ReplayKit. This addresses issue #16 which requested the ability to capture AR composite views (physical environment + digital elements) rather than just the physical camera feed.

Changes:

  • Added UseCompositeCapture toggle flag to switch between physical camera and composite view capture modes
  • Implemented ReplayKit-based continuous capture in new CompositeViewCapture.swift file with Metal pipeline
  • Extended C# manager with composite capture methods and public API
  • Added required entitlements and Info.plist permissions for screen capture

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 20 comments.

File Description
EnterpriseCameraAccessManager.cs Added composite capture support with dual-mode operation, new texture management fields, and public GetCompositeTexture2D() API
CompositeViewCapture.swift New ReplayKit-based composite capture implementation with Metal texture processing and pixel format conversion
ConfigureXcodeSettings.cs Added NSPhotoLibraryUsageDescription permission to Info.plist configuration
Entitlements.entitlements Added com.apple.developer.screen-capture.composite-passthrough entitlement for ReplayKit access

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Remove unused ARKit import
- Use explicit .shaderRead Metal texture usage instead of .unknown
- Replace force unwraps with guard statements for better error handling
- Replace fatalError() with logging for graceful error recovery
- Add memory cleanup in OnDisable for textures and render textures
- Optimize TryGetCompositeTexture to only recreate texture when pointer changes
- Add UpdateExternalTexture call in UpdateCompositeTexture for proper refresh
- Add IsCompositeCaptureAvailable() public API method
- Add XML documentation for GetCompositeTexture2D
- Expand tooltip to explain composite vs physical capture trade-offs
- Remove unnecessary NSPhotoLibraryUsageDescription plist entry
- Log unsupported pixel formats instead of silently returning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

Composite View Recording and Screenshot Capture in Apple Vision Pro

1 participant