Skip to content

feat: add screenshot as internal sub-API#8084

Open
philprime wants to merge 7 commits into
philprime/internal-api/performancefrom
philprime/internal-api/screenshot
Open

feat: add screenshot as internal sub-API#8084
philprime wants to merge 7 commits into
philprime/internal-api/performancefrom
philprime/internal-api/screenshot

Conversation

@philprime

@philprime philprime commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds SentryInternalScreenshotApi sub-API with capture() -> [Data]? for hybrid SDKs
  • Platform-guarded: iOS, tvOS only (not visionOS)
  • Includes ObjC wrapper (SentryObjCInternalScreenshotApi)
  • Fixes visionOS guard mismatch in ObjC headers: uses !TARGET_OS_VISION to match Swift implementation

Test plan

  • make build-ios passes
  • Unit tests: SentryInternalScreenshotApiTests
  • Swift integration tests: SentryInternalScreenshotApiIntegrationTests
  • ObjC integration tests: SentryObjCInternalScreenshotApiIntegrationTests

Stacked PR 3/5 for internal API phase 2.

#skip-changelog

Closes #8089

@github-actions

github-actions Bot commented Jun 16, 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 36419e5

@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Jun 16, 2026
@philprime philprime self-assigned this Jun 16, 2026
Comment thread Sources/SentryObjC/Public/SentryObjCInternalScreenshotApi.h Outdated
@philprime philprime marked this pull request as draft June 16, 2026 13:22
@sentry

sentry Bot commented Jun 16, 2026

Copy link
Copy Markdown

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
SDK-Size io.sentry.sample.SDK-Size 9.17.1 (1) Release

⚙️ sentry-cocoa Build Distribution Settings

@philprime philprime removed the ready-to-merge Use this label to trigger all PR workflows label Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1235.16 ms 1265.07 ms 29.91 ms
Size 24.14 KiB 1.18 MiB 1.16 MiB

Baseline results on branch: philprime/internal-api/performance

Startup times

Revision Plain With Sentry Diff
6bb1441 1235.07 ms 1263.05 ms 27.98 ms
98d3984 1213.35 ms 1255.76 ms 42.41 ms
05667c9 1209.21 ms 1245.29 ms 36.08 ms

App size

Revision Plain With Sentry Diff
6bb1441 24.14 KiB 1.18 MiB 1.16 MiB
98d3984 24.14 KiB 1.18 MiB 1.16 MiB
05667c9 24.14 KiB 1.18 MiB 1.16 MiB

Previous results on branch: philprime/internal-api/screenshot

Startup times

Revision Plain With Sentry Diff
b6b668a 1221.38 ms 1257.36 ms 35.97 ms

App size

Revision Plain With Sentry Diff
b6b668a 24.14 KiB 1.19 MiB 1.16 MiB

…rnal-api/screenshot

# Conflicts:
#	Sources/Swift/HybridSDK/SentryInternalApi.swift
Add Swift and ObjC integration tests for screenshot sub-API.
Fix visionOS guard mismatch in ObjC headers: screenshot is only
available on iOS/tvOS, so use !TARGET_OS_VISION guard to match
the Swift implementation. Regenerate public API manifests.
@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Jun 17, 2026
@philprime philprime marked this pull request as ready for review June 17, 2026 08:22
Comment thread Sources/SentryObjCCompat/SentryObjCInternalApi.swift
The screenshot property on SentryInternalApi is only available for
iOS and tvOS, but the ObjC compatibility wrapper included visionOS
in its conditional compilation guard. This caused a build failure
on visionOS due to accessing a non-existent property.
Comment thread Sources/Swift/HybridSDK/SentryInternalScreenshotApi.swift
philprime added a commit that referenced this pull request Jun 17, 2026
Add Swift and ObjC integration tests for SentryInternalViewHierarchyApi
matching the pattern from the screenshot API tests in PR #8084.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant