ScreenShieldKit
A Swift framework to hide UIView/NSView/CALayer from being captured when taking screenshots.
Install / Use
/learn @Kyle-Ye/ScreenShieldKitREADME
ScreenShieldKit
A Swift framework to hide UIView/NSView/CALayer from being captured when taking screenshots.
Overview
| Workflow | Status |
|-|:-|
| iOS UI Tests | |

Getting Started
In your Package.swift file, add the following dependency to your dependencies argument:
.package(url: "https://github.com/Kyle-Ye/ScreenShieldKit.git", from: "0.1.0"),
Then add the dependency to any targets you've declared in your manifest:
.target(
name: "MyTarget",
dependencies: [
.product(name: "ScreenShieldKit", package: "ScreenShieldKit"),
]
),
Usage
Instead of wrapping your view in a secure UITextField or ScreenShieldView,
you can just directly call the hideFromCapture(hidden:) API on your view or layer.
import ScreenShieldKit
let view = UIView(frame: .zero)
view.hideFromCapture(hidden: true)
// Resture the behavior
view.hideFromCapture(hidden: false)
Detailed documentation for ScreenShieldKit can be found on the Swift Package Index.
License
See LICENSE file - MIT
Credits
https://nsantoine.dev/posts/CALayerCaptureHiding
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
