Enumeration Case

WKExtendedRuntimeSessionErrorBARDisabled

The user has disabled background app refresh.

Declaration

WKExtendedRuntimeSessionErrorBARDisabled = 6

Discussion

If the user has disabled Background App Refresh for this app, any attempt to schedule a session by calling the startAtDate: method fails. The system calls your delegate’s extendedRuntimeSession:didInvalidateWithReason:error: method and passes a WKExtendedRuntimeSessionInvalidationReasonError reason with a WKExtendedRuntimeSessionErrorBARDisabled error.

Users can turn off Background App Refresh by selecting General > Background App Refresh in the Watch App.

See Also

Error Codes

WKExtendedRuntimeSessionErrorUnknown

An unknown error occurred.

WKExtendedRuntimeSessionErrorScheduledTooFarInAdvance

The app attempted to schedule a session too far in the future.

WKExtendedRuntimeSessionErrorMustBeActiveToStartOrSchedule

The watchOS app attempted to start or schedule a session while not in an active state.

WKExtendedRuntimeSessionErrorNotYetStarted

The app invalidated the session before it started.

WKExtendedRuntimeSessionErrorExceededResourceLimits

The session exceeded its resource limits.

WKExtendedRuntimeSessionErrorNotApprovedToStartSession

The app attempted to start a session, but doesn’t have a valid session type.

WKExtendedRuntimeSessionErrorNotApprovedToSchedule

The app attempted to schedule a session, but the session type does not support scheduling.