WatchKit Packaging and WKInterfaceController


Having spent the last few (late) night with Xcode playing with WatchKit apps, there are a few interesting takeaways for any new WatchKit developers:

  • Packaging of WatchKit apps is nicely explained by this diagram – target structure.   The storyboards are separate from the actual WatchKit code (WKInterfaceController etc).  More interestingly, and least well publicised is the fact that Apple Watch also uses wifi if possible, together with the default Bluetooth LE to communicate with its paired iPhone.
  • Actions and Outlets work as you’d expect – Control-Drag the UI widget from the storyboard into the Assistant editor page that contains the WKInterfaceController derived code, and the outlet will automatically be created and bound.  Essentially creating an IPC channel over Bluetooth to the paired iPhone🙂
  • Shared app group’s are relevant if you want the two processes to access the same files or data (e.g. preference)
  • openParentApplication looks like effectively an RPC call between the WatchKit extension sandbox process and the parent iOS process.
  • This tutorial offers assistance on adding Glances and Handoff functionality to your WatchKit app.

~ by mdavey on April 10, 2015.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: