Krishna Kirana
Krishna Kirana

Reputation: 478

WCSession is not reachable for sending messages

I want to trigger few events to my watch extension app from the iOS app but I'm getting the error saying WCSession is not reachable. All my events are time-sensitive, So I can't wait for the user to turn on the watch display to trigger the events.

  1. Is there any way where I can achieve this using local notification?

  2. Is it possible to trigger watchOS launch, so that WCSession becomes reachable without user action?

Upvotes: 0

Views: 1647

Answers (1)

kildos
kildos

Reputation: 58

Is there any way where I can achieve this using local notification?

As far as I know, a notification does not change the reachability. You could debug its behaviour by using this on the iOS side to check if it becomes available.

func sessionReachabilityDidChange(_ session: WCSession) {}

I would recommend you to take a look at Extended Runtime Sessions, although it won't be running 24/7 in the background.

Upvotes: 2

Related Questions