# getDeviceAttributes

Gets properties stored about the device that are used in audience filters.

> **Info**

This method returns all device attributes that can be used in audience filters in the Superwall dashboard.



> **Warning**

`isApplePayAvailable` is deprecated starting in 4.11.2 and now always returns `true`. It will be removed in a future release and should no longer be used in audience filters.



Purpose [#purpose]

Retrieves a dictionary of device properties that are used when evaluating audience filters. This is useful for debugging audience filter behavior or understanding what device attributes are available.

Signature [#signature]

```swift
public func getDeviceAttributes() async -> [String: Any]
```

Parameters [#parameters]

No parameters.

Returns / State [#returns--state]

Returns a dictionary mapping attribute names to their values. Common attributes include:

* `isApplePayAvailable` - Deprecated in 4.11.2 and always `true` (previously indicated Apple Pay availability)
* `swiftVersion` - The Swift version (available in version 4.7.0+)
* `compilerVersion` - The compiler version (available in version 4.7.0+)
* `localeIdentifier` - The device locale
* `osVersion` - The iOS version
* `model` - The device model
* And many more device-specific attributes

Usage [#usage]

Get device attributes:

```swift
let deviceAttributes = await Superwall.shared.getDeviceAttributes()

// Check specific attributes
// `isApplePayAvailable` is deprecated and always true in 4.11.2+

// Print all attributes for debugging
print("Device attributes: \(deviceAttributes)")
```

Use in audience filter debugging:

```swift
Task {
  let attributes = await Superwall.shared.getDeviceAttributes()
  
  // Check if user matches an audience filter condition
  if let swiftVersion = attributes["swiftVersion"] as? String {
    print("Swift version: \(swiftVersion)")
  }
}
```

Related [#related]

* Device attributes are automatically used in audience filters
* `isApplePayAvailable` was added in 4.9.0, updated in 4.10.5, and deprecated in 4.11.2 (now always `true`)
* `swiftVersion` and `compilerVersion` were added in version 4.7.0