---
title: notPermitted
framework: backgroundtasks
role: symbol
role_heading: Type Property
path: backgroundtasks/bgtaskscheduler/error/notpermitted
---

# notPermitted

A task scheduling error that indicates the app isn’t permitted to launch the task.

## Declaration

```swift
static var notPermitted: BGTaskScheduler.Error.Code { get }
```

## Discussion

Discussion There are two causes for this error: The app didn’t set the appropriate mode in the UIBackgroundModes array. The task identifier of the submitted task wasn’t in the BGTaskSchedulerPermittedIdentifiers array in The Info.plist File.

## See Also

### Getting the error codes

- [BGTaskScheduler.Error.Code](backgroundtasks/bgtaskscheduler/error/code.md)
- [tooManyPendingTaskRequests](backgroundtasks/bgtaskscheduler/error/toomanypendingtaskrequests.md)
- [unavailable](backgroundtasks/bgtaskscheduler/error/unavailable.md)
