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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
野瀬田 裕樹
May 12, 2025
Programming
98
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOSDC2024ポスター:Swift 6に備えよう!Upcoming Feature Flagsを全て解説します!
iOSDC2024で掲示したポスター資料です
野瀬田 裕樹
May 12, 2025
More Decks by 野瀬田 裕樹
See All by 野瀬田 裕樹
iOS26時代の新規アプリ開発
yuukiw00w
0
250
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
330
Human Interface Guidelines 2
yuukiw00w
0
64
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
270
HIG学習用スライド
yuukiw00w
0
190
FlutterKaigi 2025: What is iOS Assistive Access? UI considerations for Flutter
yuukiw00w
0
63
Swift6.2時代のconcurrencyを考える会
yuukiw00w
2
1.7k
実践!App Intents対応
yuukiw00w
1
500
App Intents再入門
yuukiw00w
0
87
Other Decks in Programming
See All in Programming
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
Performance Engineering for Everyone
elenatanasoiu
0
200
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
170
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
400
Lessons from Spec-Driven Development
simas
PRO
0
220
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
11
6.1k
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
220
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
Agentic UI
manfredsteyer
PRO
0
190
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
240
Into the Great Unknown - MozCon
thekraken
41
2.6k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
210
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Google's AI Overviews - The New Search
badams
0
1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
260
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
A designer walks into a library…
pauljervisheath
211
24k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
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