---
title: "userInteractionNoLongerPermitted(forError:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uidocument/userinteractionnolongerpermitted(forerror:)"
---

# userInteractionNoLongerPermitted(forError:)

Indicates when it’s no longer safe to proceed without immediately handling the error.

## Declaration

```swift
func userInteractionNoLongerPermitted(forError error: any Error)
```

## Parameters

- `error`: An error object encapsulating information about the error.

## Discussion

Discussion UIKit calls this method when it’s no longer safe to proceed without immediately handling the error, such as when the application is being suspended. Subclasses that override this method must immediately end error handling (including dismissing any interactive user interface) and call finishedHandlingError(_:recovered:) before returning. It’s only necessary to override this method if you override handleError(_:userInteractionPermitted:) without invoking the superclass implementation (super).

## See Also

### Resolving conflicts and handling errors

- [handleError(_:userInteractionPermitted:)](uikit/uidocument/handleerror(_:userinteractionpermitted:).md)
- [finishedHandlingError(_:recovered:)](uikit/uidocument/finishedhandlingerror(_:recovered:).md)
