Inquiry Regarding NEHotspotNetwork fetchCurrent Method

I am reaching out regarding the usage of the fetchCurrent method within the NEHotspotNetwork framework. According to the documentation provided at [https://developer.apple.com/documentation/networkextension/nehotspotnetwork/3666511-fetchcurrent], it is mentioned that in order to utilize this method, the application needs to meet all four of the following conditions:

  •   The app is using the Core Location API and has the user’s authorization to access precise location.
    
  •   The app used the NEHotspotConfiguration API to configure the current Wi-Fi network.
    
  •   The app has active VPN configurations installed.
    
  •   The app has an active NEDNSSettingsManager configuration installed.
    

However, upon reviewing the comments in the code for the fetchCurrent method, it states: "This method returns SSID, BSSID, and security type of the current Wi-Fi network when the requesting application meets one of the following 4 requirements -." Could you please clarify whether it is necessary to fulfill all four conditions or if meeting just one of the four requirements is sufficient to use the fetchCurrent method?

The docs are wrong and the doc comments are right.

I’d appreciate you filing a bug against the docs. Please post your bug number, just for the record.

Share and Enjoy

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

Reopening the discussion here. According to the comments in code: "An application will receive nil if it fails to meet any of the above 4 requirements." (so we need all 4 requirements to get a non-nil value). According to the Apple documentation: "This method produces a non-nil NEHotspotNetwork object only when the requesting app meets at least one of the following criteria". Basically the same issue mentioned above, but reversed now. Which documentation is right?

Inquiry Regarding NEHotspotNetwork fetchCurrent Method
 
 
Q