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
Gunosy for Apple Watchができるまで
Search
Yusuke Kawanabe
May 27, 2015
Technology
6
820
Gunosy for Apple Watchができるまで
GunosyのGlance画面を作るために作ったライブラリ
https://github.com/jeffsuke/GlanceWordRainbowImage
Yusuke Kawanabe
May 27, 2015
Tweet
Share
More Decks by Yusuke Kawanabe
See All by Yusuke Kawanabe
Presentation with Coordinators
ykawanabe
4
770
Other Decks in Technology
See All in Technology
OPENLOGI Company Profile for engineer
hr01
1
17k
メンタル面でもつよつよエンジニアになる/登壇資料(井田 献一朗)
hacobu
0
160
.NET 9 のパフォーマンス改善
nenonaninu
0
2k
多様なメトリックとシステムの健全性維持
masaaki_k
0
140
OPENLOGI Company Profile
hr01
0
57k
クレカ・銀行連携機能における “状態”との向き合い方 / SmartBank Engineer LT Event
smartbank
3
130
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
640
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
140
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
790
Duckiedrone - 基於 Raspberry Pi 與 Python 的小型無人機專案介紹
piepie_tw
PRO
0
120
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
23
6.7k
ハイテク休憩
sat
PRO
2
190
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
A Tale of Four Properties
chriscoyier
157
23k
Become a Pro
speakerdeck
PRO
26
5.1k
How to train your dragon (web standard)
notwaldorf
88
5.8k
Rails Girls Zürich Keynote
gr2m
94
13k
Practical Orchestrator
shlominoach
186
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Building Your Own Lightsaber
phodgson
104
6.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
50k
Designing for humans not robots
tammielis
250
25k
Transcript
Gunosy for Apple Watch ͕Ͱ͖Δ·Ͱ גࣜձࣾGunosyɹ։ൃຊ෦ ᬒ༤հ
@jeffsuke iOS App Developer https://github.com/jeffsuke ࠓͷWWDC ҆શͳҬʹധ·Εͦ͏Ͱ͢
WWDC2014ʹ͓͚Δ@jeffsuke॓ധઌۙ
SFةݥͳҬϚοϓ ֎লϗʔϜϖʔδΑΓ
Gunosy • ใΩϡϨʔγϣϯαʔϏε • 900ສμϯϩʔυ • ࣾһͷඪ४ݴޠGoΒ͍͠
֓ཁ • Apple Watch্ͰշదͳମݧΛ࣮ݱ͢Δ·Ͱؤ ுͬͨ
࣍ • Apple WatchΞϓϦ֓ཁ • Watch Appͷ࠷దԽ • Glanceͷ࠷దԽ •
ਃޙͷ
Gunosy for Apple WatchͰग़དྷΔ͜ͱ Glance Watch app
Apple WatchΞϓϦ ΞϓϦຊମ Extension Watch app Storyboard Image assets Controller,
Model Setter UIEvent
Apple WatchΞϓϦͷΈ • ՄೳͳݶΓը૾Apple Watchଆʹอଘ͓ͯ͘͠ • ද͍ࣔͯ͠Δviewͷใऔಘग़དྷͳ͍
Watch Appʹ͓͚Δ࠷దԽ
Gunosyʹ͓͚ΔWatch App • Alamofire • SwiftyJSON • API͔Βड͚औͬͨͷใΛݩʹ هࣄΛදࣔɻৄࡉϖʔδͰɺຊମʹ อଘɺຊମͰ։͘ࣄ͕Ͱ͖Δɻ
• ඳը·ͰΛ࠷ʹ͢Δ • iPhoneͱAppleWatchͷ௨৴ΛݮΒ͢ • อଘग़དྷΔͷอଘ͢Δ ϙΠϯτ ֓ཁ
willActivate()ͷ׆༻ • initͱawakeͰͷॲཧΛ࠷খݶʹ 1. Watch App͕ݺͼग़͞ΕΔ 2. Storyboard͕ಡΈࠐ·ΕΔ 3. ରը໘ͷinit,
awake͕Δ 4. Watch্Ͱը໘͕දࣔ͞ΕΔ 5. willActivate()͕ݺΕΔ ىಈ·Ͱͷखॱ
willActivate()ͷ׆༻
WKInterfaceGroupͷར༻ • Placeholderͱͯ͠ • ؙ֯
addCachedImage • BLEͷҝ௨৴ʹ੍ݶ͕͋ΔɻՄೳͳݶΓ࠶ར༻͢Δը૾ Ωϟογϡ • ֤ΞϓϦ5MB·ͰΩϟογϡՄೳ • kiavashfaisali/KFSwiftImageLoaderͱ͔͏ͱศརͬΆ͍ ࢀߟɿ https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/Images.html
http://qiita.com/_tid_/items/55667b00ce158a28428a
addCachedImage ಡΈࠐΈ อଘ
Watch Appʹ͓͚Δ࠷దԽ • ϥΠϑαΠΫϧΛΓඳըՄೳͳ͔Βॱ࣍ඳը ͢Δ • ը૾ՄೳͳݶΓWatchຊମʹ
Glanceʹ͓͚Δ࠷దԽ
Gunosyʹ͓͚ΔGlance • API͔Βड͚औͬͨͷใΛݩʹ ը૾Λදࣔɻ࣌ܭ̍ը໘Ͱχϡʔε͕ ͔Δମݧɻ • ਓʹݟͤͯࣗຫͨ͘͠ͳΔػೳ Glance • ಡΈࠐΈ·Ͱͷ͕࣌ؒϙΠϯτ
• ͻͱͰ͔ΔUI ϙΠϯτ ֓ཁ
ՄೳͳݶΓΩϟογϡ͢Δ • ڞ௨ͷAppGroupΛઃఆ͠ɺNSUserDefault ͰඞཁͳσʔλΛڞ༗ͨ͠ɻ • [[NSUserDefaults alloc] initWithSuiteName:@“group.mycompany.my app"] App
Group ը૾Ωϟογϡ • addCachedImage
ຊମͰը૾Λੜ͢Δ
ຊମͰը૾Λੜ͢Δ
GithubͰެ։͍ͯ͠·͢ • https://github.com/jeffsuke/GlanceWordRainbowImage
Glanceʹ͓͚Δ࠷దԽ • ը૾ʹඳը͢Δ͜ͱͰෳࡶͳදݱΛ࣮ݱ • ՄೳͳݶΓը૾ΛΩϟογϡ͓ͯ͘͠
ਃޙͷ
ϦδΣΫτͷ • ൃചͰ͋Δ4/24Λࢦͯ͠։ൃ • ͔͠͠ೋͷϦδΣΫτ • ೋͷమΛ౿·ͳ͍Tips
ϦδΣΫτࣄྫ̍ • Watch appΛ͏લʹҰiPhoneͷ ىಈΛཁٻ͠ɺϦδΣΫτɻ • Υον୯ମͰҙຯͷ͋ΔػೳΛఏ ڙͰ͖͍ͯͳ͍ҝɺຊମΞϓϦͰೝ ূΛ࣮ߦ͢Δ͜ͱʹɻ •
ͨͩ͠ɺJALUberϩάΠϯΛཁ ٻ͢ΔΞϓϦଘࡏ͢ΔͷͰɺϩά ΠϯͳΒྑ͍ͷ͔ɻ
ϦδΣΫτࣄྫ̎ • iPhoneͰಡΉϘλϯΛԡͯ͠ WatchΞϓϦͰͷมԽ͕ͳ͍ͨΊϦ δΣΫτɻ • openParentApplication:reply:Λ༻͍ ͯ։͍͔ͨͲ͏͔Λฦ͢ มߋલ มߋޙ
ϦδΣΫτࣄྫ̎ Watchଆ ຊମଆ
ϦδΣΫτͷ·ͱΊ • Apple Watch୯ମͰମݧ͕Γཱ͍ͬͯΔඞཁ͕ ͋Δ
Apple Watch·ͱΊ • Apple WatchΞϓϦόΠφϦʹՄೳͳݶΓViewؔ ࿈ͷཁૉΛؚΊ͓ͯ͘ • ෳࡶͳॲཧExtensionɺ͕͔͔࣌ؒΔॲཧຊ ମΞϓϦͰ࣮ࢪ •
WatchΞϓϦ୯ମͰମݧΛಧ͚Δඞཁ͕͋Δ
࣭ٙԠ