Search code examples
iosobjective-cwatchkitwatchos-2

Request Background Task To Run On Parent Device From Apple Watch (Watch OS 2.0)


I am trying to make a call to a backgrounded app on the parent device from the Apple Watch. I have the parent device registered to do background fetches, but is it possible to call to the parent app from the watch requesting data on demand?


Solution

  • Checkout the WWDC video Introducing Watch Connectivity. They go over a method on the WCSession object called sendMessage that is able to wake up the iOS app in the background, do some work, and return data back to the watchOS 2 app. Note that while the iOS app does not need to be active (or even initially opened) the watch app does need to be opened and the screen needs to be on in order to make any request.