Ad-hoc network creation fails on Big Sur

Before macOS Big Sur, one could create an ad-hoc WiFi network using CWInterface's -startIBSSModeWithSSID: security: channel: password: error:

But this appears to no longer function on Big Sur:

The operation couldn’t be completed. (com.apple.coreWLAN.error error -3930.)

What is the Big Sur way of programmatically establishing an ad-hoc network?

Core WLAN is definitely the right API for this. The error you’re seeing, -3930, translates to kCWOperationNotPermittedErr. Originally I had assumed that this was controlled by the requireAdministratorForIBSSMode property, but I ran some tests and it’s not behaviour as I expected )-:

I’m going to need to dig into this in more detail, and I don’t have time to do that here on DevForums. Please open a DTS tech support incident and we can pick things up in that context.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Ad-hoc network creation fails on Big Sur
 
 
Q