Instance Method

sessionWatchStateDidChange(_:)

Called when a feature is enabled or disabled.

Declaration

optional func sessionWatchStateDidChange(_ session: WCSession)

Parameters

session

The session object whose state changed.

Discussion

The session object calls this method when the value in the isPaired, isWatchAppInstalled, isComplicationEnabled, or watchDirectoryURL properties of the WCSession object changes. Use this state to update the state of your iOS app. For example, when the complication is disabled, make a note of that fact and do not send any more data updates for the complication.

See Also

Managing State Changes

func sessionReachabilityDidChange(WCSession)

Called when the reachability of the counterpart session changes.