Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Jacky Wang - KKBOX Apple Watch App

591 views

Published on

Introduction to KKBOX's Apple Watch App

Published in: Engineering
  • Login to see the comments

  • Be the first to like this

Jacky Wang - KKBOX Apple Watch App

  1. 1. KKBOX Apple Watch App Jacky Wang
  2. 2. Agenda • Introduction of KKBOX Watch App • Interesting things • Apple Watch Lab Challenges & Solutions • What did we learn?
  3. 3. Introduction
  4. 4. App Store • Launched on April 21
  5. 5. Functionalities • Play Control • Lyrics • Playlists • Radio
  6. 6. DEMO
  7. 7. Interesting things during development
  8. 8. Context Menu
  9. 9. Context Menu • Original Design • Use force touch to show menu Force Touch Rejected by Apple
  10. 10. Context Menu • Menu options have to be directly related to content on screen • Cannot be used as segue to other InterfaceControllers Force Touch
  11. 11. Animation
  12. 12. Animation • Only support GIF • Play Pause • Next Previous song
  13. 13. Communication WatchPhone ?
  14. 14. Communication - Shared Data • NSUserDefault • App groups must be enabled • Commands, Data are stored in Shared Data • Shared Data changed Notification is sent WatchPhone SD notification data
  15. 15. Communication - OpenParentApplication • Main method of Data exchange • No more sharedData • One direction • Watch needs to check and sync everything. • Too expensive WatchPhone openParent data notification
  16. 16. Communication - WatchAppNotificationCenter • CFNotification Center & Darwin Notification Center • Allows adding specific observers and keys • Only updates what is necessary • Better performance WatchPhone openParent data Notification Center
  17. 17. Apple Watch Lab Time Square, Hong Kong
  18. 18. Apple Watch Lab • Invited to test our app on real device for 2 days
  19. 19. Challenges
  20. 20. Challenges • Everything was perfect on the simulator. • Everything is different on the real device.
  21. 21. Debugging • Need to manually attach process to iPhone and Apple Watch on simulator • Xcode crashes when attaching process on real device • Could only debug with NSLog
  22. 22. Launching in background • Crash every time we launched app from watch • Because app is only launched in background • Be careful with what you do in the background • Doesn’t show on simulator.
  23. 23. Cache Images • WatchKit Extension is slower than simulator and unstable sometimes • Cache any static images you can as early as possible • A simple menu could cause unexpected lag
  24. 24. Creating Tables • 2 out of 10 times, tables won’t load • Task finished in code but screen only shows a loading indicator • System bug? • Left lab without a solution :(
  25. 25. Creating Tables • Last resort was keeping only Now Playing • UX > Functionality • Apple suggested maybe try using SharedData • Rebuilt the communication infrastructure. • Solved the problem.
  26. 26. Solution • Instant status updates • OpenParentApplication • Data transfer • SharedData WatchPhone SD data openParent data Notification Center
  27. 27. Creating Tables - Instagram https://github.com/Instagram/IGInterfaceDataTable
  28. 28. What did we learn?
  29. 29. Never trust the simulator 100% Always test on real device before shipping…
  30. 30. Never trust Apple 100% Sometimes, they don’t even know what is best…
  31. 31. Thank you JackyWangDeveloper@gmail.com

×