Search code examples
iospush-notificationapple-push-notificationsapple-watch

Apple Watch app (only notifications)


I got simple iOS app for tracking flight status. I want create extension for Apple Watch. But I don't want create any interface. Just sending notifications to user if flight status changes.

Have you got idea how to do it? Maybe someone know good tutorials for that?


Solution

  • You can use a "Glance" just to send a quick update like that, but you need to create the Glance UI separately anyway, and it's part of the same Watch App package.

    Interacting w/a Glance is also supposed to open the Watch app and allow the user to view the info in greater detail/context. Not sure if you can have it just do nothing - that'd likely just appear to be broken/unresponsive, which you probably don't want.

    Ray Wenderlich has several tutorials and an entire book on WatchKit. This link is Part 3 of a series on WatchKit apps that includes using Glances in a similar way: http://www.raywenderlich.com/96741/watchkit-tutorial-with-swift-tables-glances-and-handoff

    Edit: As stated by @bgilham, if you don't want to customize the interface, you can send a notification that will use a stock UI on the Watch. A "Short Look" is a single screen w/limited space & no actions. A "Long Look" can scroll & contain action buttons. See the Apple Watch Programming Guide on Notifications for details.