WatchKit overview

WatchKit overview

A comprehensive overview of WatchKit for our monthly usergroup in Stuttgart http://mobilemaultaschen.de/

896e816a54b484b5233ed5f9ea5278a5?s=128

Florian

March 10, 2015
Tweet

Transcript

  1. None
  2. WatchKit

  3. iOS App

  4. None
  5. App Groups

  6. NSUserDefaults

  7. NSUserDefaults let defaults = NSUserDefaults(suiteName: "group.com.keslcod.watch")

  8. NSFileManager

  9. NSFileManager let url = manager. containerURLForSecurityApplicatio nGroupIdentifier(“group.com.keslc od.watch")

  10. WatchKit Apps

  11. WatchKit Apps. Your app on Apple Watch contains a full

    user interface. Users can launch, control, and interact with your app in ways unique to Apple Watch.
  12. Glances. You can provide users with timely read-only information that

    they care about with a Glance — a quick and lightweight view of your app.
  13. Actionable Notifications. Actionable notifications built and designed with WatchKit let

    users take action right from their wrists.
  14. Styles

  15. Hierarchical similar to UINavigation- ViewController

  16. None
  17. Page-based Total number of pages is fixed and must be

    set on compile time
  18. None
  19. User Interface

  20. User Interface • Button • Label • Date/Time/Timer label •

    Separator • Switch • MapView • Image • Menu
  21. User Interface • defined at compile time • NSObject subclasses,

    *no* views • one way communication —> you can’t read properties of views on Apple Watch
  22. WKInterfaceControllerer • init • awakeWithContext() • willActivate() • didDeactivate()

  23. WKInterfaceGroup • horizontal/vertical flow layout • margins/spacing • can be

    nested • background color/image
  24. WKInterfaceTable • single column • multiple row types (header, content,

    footer) • every row backed by controller, subclass of NSObject
  25. WKInterfaceMap • non-interactive snapshop • up to 5 annotations •

    tap opens the Maps app on iPhone
  26. Animations • no dynamic animations • Flipbook —> https://github.com/frosty/Flipbook

  27. Dev. Setup

  28. Dev. Setup • Xcode • 8.2 GM • 8.3 β2

    (—> Swift 1.2) • iOS simulator • Hardware - External Displays - Apple Watch
  29. None
  30. Bezel http://infinitapps.com/ bezel/

  31. None
  32. Xscope http://xscopeapp.com