KKBOX Apple Watch App
Jacky Wang
Agenda• Introduction of
KKBOX Watch App
• Interesting things
• Apple Watch Lab Challenges & Solutions
• What did we learn?
Introduction
App Store• Launched on April 21
Functionalities
• Play Control
• Lyrics
• Playlists
• Radio
DEMO
Interesting things during development
Context Menu
Context Menu• Original Design
• Use force touch to show menu
Force Touch
Rejected by Apple
Context Menu • Menu options have to be directly related to content on
screen
• Cannot be used as segue to other InterfaceControllers
Force Touch
Animation
Animation• Only support GIF
• Play Pause
• Next Previous song
Communication
WatchPhone ?
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
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
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
Apple Watch LabTime Square, Hong Kong
Apple Watch Lab• Invited to test our app on real device for 2 days
Challenges
Challenges
• Everything was perfect on the simulator.
• Everything is different on the real device.
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
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.
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
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 :(
Creating Tables • Last resort was keeping only Now Playing
• UX > Functionality
• Apple suggested maybe try using SharedData
• Rebuilt the communication infrastructure.
• Solved the problem.
Solution
• Instant status updates
• OpenParentApplication
• Data transfer
• SharedData
WatchPhone
SD
data
openParent
data
Notification Center
Creating Tables - Instagram
https://github.com/Instagram/IGInterfaceDataTable
What did we learn?
Never trust the simulator 100%
Always test on real device before shipping…
Never trust Apple 100%
Sometimes, they don’t even know what is best…