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
750
Other Decks in Technology
See All in Technology
Engineer Career Talk
lycorp_recruit_jp
0
170
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
Taming you application's environments
salaboy
0
190
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
250
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Done Done
chrislema
181
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Why Our Code Smells
bkeepers
PRO
334
57k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Gamification - CAS2011
davidbonilla
80
5k
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ΞϓϦ୯ମͰମݧΛಧ͚Δඞཁ͕͋Δ
࣭ٙԠ