---
title: "defaultStatusForCategory:error:"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiapplication/defaultstatusforcategory:error:"
---

# defaultStatusForCategory:error:

Reports whether this app is the person’s default app in the given category.

## Declaration

```occ
- (UIApplicationCategoryDefaultStatus) defaultStatusForCategory:(UIApplicationCategory) category error:(NSError **) error;
```

## Parameters

- `category`: The type of app for which you test whether your app is the default.
- `error`: If an error occurs, upon return contains an doc://com.apple.documentation/documentation/Foundation/NSError object that describes the problem. If you are not interested in possible errors, pass in NULL.

## Return Value

Return Value If the system could determine the status of the app, this method returns UIApplicationCategoryDefaultStatusIsDefault if the app is the default app in the category, and UIApplicationCategoryDefaultStatusNotDefault otherwise. If the system couldn’t determine the status, or the app has exceeded the threshold rate for calling this method, it returns UIApplicationCategoryDefaultStatusUnavailable and supplies more information about the problem in error.

## Discussion

Discussion To reduce the likelihood that users will face continuous requests to set a browser as their default, this API will only tell the browser app if it is the default once per year. If you call the method too frequently, it throws an error with the domain UIApplicationCategoryDefaultErrorDomain and the code rateLimited. The error’s info dictionary contains these keys:

## See Also

### Discovering if your app is the default app in a category

- [UIApplicationCategoryDefaultStatus](uikit/uiapplicationcategorydefaultstatus.md)
- [UIApplication.Category](uikit/uiapplication/category.md)
- [UIApplicationCategoryDefaultErrorDomain](uikit/uiapplicationcategorydefaulterrordomain.md)
- [UIApplicationCategoryDefaultRetryAvailabilityDateErrorKey](uikit/uiapplicationcategorydefaultretryavailabilitydateerrorkey.md)
- [UIApplicationCategoryDefaultStatusLastProvidedDateErrorKey](uikit/uiapplicationcategorydefaultstatuslastprovideddateerrorkey.md)
