extendedRuntimeSession(_:didInvalidateWith:error:)
Indicates that the session has encountered an error or stopped running.
Declaration
func extendedRuntimeSession(_ extendedRuntimeSession: WKExtendedRuntimeSession, didInvalidateWith reason: WKExtendedRuntimeSessionInvalidationReason, error: (any Error)?)Parameters
- extendedRuntimeSession:
The session that became invalid.
- reason:
The reason the session became invalid.
- error:
If the
reasonparameter is Error, then this parameter contains additional information about the error. Otherwise it is set tonil.
Discussion
The system calls this method both when a session fails to start and when a session stops running. Use the invalidation reason to determine why the session became invalid.