<!--
{
  "availability" : [
    "iOS: 18.2.0 -",
    "iPadOS: 18.2.0 -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplication/defaultStatusForCategory:error:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIApplication(im)defaultStatusForCategory:error:"
  },
  "title" : "defaultStatusForCategory:error:"
}
-->

# defaultStatusForCategory:error:

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

```
- (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

If the system could determine the status of the app, this method returns [`UIApplicationCategoryDefaultStatusIsDefault`](/documentation/UIKit/UIApplicationCategoryDefaultStatus/UIApplicationCategoryDefaultStatusIsDefault) if the app is the default app in the category, and [`UIApplicationCategoryDefaultStatusNotDefault`](/documentation/UIKit/UIApplicationCategoryDefaultStatus/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`](/documentation/UIKit/UIApplicationCategoryDefaultStatus/UIApplicationCategoryDefaultStatusUnavailable) and supplies more information about the problem in `error`.

## 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`](/documentation/UIKit/UIApplicationCategoryDefaultErrorDomain) and the code [`rateLimited`](/documentation/UIKit/UIApplication/CategoryDefaultError/rateLimited). The error’s info dictionary contains these keys:

- [`UIApplicationCategoryDefaultStatusLastProvidedDateErrorKey`](/documentation/UIKit/UIApplicationCategoryDefaultStatusLastProvidedDateErrorKey): The date at which the app most recently received a [`UIApplicationCategoryDefaultStatusIsDefault`](/documentation/UIKit/UIApplicationCategoryDefaultStatus/UIApplicationCategoryDefaultStatusIsDefault) or [`UIApplicationCategoryDefaultStatusNotDefault`](/documentation/UIKit/UIApplicationCategoryDefaultStatus/UIApplicationCategoryDefaultStatusNotDefault) response from this method.
- [`UIApplicationCategoryDefaultRetryAvailabilityDateErrorKey`](/documentation/UIKit/UIApplicationCategoryDefaultRetryAvailabilityDateErrorKey): The date at which the app can next request an updated response.

---

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)