Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Swiftへの愛2018
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
hirothings
December 08, 2018
Programming
3.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swiftへの愛2018
Swiftの魅力
最近のSwift
これからのSwift
について発表した資料になります
hirothings
December 08, 2018
More Decks by hirothings
See All by hirothings
minto 10万ダウンロードまでにやったこと・やらなかったこと / minto 100k DL
hirothings
5
2k
VIPER with アーキテクチャ選定 実践入門 / VIPER Architecture
hirothings
4
1.1k
実践Dark Mode対応 / Implementing Dark Mode
hirothings
4
230
iOS標準UIワークショップ / iOS Default UI Workshop
hirothings
3
11k
Modernizing Your UI for iOS 13
hirothings
1
1.3k
WWDC2019 pre party LT
hirothings
0
2.5k
iOSなアーキテクチャVIPERのススメ
hirothings
5
3.6k
Swift2年生
hirothings
4
35k
Swiftへの愛
hirothings
0
36k
Other Decks in Programming
See All in Programming
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
120
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
490
Family mrubyの進捗
kishima
1
120
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
170
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
330
自分的「カンファレンスの楽しみ方」
syumai
0
200
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
App Intentsのビルドプロセスを支える技術
kntkymt
0
370
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
160
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.4k
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
210
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
The Cult of Friendly URLs
andyhume
79
7k
Scaling GitHub
holman
464
140k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
Un-Boring Meetings
codingconduct
0
420
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
500
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
For a Future-Friendly Web
brad_frost
183
10k
Transcript
Love Swift 2018 @hirothings
10Ͱ͢͜ͱ • Swiftͱʁ • Swiftͷັྗ • ࠷ۙͷSwift • ͜Ε͔ΒͷSwift •
Hello Swift!
ࣗݾհ • @hirothings (Objective-ͻΖC) • ݩϥʔϝϯళ • ৭ʑ͋ͬͯݱࡏiOSσϕϩούʔ
Swiftͱͷग़ձ͍ • ΤϯδχΞͱͯ͠ΩϟϦΞΛελʔτͨ͠2015 ౙ..ɻ • ͦΕ·ͰJS, PHPΛগʑ͚ͩͬͨͲઓྗʹͳΒͣɺ Ҋ݅ͷSwiftࢼͯ͠ΈΔ୲ʹͳΓSwiftͱग़ձ͏͜ ͱʹ
Swiftͱ • Apple͕2014ʹൃදͨ͠ϓϩάϥϛϯάݴޠ • ͷͪΦʔϓϯιʔεԽ https://github.com/apple/swift • ࣮ߦ͕͍, Ϟμϯ, ҆શ
• ΞΠίϯΞϚπόϝ https://www.apple.com/jp/swift/ ΑΓ
Swiftͷັྗ • ݫ֨ͳܕγεςϜ • Ϟμϯͳจ๏ • null҆શͳݴޠ • ܕத৺ͷݴޠ •
GenericsΛ༻͍ͨॊೈ͞
ݫ֨ͳܕγεςϜ • ੩తܕ͚ݴޠ • ίϯύΠϥ͕ίʔυͷ҆શੑΛ୲อͯ͘͠ΕΔ • ҉తͳίʔυ͕গͳ͘ͳΔ • ܕʹରͯ͠ݫࣗ͘͠વͱλΠϓηʔϑͳॻ͖ํ Λʹ͚ͭΒΕΔ
Ϟμϯͳจ๏ • ܕਪ • Ϋϩʔδϟ • ߴ֊ؔ (map, flatMap, filter,
reduce..) • ϓϩτίϧ / ϓϩτίϧ֦ு • δΣωϦΫε • λϓϧ / ෳͷΓ • ϝϞϦͷࣗಈཧ(ARC)
null҆શͳݴޠ null҆શͱ: null͕ݪҼͰ࣮ߦ࣌ΤϥʔʹͳΒͳ͍Έ OVMM҆શͰͳ͍ݴޠɺϨΨγʔݴޠͩIUUQTRJJUBDPNLPIFSJUFNT FCECBCΑΓ
null҆શͳݴޠ • nullνΣοΫΛίϯύΠϧ࣌ʹνΣοΫͰ͖Δ • मਖ਼͠ͳ͍ͱͦͦϏϧυ͕௨Βͳ͍
ܕத৺ͷݴޠ ࢀরܕͷ • ίʔυΛΘͳ͍ͱɺͲ͜·ͰΠϯελϯε͕ ڞ༗͞Ε͍ͯΔͷ͔ෆ໌ +BWBTDSJQUͷ"SSBZ ࢀরܕ ͷྫ
ඪ४ϥΠϒϥϦͷ΄ͱΜͲ͕ ܕ • String • Array • Dictionary • Bool
• Int • Double • Float
ίϐʔ͝ͱʹίετ͕͔͔Δ ͷͰʁ
Copy on Write • ೖ࣌Ͱίϐʔ͕ൃੜ͠ͳ͍ • Λมߋ࣌ɺॳΊͯΠϯελϯε͕࡞ΒΕΔ Έ • ͜ͷΈͷ͓͔͛ͰArrayͳͲͰܕΛ࣮ݱ
GenericsΛ༻͍ͨॊೈ͞ • 2ͭͷҾΛswap͢Δؔ • IntܕͷҾͷΈαϙʔτ • ৼΔ͍ಉ͕ͩ͡ɺ͋ΒΏΔܕΛαϙʔτͨ͠ ͍..
• GenericsͰղܾ • ܕύϥϝʔλ <T> • ؔ, δΣωϦοΫܕ(Class, Struct)ɺ͋ΒΏΔ ໘Ͱ͑Δ
IUUQTEPDTTXJGUPSHTXJGUCPPL-BOHVBHF(VJEF(FOFSJDTIUNM
࠷ۙͷSwift • όʔδϣϯΞοϓ͕ΊΜͲ͏ʁ • Φʔϓϯιʔεͱͯ͠ͷػೳڧԽ
• Swift2 to 3ͷΑ͏ͳࠈͳ͍ • Swift3ͰObj-CʹҾͬுΒΕ༷ͨΛόοαϦͬͯ҆ఆ͖ͯͨ͠ • Swift4.1 to 4.2ͷMigration࣌ؒͰऴΘͬͨɻ
• XcodeͷMigrationػೳ + ͪΐͬͱͨ͠मਖ਼ͰDone • Ξοϓσʔτͷ͍ϥΠϒϥϦSwift3ͰίϯύΠϧ όʔδϣϯΞοϓ͕ΊΜͲ͏ʁ
• จࣈྻͷڧԽ • StringͷCollection TypeԽ • ෳߦจࣈྻϦςϥϧͷαϙʔτ • Randomؔͷ࣮ •
ࠓ·ͰCͷؔarc4random_uniform Λ͍͕ͬͯͨɺLinuxڥͰ αϙʔτ͞Εͯͳ͍ͨΊ໘ͩͬͨ • Dynamic Member Lookup Φʔϓϯιʔεͱͯ͠ͷػೳڧԽ
͜Ε͔ΒͷSwift • ABI҆ఆԽ • async / await
ABI҆ఆԽ • (ͣͬͱ༏ઌ՝͚ͩͲ)Swift5ͷϦϦʔεཁ݅ • ෳͷSwiftόʔδϣϯͷڞଘ • ҠߦͷπϥϛݮΔ • ϥΠϒϥϦ੍࡞ऀخ͍͠ •
ݱࡏϞδϡʔϧ୯ҐͰSwift3 or 4Λࢦఆͯࠞ͠ࡏͤ͞ Δ͜ͱՄೳ
async / await • ඇಉظॲཧΛಉظॲཧతʹॻ͚Δ • ࠓ·ͰRxSwiftͳͲؔܕϓϩάϥϛϯάͷΞϓϩʔν ΛಋೖͤͶͳΒͣ؆୯Ͱͳ͔ͬͨ • ࣮࣌ظ·ͩະ֬ఆ
• KotlinͰ͢ͰʹίϧʔνϯಋೖࡁΈ • SwiftͷੜΈͷΫϦεϥτφʔ͕proposalग़ͨ͠
Before async / await
After (Proposalͷྫ) async / await
Hello! Swift
Swift Playgrounds • iPadͰήʔϜײ֮ͰSwiftΛ৮ΕΔެࣜΞϓϦ IUUQTXXXBQQMFDPNKQTXJGUQMBZHSPVOET
Playground • ϦΞϧλΠϜͰ࣮ߦ͞ΕΔΤσΟλ • ཁXcode
Server Side Swift • UIKitʹڵຯͳ͍ํʹΦεεϝ • Ϗϧυ͍͠ɺ؆୯ͳAPIͳΒϗεςΟϯά·Ͱ Ͱ͖ΔϑϨʔϜϫʔΫ(ݸਓΞϓϦͷAPISSSͰ࣮ͯ͠·͢)
One more things..
࠷ۙͷXcodeʹ͍ͭͯ
ෳγϛϡϨʔλΛͬͨฒྻςετ
Diffʹ৭͕ͭ͘Α͏ʹͳͬͨ!!
Xcode10Ͱ͍ͭʹϚϧνΧʔιϧରԠ!!
Fin