CoreWLAN: CWInterface.commitConfiguration(:authorization:) requires SecurityFoundation

Originator:fti
Number:rdar://33029361 Date Originated:June 28 2017
Status:Open Resolved:
Product:macOS + SDK Product Version:16G18a
Classification: Reproducible:Always
 
Summary:
CoreWLAN: CWInterface.commitConfiguration(:authorization:) requires SecurityFoundation
I cannot see it mentioned anywhere in the documentation. 

It is a problem as authorisation can now be `nil`.

Steps to Reproduce:
Run the following code: 

import Foundation
import CoreWLAN
let configuration = CWWiFiClient.shared().interface()?.configuration()
let profiles = CWWiFiClient.shared().interface()?.commitConfiguration(configuration, authorization: nil)

Expected Results:
Documentation or error should ask to import SecurityFoundation

Actual Results:
test.swift:4:49: error: value of type 'CWInterface' has no member 'commitConfiguration'
let profiles = CWWiFiClient.shared().interface()?.commitConfiguration(configuration, authorization: nil)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~~~~~~~~~~~~~~~~~~

Version:
16G18a

Notes:
It took me hours to finally find the answer, by mistake.

Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!