0

I’d like to know if there’s a way to detect if the iPhone is unreachable while the WatchOS app is in background. I tried to connect each other with CoreBluetooth but if WatchOS app is in background won’t call didDisconnected method.

So I tried the trick of update locations to get alive the app in the background, but everytime the Apple Watch screen awakes the WatchOS app is in foreground and the notification won’t works.

I implemented the sessionReachabilityDidChange but neither this is called in background.

Can somebody give me a hint? Or can tell me how to prevent the WatchOS app to be in foreground while update locations is running?

Elia Crocetta
  • 318
  • 1
  • 6
  • 20
  • I would look into Watch Connectivity and the WCSession class. Particularly the `sessionDidDeactivate` method might help with notifying you when the phone is no longer reachable. Post the code of what you're working on and I might be of more help. https://developer.apple.com/documentation/watchconnectivity/wcsessiondelegate/1615670-sessiondiddeactivate – Dan O'Leary Jan 12 '21 at 15:02
  • @DanO'Leary unfortunately `sessionDidDeactivate` is not available on WatchOS, only on iOS. And I need to detect the connection on apple watch. – Elia Crocetta Jan 12 '21 at 15:34

0 Answers0