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.6k
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
380
SharePlayの歴史と進化 そしてvisionOSへ (iOSDC 2023)
tokorom
2
830
5分でSharePlay入門
tokorom
2
1.4k
HomeKit 2020
tokorom
7
2.4k
Advanced Segue 2019年のSegue事情
tokorom
9
5.7k
tvOSアプリUIの勘所
tokorom
1
1.9k
カッコ悪くリアクティブじゃダメですか?
tokorom
7
12k
古き良きsendAction (in potatotips #26)
tokorom
1
3.5k
画面遷移と私(iOS)
tokorom
4
3.7k
Other Decks in Programming
See All in Programming
GraphQL あるいは React における自律的なデータ取得について
quramy
11
2.9k
労務ドメインを快適に開発する方法 / How to Comfortably Develop in the Labor Domain
yuki21
1
250
What is Parser
yui_knk
9
4.1k
エンジニア1年目で複雑なコードの改善に取り組んだ話
mtnmr
3
2k
【TID2024】模擬講義:プログラマと一緒にゲームをデザインしてみよう!
akatsukigames_tech
0
620
Android開発以外のAndroid開発経験の活かしどころ
konifar
2
840
Why Prism?
kddnewton
4
1.7k
rbs-inlineを導入してYARDからRBSに移行する
euglena1215
1
260
LangGraphでのHuman-in-the-Loopの実装
os1ma
3
1.1k
いまから追い上げる、Jetpack Compose トレーニング
nyafunta9858
0
330
Debugging: All you need to know (for simultaneous interpreting)
jmatsu
2
700
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
263
13k
How to Ace a Technical Interview
jacobian
274
23k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
RailsConf 2023
tenderlove
28
810
Writing Fast Ruby
sferik
623
60k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Designing on Purpose - Digital PM Summit 2013
jponch
113
6.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.2k
Why You Should Never Use an ORM
jnunemaker
PRO
53
8.9k
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/