Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
iOSDC.pdf
Search
ビスター
September 20, 2025
Programming
2
770
iOSDC.pdf
ビスター
September 20, 2025
Tweet
Share
Other Decks in Programming
See All in Programming
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
Introduce Hono CLI
yusukebe
6
3.3k
CSC305 Lecture 12
javiergs
PRO
0
250
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
470
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
業務でAIを使いたい話
hnw
0
220
オープンソースソフトウェアへの解像度🔬
utam0k
18
3.2k
三者三様 宣言的UI
kkagurazaka
0
320
外接に惑わされない自システムの処理時間SLIをOpenTelemetryで実現した話
kotaro7750
0
140
data-viz-talk-cz-2025
lcolladotor
0
110
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
120
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
500
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
Embracing the Ebb and Flow
colly
88
4.9k
The Invisible Side of Design
smashingmag
302
51k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Navigating Team Friction
lara
190
15k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Cult of Friendly URLs
andyhume
79
6.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
680
YesSQL, Process and Tooling at Scale
rocio
174
15k
Code Review Best Practice
trishagee
72
19k
What's in a price? How to price your products and services
michaelherold
246
12k
Transcript
4XJGU6*࣌ͷεΫγϣอޢ ʙηΩϡΞͳ7JFXͷ࡞Γํʙ #ZϏελʔ!-NTTZOD J04%$+BQBO݄ʢʣʙ 5SBDL %
"CPVU.F Ϗελʔ 7JTUBS • ݸਓ։ൃ • 41.ύοέʔδ։ൃ • 1SJWBUF"1*ݚڀ
ࠓεΫγϣอޢ͕͔ͬͨ • .JDSPTPGU 5FBNT ʮ1SFWFOU4DSFFO$BQUVSFʯػೳൃද • 9$IBU ʮ#MPDL TDSFFOTIPUTʯػೳެ։ •
J1IPOFͷϚΠφϯόʔΧʔυʢຊʣ ΥϨοτΞϓϦͰඪ४࣮ࡁΈ
͑Δ"1*ʁ
ը໘ऩؔ࿈ͷ"1* • @Environment(¥.isSceneCaptured) • UITraitCollection.sceneCaptureState • UIScreen.isCaptured Deprecated
εΫϦʔϯγϣοτؔ࿈ͷ"1* •UIApplication.userDidTakeScreenshotNot ification •UIApplication.UserDidTakeScreenshotMes sage ֤OS 26+ ͍ͣΕDidͳͷͰࣄલݕ͕ग़དྷͳ͍
εΫϦʔϯγϣοτؔ࿈ͷ"1* •func privacySensitive() -> some View •func contentCaptureProtected() -> some
CompositorContent macOS 26 & visionOS 26 Only
εΫϦʔϯγϣοτؔ࿈ͷ"1* •func contentCaptureProtected( _ isActive: Bool = true ) ->
some View visionOS 26.0+ only iOSʹల։͞Ε͍ͯͳ͍...
J04ͷతͳ"1*ͰεΫγϣ͔Β ҙͷ7JFXΛอޢ͢Δ͜ͱͰ͖ͳ͍
6*,JUͰͲ͏͢Δʁ
6*,JUͰͲ͏͢Δʁ •UITextFieldͷisSecureTextEntryΛར༻͢Δ •UITextFieldͷSubview • _UITouchPassthroughView • _UITextLayoutCanvasView อޢ͍ͨ͠7JFXΛαϒϏϡʔʹ͢Δ
4XJGU6*ͰͷϫʔΫΞϥϯυ CaptureProtectedViewController<Content: View> - containerView: UIView? _UITextLayoutCanvasViewΛऔΓग़͢ - isActive: Bool
- content: () -> Content + init(_: Bool, @ViewBuilder content: @escaping () -> Content) + viewDidLoad() UIHostingControllerΛར༻ͯ͠4XJGU6*ͷ7JFXΛ _UITextLayoutCanvasViewͷαϒϏϡʔʹ͢Δ
4XJGU6*ͰͷϫʔΫΞϥϯυ UIHostingController 4XJGU6*$POUFOU UIViewController Representable CaptureProtected ViewController 4XJGU6*ͷ7JFX
4XJGU6*ͰͷϫʔΫΞϥϯυ • .environment()ͷө ࢀߟ 88%$6*,*UτϨΠτγεςϜͷ׆༻ • ϨΠΞτͷ่Ε • *NBHF3FOEFSFS"1*ͷ੍ݶ
4XJGU6*ͰͷϫʔΫΞϥϯυ •UITextFieldͷisSecureTextEntryΛར༻͢Δ •UITextFieldͷSubview • _UITouchPassthroughView • _UITextLayoutCanvasView อޢ͍ͨ͠7JFXΛαϒϏϡʔʹ͢Δ
ͳͥ_UITextLayoutCanvasView εΫϦʔϯγϣοτʹөΒͳ͍ʁ
ΈΛௐΔ •-[UITextField setSecureTextEntry:]Λ 4ZNCPMJD#SFBLQPJOUͱͯ͠ηοτ ˠελοΫτϨʔεΛௐΔ
ΈΛௐΔ $"-BZFSΦϒδΣΫτʹରͯ͠ηϨΫλ TFU%JTBCMF6QEBUF.BTLͷϝιουΛݺͼग़͍ͯ͠Δ Y$"-BZFS YTFU%JTBCMF6QEBUF.BTL YYPSY 9DPEFͰͷελοΫτϨʔεͷදࣔ
࣮ݧ "QQ3FWJFX(VJEFMJOFT⚠ 4PGUXBSF3FRVJSFNFOUT"QQTNBZPOMZVTFQVCMJD"1*T IUUQTEFWFMPQFSBQQMFDPNBQQTUPSFSFWJFXHVJEFMJOFTTPGUXBSFSFRVJSFNFOUT
࣮ݧ 9DPEF--%#ίϚϯυʹΑΔ$"-BZFSͷશϝιουදࣔ
ΈΛௐΔ •0CKFDUJWF$༝དྷͷ,FZ7BMVF$PEJOHΛར༻ ࣮ݧ༻ͷ؆қίʔυ
࣮ݧ •EJTBCMF6QEBUF.BTL ʹΑ੍ͬͯޚ͞Ε͍ͯΔ →4QSJOH#PBSEʹΑΔࡱӨʹ ֘ϨΠϠʔؚ͕·Εͳ͍
4XJGU6*Ͱͷར༻ํ๏ͷఏҊ
4XJGU6*Ͱͷར༻ํ๏ •ϨΠϠʔͱؚͯ͠·Εແ͍͜ͱΛར༻͢Δ .mask(_:)
UIViewRepresentable _UITextLayoutCanvasView ͳͲ EJTBCMF6QEBUF.BTL͕ઃఆ͞Εͨ-BZFSΛ࣋ͭ6*7JFX backgroundColor = .black .mask { }
εΫγϣͷॠ͚ؒͩөΔ7JFXम০ࢠ
•func luminanceToAlpha() -> some View "EETBMVNJOBODFUPBMQIBF⒎FDUUPUIJTWJFX J04 J1BE04
.BD$BUBMZTU NBD04 UW04 WJTJPO04 XBUDI04 ࢀߟ EFWFMPQFSBQQMFDPN
.mask { } .background(.white) .compotisionGroup() .luminanceToAlpha()
ࢀߟ •AVSampleBufferDisplayLayer() .preventsCapture *OEJDBUFTUIBUJNBHFEBUBTIPVMECFQSPUFDUFE GSPNDBQUVSFࢀߟ EFWFMPQFSBQQMFDPN อޢର*04VSGBDFTͰͳ͍
ࢀߟ •'BJS1MBZ4USFBNJOH ಈըίϯςϯπ৴ͷ߹ʹར༻Մೳ ࢀߟ EFWFMPQFSBQQMFDPN
ҙ •ίϯςϯπͷෳࢭใ࿙Ӯࢭ •εΫγϣอޢ͞Ε͍ͯΔ͔ςετ •ར༻ऀʹεΫγϣอޢΛΒͤΔ ˠอޢΛ"MFSUͰ௨ɺεΫγϣʹอޢ͍ͯ͠ΔࢫΛهࡌ
None
࠷ޙʹ ίʔυྫ αϯϓϧύοέʔδ