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
iOSDC2024ポスター:Swift 6に備えよう!Upcoming Feature Fla...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
野瀬田 裕樹
May 12, 2025
Programming
0
72
iOSDC2024ポスター:Swift 6に備えよう!Upcoming Feature Flagsを全て解説します!
iOSDC2024で掲示したポスター資料です
野瀬田 裕樹
May 12, 2025
Tweet
Share
More Decks by 野瀬田 裕樹
See All by 野瀬田 裕樹
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
250
Human Interface Guidelines 2
yuukiw00w
0
39
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
240
HIG学習用スライド
yuukiw00w
0
160
FlutterKaigi 2025: What is iOS Assistive Access? UI considerations for Flutter
yuukiw00w
0
51
Swift6.2時代のconcurrencyを考える会
yuukiw00w
1
1.4k
実践!App Intents対応
yuukiw00w
1
470
App Intents再入門
yuukiw00w
0
78
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
250
Other Decks in Programming
See All in Programming
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
170
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
210
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
390
CSC307 Lecture 14
javiergs
PRO
0
460
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
470
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
340
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
380
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
3
1.2k
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
730
Ruby x Terminal
a_matsuda
7
590
SourceGeneratorのマーカー属性問題について
htkym
0
180
Featured
See All Featured
The Curse of the Amulet
leimatthew05
1
9.7k
Mind Mapping
helmedeiros
PRO
1
110
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Language of Interfaces
destraynor
162
26k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
130
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Side Projects
sachag
455
43k
A Soul's Torment
seathinner
5
2.4k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
760
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
640
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
Raft: Consensus for Rubyists
vanstee
141
7.3k
Transcript
GlobalConcurrency 概要:グローバル変数にデータ競合の可能性があると警告を表示してくれる 対処法:globalアクターに隔離する or immutableかつSendableにする 対処法1:globalアクターに隔離 対処法2:immutableかつSendable 1/10
IsolatedDefaultValues 概要:stored property/関数の引数のデフォルト値の式が、stored property/関数 に指定されているActorと同じActorで隔離されるようになる 対処法:該当の関数/stored propertyが適切なActor隔離になるように修正を行う 例えばこのようなactor隔離されてないinitで は明示的にstored propertyに初期値を設定
する必要がある (IsolatedDefaultValuesが無効だとビルドが 通るが、このinitはデータ競合の可能性があ る) 2/10
DisableOutwardActorInference 概要:property wrapperを使ったときに、型のアクター隔離が推測されなくなる 対処法:property wrapperで暗黙的にアクター隔離されていた箇所を 明示的に隔離する 元々暗黙的にMainActorWrapperの MainActorを引き継いでしまう仕様 DisableOutwardActorInferenceを有効にして 同じ挙動にしたい場合、@MainActorを付与する
3/10
ImportObjcForwardDeclarations 概要:objcで前方宣言されたinterface/protocolがSwiftでimportできるようになる ImportObjcForwardDeclarationsを有効にする と色々importしなくても使えるようになる 4/10
BareSlashRegexLiterals 概要:Regex Literalsが使える(compileチェックとtyped-capture推論もされる) /…/の形式で正規表現リテラルが書け る Enable Bare Slash Regex LiteralsをYESに
設定することでも有効化できる 5/10
ImplicitOpenExistentials 概要:存在型の値をgeneric関数に渡せる(基底型が暗黙的に開かれる) 実はImplicitOpenExistentialsを 有効にしなくてもSwift 5.10でビルドが通る (Any.Typeの存在メタタイプを開く機能については Swift 6環境のSwift 5互換モードでフラグを有効にす ると使える)
anyP(存在型)の中身を渡す(開く)形になるので、 (generic関数に)Pに適合した型として渡せる 6/10
ExistentialAny 概要:存在型には全てanyを付けなければならなくなる 対処法:存在型にanyを付ける protocolの前にanyを入れると警告が消える (Fixしても同じ) 7/10
ForwardTrailingClosures 概要:trailing closuresのスキャンが前方からになる ForwardTrailingClosuresが 有効だとこれはfirstのクロージャとして認識される (無効だとsecondとして認識される) 8/10
ConciseMagicFile 概要:#fileの評価がFullPathから<ModuleName>/<fileName>に変更される 対処法:もし従来挙動のものが欲しい場合は#filePathを使用する ConciseMagicFileを有効にすると#fileが 元々の値(#filePathの値)と違う値になる 9/10
概要:@UIApplicationMainと@NSApplicationMainが非推奨になる 対処法:@mainを使用する ※ 本ポスターではSwift 6より前に使える Upcoming Feature Flagsを解説しています。 Other Swift
Flagsに -enable-upcoming-feature DeprecateApplicationMain のように追加する と有効化できます。 DeprecateApplicationMain @mainに置き換えると警告が消える 全てのサンプルコードを見たい方はこちら → https://github.com/yuukiw00w/iosdc-2024-poster 10/10