Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Keynote worthy Apple Watch apps

Keynote worthy Apple Watch apps

Talk I gave at VoxxedDays Belgrade 2015 conference.

Video (in English): https://www.youtube.com/watch?v=rft2KzD4i0k

I look at the Watch app from two angles:

1. Product Manager
How to brainstorm and decide do you need a watch app at all and if yes, what it should be

2. Developer
Issues and challenges in both iOS8+WatchKit 1 path and in iOS 9 + watchOS 2 path

More Decks by Aleksandar Vacić (Radiant Tap)

Other Decks in Programming

Transcript

  1. KEYNOTE WORTHY
    ᴡᴀᴛᴄʜ APPS
    Aleksandar Vacić · Radiant Tap VoxxedDays Belgrade 2015

    View Slide

  2. Multiple feature placements on the App
    Store for all my main apps, in various
    categories, including Run 5k watch app.
    RADIANTTAP.COM
    MY CLAIM TO FAME
    @radiantav

    View Slide

  3. APPLE WATCH IS…
    h i
    BUSINESS OPPORTUNITY DEVELOPER CHALLENGE

    View Slide

  4. is the main focus, where Apple Watch trully shines with
    ubiquitious availability and ease of use and measurement
    HEALTH & FITNESS
    Apple Watch is an excellent triage tool for firehose of
    notifications and remote control for tasks at hand
    PRODUCTIVITY
    Siri, Apple Pay and an array of similar utility functions that
    one can perform with a simple hand gesture or two
    UTILITIES
    KEY AREAS

    View Slide

  5. These are my interpretation of the Watch HIG :)
    AIM for SECONDS
    Use cases are measured in
    seconds, not minutes
    1ST: COMPLICATIONS
    Complications are 1st-level
    UI and are shown all the
    time, on the watch face
    1.5: NOTIFICATIONS
    They appear and disappear
    automatically, but don’t
    require any end-user action
    2ND: GLANCES
    Static views, need to manually
    initiate their appearance,
    swiping from the bottom
    APPS ARE 3RD LEVEL
    Obvious from their placement
    in the overall Watch UI
    CORE TENTPOLES

    View Slide

  6. Must have that one thing
    that is does much, much
    better than iPhone app.
    Complication possible?
    App must exist then.
    If actionable notifications
    add great deal of usability
    to your iPhone app then on
    the Watch they will be
    twice as useful.
    If you are weather or
    stocks app, most likely yes.
    Or any other app that has
    one screen worth of info.
    If none of the previous
    points made much sense,
    then just don’t bother.
    It’s not worth it.
    Does it need
    to exist?
    Actionable
    notifications
    BRAINSTORMING PROCESS
    None of that?
    Don’t bother
    Glances
    would do?

    View Slide

  7. COMPLICATIONS NOTIFICATIONS

    View Slide

  8. GLANCES …wait a minute!
    APPS

    View Slide

  9. INTERACTIONS
    Swipes, Taps & other Gestures
    Digital Crown
    Force Touch
    Siiriiiiiii…
    …minimize the need for them
    …is your new best friend
    …avoid as much as possible
    …if you can use it, I envy you

    View Slide

  10. Enter the
    DEVELOPER
    Thus ends the
    PRODUCT MANAGER

    View Slide

  11. iOS 9 ὑ watchOS 2
    iOS 8 ☓ WatchKit
    TWO PATHS

    View Slide

  12. WATCHKIT 1 APPS
    I hope that when full native WatchKit SDK is revealed in
    upcoming WWDC we will get proper layout engine, as even a
    very limited AL subset would be better than this.
    If not, I don’t see myself writing much of Apple Watch apps in
    the future.
    – me, Feb 2015
    // aplus.rs/2015/thoughts-on-developing-apple-watch-apps/

    View Slide

  13. WATCHKIT LAYOUT

    View Slide

  14. ARCHITECTURE

    View Slide

  15. EXTENSIONS (IOS 8) REFRESHER
    no direct communication with main app
    can use shared container (AppGroups)
    you don’t have any control over extension going up or down
    you don’t know is it even running, you can just guess

    View Slide

  16. IMPORTANT WATCHKIT POINTS
    no way to keep state for the watch ext/app
    you must pre-made all UI at compile time, no runtime alloc
    no way to know did your setText: even made it to the Watch
    no way for watch app to know will tap ever be answered
    This. Is. Hell.

    View Slide

  17. View Slide

  18. May 2015
    // aplus.rs/2015/watchkit-1-dot-0-redux/
    OH, THE SHAME!

    View Slide

  19. ESSENTIALS
    make the app one thick, all-in-one controller
    place all possible states and elements on the screen
    at the same time and then call setHidden: as you need
    nest groups like crazy, no performance penalty
    get out of awakeWithContext: really quickly
    re-read and re-set everything in willActivate:

    View Slide

  20. View Slide

  21. APP LIFECYCLE
    MUST BE FAST!
    dispatch_async()

    View Slide

  22. COMMUNICATION
    everything is asynchronous
    use that shared container as much as it makes sense
    use MMWormhole to fake realtime messaging
    don’t even try to send any more than one or two images
    drop images in the Watch app bundle and reference them

    View Slide

  23. ANIMATIONS

    View Slide

  24. View Slide

  25. aplus.rs/2015/automatic-image-creation-for-watchkit-animated-progress-bars/

    View Slide

  26. [self.pauseRing setBackgroundImageNamed:@"red-134-3-"];
    [self.pauseRing startAnimatingWithImagesInRange:NSMakeRange(0, 31) duration:.4 repeatCount:1];
    [self.pauseSign setBackgroundImageNamed:@"pause-anim-"];
    [self.pauseSign startAnimatingWithImagesInRange:NSMakeRange(0, 38) duration:.6 repeatCount:1];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.6 * NSEC_PER_SEC)), dispatch_get_main_queu
    ^{
    [self.pauseSign stopAnimating];
    [self.pauseSign startAnimatingWithImagesInRange:NSMakeRange(38, 18) duration:1.2 repeatCount:0];
    });
    [self.pauseRing setBackgroundImageNamed:@"red-134-3-"];
    [self.pauseRing startAnimatingWithImagesInRange:NSMakeRange(0, 31) duration:-.4 repeatCount:1];
    [self.pauseSign setBackgroundImageNamed:@"pause-anim-"];
    [self.pauseSign stopAnimating];
    [self.pauseSign startAnimatingWithImagesInRange:NSMakeRange(0, 36) duration:-.4 repeatCount:1];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.4 * NSEC_PER_SEC)), dispatch_get_main_queu
    ^{
    [self.pauseRing setBackgroundImage:nil];
    [self.pauseSign setBackgroundImage:nil];
    });

    View Slide

  27. View Slide

  28. ARCHITECTURE

    View Slide

  29. GOOD STUFF
    · Makes sense to draw and generate graphics in the Extension
    · Ability to operate without the iPhone
    · Extension can keep local cache while it’s working
    · Networking directly from the Extension
    NOT SO GOOD
    · UI layout engine is still the same
    · No shared container, you have to sync
    · You have to sync data.
    · No, really – you have to sync.

    View Slide

  30. AVAILABLE FRAMEWORKS
    ClockKit
    Contacts
    Core Data
    Core Foundation
    Core Graphics
    Core Location
    Core Motion
    EventKit
    Foundation
    HealthKit
    HomeKit
    Image I/O
    MapKit
    Mobile Core Services
    PassKit Framework
    Security Framework
    Watch Connectivity
    WatchKit Framework

    View Slide

  31. APP LIFECYCLE

    View Slide

  32. COMMUNICATION
    Full NSURLSession framework is in watchOS 2
    Goodbye MMWormhole
    Hello Watch Connectivity
    WCSession *wcs = [WCSession defaultSession];
    wcs.delegate = self;
    [wcs activateSession];
    -(void)sessionReachabilityDidChange:(WCSession *)session {}
    -(void)sessionWatchStateDidChange:(WCSession *)session {}

    View Slide

  33. WATCH CONNECTIVITY
    Interactive (foreground) messaging
    Background transfer of current context
    Background transfer of a stream of messages
    Background transfer of files

    View Slide

  34. WATCH CONNECTIVITY
    Interactive (foreground) messaging
    Background transfer of current context
    Background transfer of a stream of messages
    Background transfer of files
    NSDictionary *message = @{…};
    - (void)sendMessage:(NSDictionary *)message
    replyHandler:(nullable void (^)(NSDictionary *replyMessage))replyHandler
    errorHandler:(nullable void (^)(NSError *error))errorHandler {}
    - (void)session:(WCSession *)session
    didReceiveMessage:(nonnull NSDictionary *)message
    replyHandler:(nonnull void (^)(NSDictionary * _Nonnull))replyHandler {}

    View Slide

  35. WATCH CONNECTIVITY
    Interactive (foreground) messaging
    Background transfer of current context
    Background transfer of a stream of messages
    Background transfer of files
    NSDictionary *context = @{...};
    NSError *error = nil;
    BOOL success = [wcs updateApplicationContext:context error:&error];
    - (void)session:(WCSession *)session
    didReceiveApplicationContext:(NSDictionary *)applicationContext {}

    View Slide

  36. WATCH CONNECTIVITY
    Interactive (foreground) messaging
    Background transfer of current context
    Background transfer of a stream of messages
    Background transfer of files
    - (WCSessionUserInfoTransfer *)transferUserInfo:(NSDictionary *)userInfo;
    - (void)session:(WCSession *)session
    didReceiveUserInfo:(NSDictionary *)userInfo;
    - (void)session:(WCSession * __nonnull)session
    didFinishUserInfoTransfer:(WCSessionUserInfoTransfer *)userInfoTransfer
    error:(nullable NSError *)error;

    View Slide

  37. Some
    TIPS

    View Slide

  38. You still need to refresh display on willActivate:
    HKWorkoutSession will allow you to keep your in foreground
    Watch the following session from WWDC 2015:
    207, 208 (WatchKit in depth)
    216 (Layout, Animations)
    228 (Advanced Tips and Tricks)
    713 (Watch Connectivity)

    View Slide

  39. Thanks for
    WATCHING
    Slides at
    speakerdeck.com/radianttap/…

    View Slide