sessionDidBecomeInactive(_:)
Tells the delegate that the session will stop communicating with the current Apple Watch.
Declaration
func sessionDidBecomeInactive(_ session: WCSession)Parameters
- session:
The session object whose activation state changed.
Discussion
You must implement this method to support quick switching between Apple Watch devices in your iPhone app. The session calls this method when it detects that the user has switched to a different Apple Watch. While in the inactive state, the session delivers any pending data to your delegate object and prevents you from initiating any new data transfers. After the last transfer finishes, the session moves to the deactivated state.
Use this method to update any private data structures that might be affected by the impending change to the active Apple Watch. For example, you might clean up data structures and close files related to outgoing content.