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
WWDC16のLabで既存プロジェクトをXcode 8対応する方法を聞いてきました
Search
fromkk
June 24, 2016
Technology
2
4.4k
WWDC16のLabで既存プロジェクトをXcode 8対応する方法を聞いてきました
AKIBA.swift 第3回で発表した内容です
fromkk
June 24, 2016
Tweet
Share
More Decks by fromkk
See All by fromkk
note社の全員野球で品質向上活動について / note_qa_challenge #iOS_test_teatime
fromkk
3
1.9k
1年分のデータが見たいと言われてやったこと/yearly_data_with_note
fromkk
0
970
note iOSチームの自動化 ver.2021/automation_with_iOS_team_on_note_ver2021
fromkk
0
2k
Bitrise体験会説明資料/bitrise_explore
fromkk
1
1.1k
noteのiOSアプリで実装したアクセシビリティの全て #iosdc #a /a11y_with_iOS_App_on_note
fromkk
2
3.9k
dSYMのアップロードで SPMを活用する/use_spm_with_upload_dsyms
fromkk
1
2.9k
Bitriseのリモートアクセス機能 #bitrise_meetup/remote_access_of_bitrise
fromkk
1
590
note社でのMagic Pod活用事例 #af_iosdc/magicpod_with_note
fromkk
2
11k
iOSには無いmacOS独自機能をCatalystで実装する #iosdc #d/make_macos_apps_with_catalyst
fromkk
9
2.1k
Other Decks in Technology
See All in Technology
どこで動かすか、誰が動かすか 〜 kintoneのインフラ基盤刷新と運用体制のシフト 〜
ueokande
0
180
Go で言うところのアレは TypeScript で言うとコレ / Kyoto.なんか #7
susisu
1
140
Evolution on AI Agent and Beyond - AGI への道のりと、シンギュラリティの3つのシナリオ
masayamoriofficial
0
140
夢の印税生活 / Life on Royalties
tmtms
0
280
R-SCoRe: Revisiting Scene Coordinate Regression for Robust Large-Scale Visual Localization
takmin
0
400
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
1
1.9k
Preferred Networks (PFN) とLLM Post-Training チームの紹介 / 第4回 関東Kaggler会 スポンサーセッション
pfn
PRO
1
140
AIエージェント就活入門 - MCPが履歴書になる未来
eltociear
0
270
モノレポにおけるエラー管理 ~Runbook自動生成とチームメンションの最適化
biwashi
0
540
GitHub Copilot coding agent を推したい / AIDD Nagoya #1
tnir
2
4.4k
.NET開発者のためのAzureの概要
tomokusaba
0
230
2025新卒研修・Webアプリケーションセキュリティ #弁護士ドットコム
bengo4com
3
10k
Featured
See All Featured
Embracing the Ebb and Flow
colly
87
4.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
A designer walks into a library…
pauljervisheath
207
24k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Scaling GitHub
holman
462
140k
Transcript
WWDC16ͷLabͰطଘϓ ϩδΣΫτΛXcode 8ର Ԡ͢Δํ๏Λฉ͍͖ͯ· ͨ͠ (C) fromkk. 2016 1
ࣗݾհ ২Ԭɹ࠸ Timers inc.ͷiOSΤϯδχΞ Twitter: @fromkk Github: fromkk (C) fromkk.
2016 2
એ Χοϓϧ͚ΞϓϦͷPairy ͱ Ո͚ࣸਅڞ༗ΞϓϦͷ Famm ΛӡӦ͍ͯ͠Δ Ͱ ΤϯδχΞΛืू ͍ͯ͠·͢ʂ ڵຯͷ͋Δํֻ͓͚ɺ͘͠
http://timers-inc.com/ ΑΓ͓͍߹ΘͤԼ͍͞ʂ (C) fromkk. 2016 3
એ2 ӳޠ͔Βͳ͍ύεϙʔτ࣋ͬͯͳ͔͕ͬͨ1ਓͰWWDC16 ʹߦͬͨϒϩάΛॻ͖·ͨ͠ɻ http://timers-tech.hatenablog.com/ • WWDC 2016ʹࢀՃ͖ͯ͠·ͨ͠ʢ४උฤʣ • WWDC 2016ʹࢀՃ͖ͯ͠·ͨ͠ʢग़ൃʙલ·Ͱฤʣ
• WWDC 2016ʹࢀՃ͖ͯ͠·ͨ͠ʢWWDCฤʣ (C) fromkk. 2016 4
WWDC16ͷҝʹαϯϑϥϯγείߦͬͯ ͖·ͨ͠ͷͰ؆୯ʹৼΓฦΓ·͢ (C) fromkk. 2016 5
(C) fromkk. 2016 6
(C) fromkk. 2016 7
(C) fromkk. 2016 8
(C) fromkk. 2016 9
(C) fromkk. 2016 10
(C) fromkk. 2016 11
ຊ (C) fromkk. 2016 12
Swift 3ରԠɾiOS 10 ରԠਐΊͯ·͔͢ʁ (C) fromkk. 2016 13
·ͣԿ͔ΒखΛ͚͍ͭͯ ͍ͷ͔͔Βͳ͍ਓʁ (C) fromkk. 2016 14
Ͱ͢ (C) fromkk. 2016 15
ࠓճWWDC16ʹࢀՃͨ͠ͷͰXcode 8 ͷରԠํ๏ΛLabͰฉ͍͖ͯ·ͨ͠ (C) fromkk. 2016 16
લఏ • Swift 2.2Ͱ࡞͞Ε͍ͯΔϓϩδΣΫτΛఆ͍ͯ͠·͢ • CocoaPodsCarthageΛಋೖ͍ͯ͠ΔϓϩδΣΫτΛఆ͠ ͍ͯ·͢ • ϥΠϒϥϦʹΑͬͯϚΠάϨʔγϣϯ͕͏·͘ಈ࡞͠ͳ͍ࣄ ͕͋Γ·͢
(C) fromkk. 2016 17
αϯϓϧϓϩδΣΫτ https://github.com/fromkk/FKCalendarSample ͪ͜ΒͷίʔυΛXcode 8Ͱಈ࡞͢Δ༷ʹͯ͠Έ·͢ ʢରԠࡁΈͷͷΛ swift3 ϒϥϯνͰΞοϓ͍ͯ͠·͢ͷͰݟ ͍ͨํͦͪΒΛݟͯԼ͍͞ʣ (C) fromkk.
2016 18
Agenda • Xcode 8 betaͷμϯϩʔυ • طଘϓϩδΣΫτΛ։͍ͯΈΔ • Swift 2.3ͱʁ
• Swift 3ͷϚΠάϨʔγϣϯ • Ϗϧυ͕ίέΔͷରԠ (C) fromkk. 2016 19
Xcode 8 betaͷμϯϩʔυ https://developer.apple.com/download/ ʹΞΫηεͯ͠ Xcode 8 betaΛμϯϩʔυ μϯϩʔυ͕ྃͨ͠Βల։ͯ͠ Applications
ϑΥϧμʹ Ҡಈ (C) fromkk. 2016 20
طଘϓϩδΣΫτΛ։͍ͯΈΔ ͍͖ͳΓϚΠάϨʔγϣϯ͕ٻΊΒΕΔ͕Ұ୴ Later ΛΫϦοΫ (C) fromkk. 2016 21
Swift 2.3ͱ ࢀߟɿhttps://developer.apple.com/videos/play/wwdc2016/402/ (C) fromkk. 2016 22
Swift 2.3ͷར༻ํ๏ Project -> Build Setting -> Swift Compiler ->
Use Legacy Swift Language Version ͷϑϥάΛ Yes ʹ͢Δ (C) fromkk. 2016 23
͔͠͠ʂʂ (C) fromkk. 2016 24
Ͳ͏ͤͳΒSwift 3ʹό ʔδϣϯΞοϓͨ͠ ͍ʂʂ (C) fromkk. 2016 25
Swift 3ͷϚΠάϨʔγϣϯͷલʹ *.xcworkspace ϑΝΠϧΛ։͍͍ͯΔͱCocoaPodsͷத·ͰϚΠάϨʔγϣϯ͠ ͯ͠·͏ CocoaPodsͷϓϩδΣΫτͰSwift 3ʹରԠ͍ͯ͠Δͷ͕͋ΔͳΒઌʹΞοϓσʔ τ͓͖ͯ͠·͠ΐ͏ platform :ios,
'8.0' use_frameworks! target 'CalendarSample' do pod 'FKValidator', :git => 'https://github.com/fromkk/FKValidator.git', :branch => 'swift3' end pod install (C) fromkk. 2016 26
Swift 3ͷϚΠάϨʔγϣϯํ๏ • Edit -> Convert -> To Current Swift
Syntax... • SwiftͷόʔδϣϯΛબ • λʔήοτΛબ • ϓϨϏϡʔΛ֬ೝ • SaveΛΫϦοΫ • ֬ೝΞϥʔτ͕දࣔ͞Εɺͦͷ··ਐΉͱอଘ͞Ε·͢ɻ (C) fromkk. 2016 27
Ϗϧυͯ͠ΈΔ (C) fromkk. 2016 28
! CarthageͷϓϩδΣΫτϏϧυࡁΈͷͷΛΠϯϙʔτ͢ΔͷͰόʔδϣϯ͕ҧ͏ͱౖΒΕ·͢ (C) fromkk. 2016 29
Ϗϧυ͕ίέΔͷ ରԠํ๏ (C) fromkk. 2016 30
CarthageͷϓϩδΣΫτ͕Swift 3 ʹରԠ͍ͯ͠Δ߹ (C) fromkk. 2016 31
CarthageͷϓϩδΣΫτ͕Swift 3ʹରԠͯ͠ ͍Δ߹ xcode-select ͰTerminalͰར༻͢ΔXcodeͷόʔδϣϯΛ Γସ͑·͢ sudo xcode-select -s /Applications/Xcode-beta.app/
(C) fromkk. 2016 32
Cartfile ʹSwift 3ʹରԠͨ͠ϒϥϯνΛࢦఆ # Cartfile github "fromkk/FKCalendarView" "swift3" CarthageͷΞοϓσʔτ carthage
update --platform iOS (C) fromkk. 2016 33
CarthageͷϓϩδΣΫτ͕Swift 3 ʹରԠ͍ͯ͠ͳ͍߹ (C) fromkk. 2016 34
CarthageͷϓϩδΣΫτ͕Swift 3ʹରԠͯ͠ ͍ͳ͍߹ • $(PROJECT_DIR)/Carthage/Checkouts ԼʹCarthage ͷϓϩδΣΫτ͕͍ΔͷͰXcode 8 betaͰ։͘ •
ઌड़ͨ͠ํ๏ͰϚΠάϨʔγϣϯΛ࣮ߦˍΤϥʔमਖ਼ • Ϗϧυ͢Δ (C) fromkk. 2016 35
Products άϧʔϓͷԼʹ *.framework ͕͍ΔͷͰ Finder Ͱදࣔ (C) fromkk. 2016 36
• *.framework ϑΝΠϧΛίϐʔ • $(PROJECT_DIR)/Carthage/Build/$(PLATFORM)/ *.framework ʹ্ॻ͖ (C) fromkk. 2016
37
࠶Ϗϧυ (C) fromkk. 2016 38
! (C) fromkk. 2016 39
! (C) fromkk. 2016 40
ϋϚΓͲ͜Ζ • CoreDataΛར༻͍ͯ͠Δ߹ɺGenericsΛࢦఆ͢Δඞཁ͕͋ Γ·͢ • GCDͷ༷͕େ෯ʹมΘΓ·ͨ͠ • NS ϓϨϑΟοΫε͕֎ΕͨΓ༷API໊͕มߋʹͳ͍ͬͯΔ ͷͰށ͏ࣄ͕͋Γ·͢
(C) fromkk. 2016 41
·ͱΊ ͦͷ1 • CocoaPodsιʔε͕ϫʔΫεϖʔεʹ͍ΔͷͰϓϩδΣΫτଆ ͕ରԠ͍ͯ͠ͳͯ͘ϚΠάϨʔγϣϯ͕ར༻ग़དྷΔ • CarthageϓϩδΣΫτଆ͕Swift 3ʹରԠ͍ͯ͠ͳ͍߹ผ్ ϏϧυΛͯ͠ *.framework
ϑΝΠϧΛ্ॻ͖͢Δඞཁ͕͋Δ • Swift 3Ͱେ෯ʹߏจ͕มߋʹͳ͍ͬͯΔ߹ϋϚΔՄೳੑ͕͋ ΔͷͰ࠷ѱϥΠϒϥϦଆͷΞοϓσʔτΛͭඞཁ͕͋Δʢ͔ ʁʣ (C) fromkk. 2016 42
·ͱΊ ͦͷ2 • iOS 10ͷ৽ػೳΛࢼ͢ʹ·ͣSwift 3Ͱಈ࡞͔ͤͯ͞Β ͔ͱࢥ͍·͢ • ԾʹͰϏϧυ͕௨ͤ͑͢͞Ε৽͍͠ػೳͷಋೖোนԼ͕ ΔͷͰʁ
(C) fromkk. 2016 43
·ͣϏϧυΛ௨ͯ͠৽ ͍͠ػೳΛͲΜͲΜࢼ͠ ͍͖ͯ·͠ΐ͏ʂ (C) fromkk. 2016 44
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝ ·ͨ͠! (C) fromkk. 2016 45