Reputation: 3137
In my app, I want to implement functionality like when iPhone away with some distance from iWatch than watch app show local notification with a text message
Upvotes: 0
Views: 209
Reputation: 54706
If it is enough for you to get notified when the Watch gets disconnected from the Phone, you could use the WatchConnectivity
framework to achieve this.
The optional func sessionReachabilityDidChange(_:)
gets called on the Watch when it disconnects from the Phone.
However, your WatchExtension needs to be running in the foreground or with high priority in the background for this function to work.
Upvotes: 1