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
670
iOSDC.pdf
ビスター
September 20, 2025
Tweet
Share
Other Decks in Programming
See All in Programming
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
350
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
950
育てるアーキテクチャ:戦い抜くPythonマイクロサービスの設計と進化戦略
fujidomoe
1
160
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
CSC305 Lecture 02
javiergs
PRO
1
260
明日から始めるリファクタリング
ryounasso
0
120
CSC305 Lecture 01
javiergs
PRO
1
400
CSC509 Lecture 06
javiergs
PRO
0
250
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
210
XP, Testing and ninja testing ZOZ5
m_seki
3
360
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.4k
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Designing for humans not robots
tammielis
254
26k
A Tale of Four Properties
chriscoyier
160
23k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing for Performance
lara
610
69k
Making Projects Easy
brettharned
119
6.4k
How to Think Like a Performance Engineer
csswizardry
27
2k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
For a Future-Friendly Web
brad_frost
180
9.9k
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
࠷ޙʹ ίʔυྫ αϯϓϧύοέʔδ