skip to Main Content

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 Wi-Fi 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 just 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 Wi-Fi 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 Wi-Fi from the app. Half of the comments here say conflicting thing.

This article mentions the Capability
‘Network Extension’ but not sure if needed? NEHotspotConfiguration is not working in ios 11

I am only using this auto-connect feature so users do not have to go to settings to connect to a specific wifi to retrieve information and then bounce to settings again to disconnect in order to submit the information if that makes sense, just a smoother process.

Thank you!

2

Answers


  1. Chosen as BEST ANSWER

    After several responses from here, completely removing all Capabilities and manually adding them back in, and updating to the latest Xcode (13.3 from 13.2) the issue seems to be resolved. Accessing Wi-Fi and Hotspot Configuration do not need a special Entitlement requested from Apple, just a generic one directly in the app. Thank you!


  2. We need to enable capabilities for our application bundle ID,
    and then we need to add this under Signing and Capabilities.

    Reference Image

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search