Apple Watch App Development

Apple Watch Development Calicut

WatchOS apps can provide four different components for the user: full apps, glances, notifications, and complications. You must always create a full Apple Watch app, which can be opened from the home screen of the Apple Watch.

  1. Full apps behave in a similar way to iPhone apps, and can have multiple screens and a range of possible interactions.
  2. Glances are single screens of content that can be accessed by swiping up from the watch face. They don't have any interactive elements—they're only for displaying information. If the user taps on the screen, the full app is launched.
  3. Notifications appear when the watchOS app's counterpart iOS app receives a notification. Notifications usually come from the Apple Push Notification service, but they can also be "local" notifications, which the iOS app schedules for later delivery.
  4. Complications are small elements that are embedded into certain watch faces. They're not interactive, but they let apps add a little more information to the most quickly accessible part of the phone's interface. Additionally, they can also participate in Time Travel, in which the user rotates the Digital Crown to view the watch face as it appeared in the past, or will appear in the future.
Apple Watch Development Kannur

WatchOS apps are embedded inside iOS apps. When you download and install an iOS app that contains a watchOS app inside it, that app is automatically transferred over the Bluetooth link to the watch. If the watch isn't in Bluetooth range of the iPhone at the time, it's installed later.

WatchOS apps are independent applications that run entirely on the watch: they do their own processing, manage their own memory, and can store files on the watch. However, watchOS apps rely on the parent iPhone for access to any of the user's data that's stored on the device.

Apple Watches require the presence of a parent iPhone. They don't work without one; additionally, they specifically require an iPhone, not an iPod touch or an iPad.

Apple Watch Development Bangalore

Apps for the Apple Watch have a unique life cycle when compared to iOS or OS X applications. Your app can be launched in a variety of circumstances:

  1. When the user explicitly launches your app from the watch home screen
  2. When the user interacts with notifications from your app on the watch
  3. When the user interacts with a glance provided by your app
  4. When the watch face needs to update a complication on the watch face provided by your app

A watchOS App's Architecture

A watchOS app is very similar to an iOS app: it's a bundle of resources and code. The resources include the files that define the UI, any images and media needed by the app, and the compiled binary containing all of the app's code.

The watchOS app is exposed to the user as an icon on the Apple Watch's home screen, which is the grid of icons that you see when you press the Digital Crown from the watch face. In addition to the main app itself, a watchOS app can also include the following:

  1. A single glance interface, which allows the app to display a quick, single-page summary of the most important information. For example, when you swipe up from the bottom of the screen, you can access a quick summary of the current weather; this is a glance interface provided by the Weather app.
  2. Customized interfaces for each of the different types of notifications the user might receive. The Uber app customizes the presentations of notifications that alert the user when the car he has requested is arriving, to show the license plate number of the car to look for.
  3. A number of complications: small user-interface elements that are shown as part of the watch face. The Weather app also provides a small summary of the current weather, embedded directly into the watch face.

To communicate with the parent iPhone, you use the WatchConnectivity framework to send and receive files, or small chunks of information. WatchConnectivity is the only way to access information that's kept inside the iOS app—because the Apple Watch and the iPhone are separate devices, there's no shared file storage between them.

Designing for the Apple Watch

Designing for the Apple Watch Calicut

The Apple Watch requires you to think about the constraints of the device you're designing for with even more pedantry and attention to detail than is required for the iPhone and iPad. You need to keep the following in mind when designing Apple Watch apps:

  1. The Apple Watch has an absolutely, ridiculously minuscule screen—it's tiny!
  2. The screen is not visible most of the time
  3. Nobody wants to spend any more than five seconds, if that, looking at it
  4. The watch is a separate computer (more on this later)
  5. It has no keyboard, so the only text input available is via voice dictation
  6. It has a very, very small storage capacity—less than 8 GB, and only a tiny fraction of that is available for you to use

In general, as long as you're careful—and pay attention to the design constraints of the watch—you'll probably be fine if you follow the same general approach that is taken for iOS development. That said, it's easy to forget that every single thing that your Apple Watch app does relies on an often unreliable Bluetooth connection to an iPhone. It's especially easy to forget this when you're using the simulator to test things, because the Watch simulator doesn't have to deal with talking over the radio to its simulated counterpart iPhone. This means that the simulator will be significantly faster than a real Apple Watch will be.

Dealing with the Device and Simulator

There are two ways to run an Apple Watch app: running it on a real device, and running it in the simulator.

Just as with building apps for iPhone and iPad, it's always better to run your code on a real device, for a bunch of reasons: the simulator is faster than the real watch, and responds to user input much more quickly; the simulator is a lot easier to read than the real watch; and apps running on the simulator don't have to compete for attention with other apps. Additionally, when you're running code on the simulator, you're not wearing the app on your wrist, and you're not interacting with it in the same way.

At the same time, though, building and testing your app on the simulator is considerably easier than using a real device—you don't need to worry about pairing, or waiting for the install to complete. You also don't have to own a real device. (Again, though, if you're making apps, you really should own a watch. Given the cost of buying additional hardware, though, it's understandable to want to start building apps on the simulator before getting a device.)

Diving In

Let's dive into creating an app for the Apple Watch. Because we're starting from scratch, the iOS app that runs on the phone will be mostly empty, and we'll focus our attention on the watchOS app.

To get started, you'll need a copy of Xcode 7.2 or later installed.

When shipping a real app, your iOS app needs to be fully functional. Focus on getting that product complete as well as your Apple Watch—don't make a poor iOS app and put your entire energy into the watchOS app. The first experience your user will have with your apps will be the iOS app.

Get in Touch