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

Practical WatchKit Development (UIKonf 2015)

Practical WatchKit Development (UIKonf 2015)

Presentation at UIKonf 2015 in Berlin http://www.uikonf.com

Claus Höfele

May 18, 2015
Tweet

More Decks by Claus Höfele

Other Decks in Programming

Transcript

  1. class TripDetailInterfaceController: WKInterfaceController { @IBOutlet private weak var map: WKInterfaceMap!

    override func awakeWithContext(context: AnyObject?) { super.awakeWithContext(context) ... } override func willActivate() { super.willActivate() ... } }
  2. private func callParentApp() { let userInfo = ["input": "data"] WKInterfaceController.openParentApplication(userInfo)

    { replyInfo, error in println("reply \(replyInfo)") } } func application(_:handleWatchKitExtensionRequest:reply:) Calling the Parent App
  3. let defaults = NSUserDefaults(suiteName: "group.com.claushoefele.T")! func updateObjectForKey<T: NSCoding>(key: String, item:

    T) { let data = NSKeyedArchiver.archivedDataWithRootObject(item) defaults.setObject(data, forKey: key) }
  4. “Anything that could show the user a progress spinner (however

    briefly) is a failure on my part.” –David Smith
  5. “[…] many of us —  developers included — are still figuring out how

    this device fits into daily life […]” –M.G. Siegler