Skip to content

iOS screen-capture blocking#4491

Merged
shai-almog merged 1 commit intomasterfrom
codex/add-ios-disable-screenshots-feature
Feb 4, 2026
Merged

iOS screen-capture blocking#4491
shai-almog merged 1 commit intomasterfrom
codex/add-ios-disable-screenshots-feature

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Clarify the native iOS implementation for the screen-capture blocking feature so readers understand why an overlay is used and why SDK/version guards are necessary.

Description

  • Add concise comments to Ports/iOSPort/nativeSources/IOSNative.m describing the black-overlay approach (used because static screenshots cannot be prevented), the choice of container view (prefer GL view controller then key window), the compile-time guard #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 (to avoid building against older SDKs), the runtime guard using respondsToSelector:@selector(isCaptured) and @available(iOS 11.0, *), and the notification observer on UIScreenCapturedDidChangeNotification that updates the overlay when capture starts/stops.

Testing

  • No automated tests were run for this documentation-only change.

Codex Task

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: 18765 alert(s) (2766 errors, 6366 warnings, 9633 suggestions) (exit code 1) (report)
  • Image references: No unused images detected (report)

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

@shai-almog
Copy link
Collaborator Author

shai-almog commented Feb 4, 2026

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 7.15% (3629/50728 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 5.58% (17811/319458), branch 2.71% (843/31079), complexity 3.31% (984/29700), method 5.84% (807/13829), class 9.52% (174/1827)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/712 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 7.15% (3629/50728 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 5.58% (17811/319458), branch 2.71% (843/31079), complexity 3.31% (984/29700), method 5.84% (807/13829), class 9.52% (174/1827)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/712 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

@shai-almog shai-almog changed the title Explain iOS screen-capture blocking in native code iOS screen-capture blocking Feb 4, 2026
@shai-almog
Copy link
Collaborator Author

shai-almog commented Feb 4, 2026

Compared 30 screenshots: 30 matched.
✅ Native Android screenshot tests passed.

Benchmark Results

  • VM Translation Time: 392 seconds
  • Compilation Time: 378 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 34579 ms
Extract Extensions 37 ms
Google Services Setup 5 ms
Scan Classes 839 ms
Extract Libs 1530 ms
Inject Build Hints 41 ms
Generate Unit Tests 7 ms
Generate Stubs 1174 ms
Compile Stubs 2322 ms
Generate Icons 977 ms
Prepare ParparVM 214 ms
ParparVM Execution 210235 ms
Post-VM Setup 177 ms
CocoaPods 6754 ms
Finalize 24 ms
Total Time 258916 msMaven Overhead : 134000 ms
CocoaPods Install (Script) 2000 ms
Simulator Boot 168000 ms
Simulator Boot (Run) 8000 ms
App Install 24000 ms
App Launch 11000 ms
Test Execution 195000 ms

@shai-almog shai-almog merged commit 40570ac into master Feb 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant