---
title: "attemptRecovery(optionIndex:)"
framework: managedappdistribution
role: symbol
role_heading: Instance Method
path: "managedappdistribution/managedappdistributionerror/attemptrecovery(optionindex:)"
---

# attemptRecovery(optionIndex:)

Attempt to recover from this error when someone selects the option at the given index.

## Declaration

```swift
func attemptRecovery(optionIndex recoveryOptionIndex: Int) -> Bool
```

## Return Value

Return Value true to indicate successful recovery; otherwise false.

## See Also

### Recovering from errors

- [attemptRecovery(optionIndex:resultHandler:)](managedappdistribution/managedappdistributionerror/attemptrecovery(optionindex:resulthandler:).md)
