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
490
SharePlayの歴史と進化 そしてvisionOSへ (iOSDC 2023)
tokorom
2
850
5分でSharePlay入門
tokorom
2
1.4k
HomeKit 2020
tokorom
7
2.4k
Advanced Segue 2019年のSegue事情
tokorom
9
5.8k
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
"noncopyable types" の使いどころについて考えてみた
andpad
0
160
Програмиране с Rust, ФМИ, 2024
nikolads
0
110
DevFest Android in Korea 2024 - 안드로이드의 문단속 : 앱을 지키는 암호화 이야기
mdb1217
1
160
Compose Multiplatform과 Ktor로 플랫폼의 경계를 넘어보자
kwakeuijin
0
280
レイトレ合宿10 レンダラー紹介 / Renderer Introduction, Ray Tracing Camp 10
shocker_0x15
0
570
ACES Meet におけるリリース作業改善の取り組み
fukucheee
0
140
C#および.NETに対する誤解をひも解く
ymd65536
0
310
CSC509 Lecture 04
javiergs
PRO
0
150
게임 개발하던 학생이이 세계에선 안드로이드 개발자?
pangmoo
0
110
WEBアプリケーションにおけるAWS Lambdaを用いた大規模な非同期処理の実践
delhi09
PRO
7
4.4k
Re:PandasAI:生成AIがデータ分析業務にもたらすパラダイムシフト【増補改訂版】
negi111111
1
1.1k
Cohesion in Modeling and Design
mploed
3
220
Featured
See All Featured
WebSockets: Embracing the real-time Web
robhawkes
59
7.4k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Designing for humans not robots
tammielis
249
25k
Bash Introduction
62gerente
608
210k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Side Projects
sachag
452
42k
Automating Front-end Workflow
addyosmani
1365
200k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
Statistics for Hackers
jakevdp
796
220k
Music & Morning Musume
bryan
46
6.1k
A better future with KSS
kneath
237
17k
Fireside Chat
paigeccino
32
3k
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/