---
title: "commitConfiguration(_:authorization:)"
framework: corewlan
role: symbol
role_heading: Instance Method
path: "corewlan/cwinterface/commitconfiguration(_:authorization:)"
---

# commitConfiguration(_:authorization:)

Commit a configuration for the given WLAN interface.

## Declaration

```swift
func commitConfiguration(_ configuration: CWConfiguration, authorization: SFAuthorization?) throws
```

## Parameters

- `configuration`: The configuration to commit.
- `authorization`: An SFAuthorization object to use for authorizing the commit. This parameter is optional and can be passed as nil.

## Discussion

Discussion This method requires the caller have root privileges or obtain administrator privileges with the authorization parameter. note: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.
