NEHotspotConfiguration

Hello, I'm hoping someone can answer a few questions i have, since Apple's documentation does not provide an answer. I'm simply just wanting to connect to a WiFi and disconnect from my app using these methods from the NEHotspotConfigurationManager:

-applyConfiguration:

-removeConfigurationForSSID:

-getConfiguredSSIDsWithCompletionHandler:

-fetchCurrentWithCompletionHandler:

From this documentation, nothing mentions needing a special entitlement :https://developer.apple.com/documentation/networkextension/wi-fi_configuration?language=objc

-Can someone please tell me if I need one for using those methods above?

-What 'Capabilities' do i need to add in Xcode for those items above and to add to my profile? Right now I have 'Access Wifi Information' and 'Hotspot' but I'm unsure if I need Hotspot, since I'm not creating a VPN or my own hotspot, I'm just connecting to a specific WiFi from the app.

Half of the comments on stack overflow or here say conflicting things, and I'd rather not waste a low level help from Apple on this. Thank you

Answered by DTS Engineer in 708764022

So just wondering if I needed to add 'Network Extension' or some other class possibly?

This API needs the Hotspot Configuration entitlement (com.apple.developer.networking.HotspotConfiguration). If you open the sample in Xcode you’ll see that reflected in both the .entitlements file and the Signing & Capabilities editor.

This entitlement does not need specific approval from Apple to use. Any (paid) developer account can use it. See the table in Developer Account Help > Supported capabilities (iOS).

It is, like all entitlements on iOS, restricted, that is, it must be authorised by a provisioning profile. See What exactly is a provisioning profile? for more background on that.

Share and Enjoy

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

I recommend that you start with the NEHotspotConfiguration Sample.

Share and Enjoy

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

Accepted Answer

So just wondering if I needed to add 'Network Extension' or some other class possibly?

This API needs the Hotspot Configuration entitlement (com.apple.developer.networking.HotspotConfiguration). If you open the sample in Xcode you’ll see that reflected in both the .entitlements file and the Signing & Capabilities editor.

This entitlement does not need specific approval from Apple to use. Any (paid) developer account can use it. See the table in Developer Account Help > Supported capabilities (iOS).

It is, like all entitlements on iOS, restricted, that is, it must be authorised by a provisioning profile. See What exactly is a provisioning profile? for more background on that.

Share and Enjoy

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

Thank you, after several attempts at doing what you mentioned above, I noticed there was an update to Xcode from 13.2 to 13.3. After updating and completely removing all capabilities in Xcode and Developer portal on the App ID, and re-enabling them, the issue seems resolved. The Hotspot Configuration and Access Wi-Fi do not need a special entitlement, rather just the normal entitlement and added to the provisioning profile. Thanks

NEHotspotConfiguration
 
 
Q