Instance Property

reachable

A Boolean value indicating whether the counterpart app is available for live messaging.

Declaration

@property(nonatomic, readonly, getter=isReachable) BOOL reachable;

Discussion

This property is YES when the WatchKit extension and the iOS app can communicate with each other.

Specifically: 

  • WatchKit extension. The iOS device is within range, so communication can occur and the WatchKit extension is running in the foreground, or is running with a high priority in the background (for example, during a workout session or when a complication is loading its initial timeline data).

  • iOS app. A paired and active Apple Watch is in range, the corresponding WatchKit extension is running, and the WatchKit extension’s reachable property is YES.

In all other cases, the value is NO.

The counterpart must be reachable in order for you to send messages using the sendMessage:replyHandler:errorHandler: and sendMessageData:replyHandler:errorHandler: methods. Sending messages to a counterpart that is not reachable results in an error.

The value in this property is valid only for a configured session that has been activated successfully. If the activationState property is available, its value must be WCSessionActivationStateActivated. When the session becomes inactive or deactivated, you should ignore the value in this property.