<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocument/userInteractionNoLongerPermitted(forError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocument(im)userInteractionNoLongerPermittedForError:"
  },
  "title" : "userInteractionNoLongerPermitted(forError:)"
}
-->

# userInteractionNoLongerPermitted(forError:)

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

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

## Parameters

`error`

An error object encapsulating information about the error.

## 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:)`](/documentation/UIKit/UIDocument/finishedHandlingError(_:recovered:)) before returning. It’s only necessary to override this method if you override [`handleError(_:userInteractionPermitted:)`](/documentation/UIKit/UIDocument/handleError(_:userInteractionPermitted:)) without invoking the superclass implementation (`super`).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)