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
potatotips#8 Swiftのライブラリを作成/利用しよう
Search
tokorom
August 20, 2014
Programming
7
3.7k
potatotips#8 Swiftのライブラリを作成/利用しよう
Objective-CじゃなくてSwiftのライブラリを利用する方法、また、自分で作る方法
tokorom
August 20, 2014
Tweet
Share
More Decks by tokorom
See All by tokorom
続・SharePlayの歴史と進化 iOS18とApple Vision Proにおける新展開
tokorom
3
610
SharePlayの歴史と進化 そしてvisionOSへ (iOSDC 2023)
tokorom
3
900
5分でSharePlay入門
tokorom
3
1.4k
HomeKit 2020
tokorom
7
2.5k
Advanced Segue 2019年のSegue事情
tokorom
9
5.8k
tvOSアプリUIの勘所
tokorom
1
2k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
12k
古き良きsendAction (in potatotips #26)
tokorom
1
3.6k
画面遷移と私(iOS)
tokorom
4
3.7k
Other Decks in Programming
See All in Programming
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Haze - Real time background blurring
chrisbanes
1
500
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
630
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
Discord Bot with AI -for English learners-
xin9le
1
120
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
160
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
Jakarta EE meets AI
ivargrimstad
0
230
Criando Commits Incríveis no Git
marcelgsantos
2
170
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
620
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Six Lessons from altMBA
skipperchong
27
3.5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Scaling GitHub
holman
458
140k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Transcript
SwiftͰΞϓϦ։ൃ #1 SwiftͷϥΠϒϥϦΛ࡞/ར༻͠Α͏ Yuta ToKoRo iOS App Programer potatotips #8
ॴ༑ଠ @tokorom
ࠓ͜ͷ͋ͨΓʹ͍ͭͯ •SwiftͰطଘͷObjective-CͷϥΠϒϥϦΛ͏ ใͨ͘͞Μ͋Δ͕ɺSwiftͷϥΠϒϥϦʹͭ ͍ͯ͋·Γใ͕ͳ͍͚ͲͲ͏Δͷʁ •CocoaPodsݱঢ়͑ͳ͍ͷͰͲ͏͠Α͏ʁ •ࣗͰϥΠϒϥϦ࡞Δͱ͖Ͳ͏͠Α͏ʁ
SwiftͷϥΠϒϥϦΛͬͯΈΔ •Quick͕Φεεϝ •https://github.com/Quick/Quick •ςετίʔυ༻ϥΠϒϥϦʢKiwiͷSwift൛ʣ •Objective-CͷϓϩδΣΫτͰςετ͚ͩQuickͱ͍͏ ͷΞϦ͔͠Εͳ͍ •READMEʹΠϯετʔϧͷ͔͕ͨ͠ॻ͍ͯ͋Δ •Nimbleͱ͍͏ผͷϥΠϒϥϦ͍ͬͯΔͨΊͦ͏͍͏ ߏͷϥΠϒϥϦΛ͏ʢ࡞Δʣ࿅शʹͳΔ
QuickͷΠϯετʔϧํ๏ •QuickͱNimbleΛclone͢Δ •ࣗͷϓϩδΣΫτʹ Quick.xcodeproj ͱ Nimble.xcodeproj ΛAdd͢Δ •ςετ༻ͷTargetʹ͚ͩνΣοΫ͢Δ
QuickͷΠϯετʔϧํ๏ •ςετ༻Targetͷ Link Binary With Libraries ʹ Quick.framework ͱ Nimble.framework
Λ Ճ͑Δ
QuickͷΠϯετʔϧํ๏ •͋ͱSpecΛॻ͍ͯ͏͚ͩʂ
ϥΠϒϥϦΛ͏ͱ͖ͷ·ͱΊ •ϥΠϒϥϦͷxcodeprojΛϓϩδΣΫτʹՃ •ϥΠϒϥϦͷframeworkΛ Link Binary With Libraries ʹՃ •͜ͷͱ͖ϥΠϒϥϦ͕͍ͬͯΔϥΠϒϥϦ ҰॹʹՃ͢Δඞཁ͕͋Δ
CocoaPods͕͑ͳ͍ʁ •ࠓͷͱ͜ΖSwiftͷϥΠϒϥϦʹ͑ͳ͍ •git submoduleΛ͍·͠ΐ͏ •git submoduleͰऔಘͨ͠ϑΝΠϧͷதͰ QuickͱNimbleͷxcodeprojΛϓϩδΣΫτʹ Add͢ΕOK
git submoduleʹ͓ͯ͘͠ϝϦοτ •ຊՈ͕ߋ৽͞ΕͨΒ͙͢ʹupdateͰ͖Δ •Xcodeͷbeta൛UpdateʹΑΓຊ͕݅ར༻Ͱ͖ ͳ͍ͱ͖ʹࣗͷforkઌʹܨ͗ม͑ΔɺͩΕ͔ ͕forkઌͰमਖ਼ࡁΈͳΒͦ͜ʹΓସ͑Δɺͱ ͍ͬͨ͜ͱ͕༰қ •طଘͷObjective-CͷϥΠϒϥϦͷΑ͏ʹෳࡶ ͳઃఆ͕ඞཁͳ͍ͷͰࠓͷͱ͜ΖsubmoduleͰ ಛʹࠔ͍ͬͯͳ͍
SwiftͷϥΠϒϥϦΛ࡞ͬͯΈΑ͏ •ϓϩδΣΫτΛ࡞Δͱ͖ Cocoa Touch Framework Λબ͢Δ
SwiftͷϥΠϒϥϦΛ࡞ͬͯΈΑ͏ •ϥΠϒϥϦ໊.h ͕Ͱ͖ΔͷͰɺObjective-C ίʔυ͏߹ʹͦ͜Ͱ import
SwiftͷϥΠϒϥϦΛ࡞ͬͯΈΑ͏ •importͨ͠ϔομʔ Public ଐੑʹ͢Δ
SwiftͷϥΠϒϥϦΛ࡞ͬͯΈΑ͏ •Build Phasesͷઃఆ ͍ͬͯΔϥΠϒϥϦΛ ͜͜ʹՃ Ϗϧυ࣌ʹґଘϥΠϒϥ ϦϏϧυ͍ͨ͠߹ ͜͜ʹՃ
SwiftͷϥΠϒϥϦΛ࡞ͬͯΈΑ͏ •ςετ༻TargetͷBuild Phasesͷઃఆ ϥΠϒϥϦ͕͍ͬͯΔ ϥΠϒϥϦ ςετ͢ΔϥΠϒϥϦࣗମ ςετ༻ϥΠϒϥϦ
Enjoy Swift :)
More Information Yuta ToKoRo! iOS App Programer! ! @tokorom! http://www.tokoro.me/