<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNUserNotificationCenter/getNotificationSettings(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "c:objc(cs)UNUserNotificationCenter(im)getNotificationSettingsWithCompletionHandler:"
  },
  "title" : "getNotificationSettings(completionHandler:)"
}
-->

# getNotificationSettings(completionHandler:)

Retrieves the authorization and feature-related settings for your app.

```
func getNotificationSettings(completionHandler: @escaping @Sendable (UNNotificationSettings) -> Void)
```

## Parameters

`completionHandler`

The block to execute asynchronously with the results. Your app may execute this block on a background thread. The block has no return value and takes the following parameter:

- settings: The [`UNNotificationSettings`](/documentation/UserNotifications/UNNotificationSettings) object containing the current authorization settings for your app.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func notificationSettings() async -> UNNotificationSettings
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

Use this method to determine the user interactions and notification-related features that the system authorizes your app to use. You might then use this information to enable or disable specific notification-related features of your app.

```swift
let center = UNUserNotificationCenter.current()
let settings = await center.notificationSettings()
// Add code here to inspect or act on the settings.
```

When the user initially grants authorization to your app, the system gives your app a set of default notification-related settings. The user may change those settings at any time to enable or disable specific capabilities. For example, the user might disable the playing of sounds when a notification arrives.

---

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)