---
title: BGTaskScheduler.Error.Code.unavailable
framework: backgroundtasks
role: symbol
role_heading: Case
path: backgroundtasks/bgtaskscheduler/error/code/unavailable
---

# BGTaskScheduler.Error.Code.unavailable

A task scheduling error that indicates the app or extension can’t schedule background work.

## Declaration

```swift
case unavailable
```

## Discussion

Discussion This error usually occurs for one of three reasons: A person disabled background refresh in settings. The app runs on Simulator which doesn’t support background processing. The extension either didn’t set RequestsOpenAccess to YES in The Info.plist File, or a person didn’t grant open access.

## See Also

### Identifying an error

- [BGTaskScheduler.Error.Code.notPermitted](backgroundtasks/bgtaskscheduler/error/code/notpermitted.md)
- [BGTaskScheduler.Error.Code.tooManyPendingTaskRequests](backgroundtasks/bgtaskscheduler/error/code/toomanypendingtaskrequests.md)
- [BGTaskScheduler.Error.Code.immediateRunIneligible](backgroundtasks/bgtaskscheduler/error/code/immediaterunineligible.md)
