Skip to content

Instantly share code, notes, and snippets.

@ethanhuang13
Created August 8, 2019 09:18
Show Gist options
  • Save ethanhuang13/8db697f8254f6f5dffe6d194e5078062 to your computer and use it in GitHub Desktop.
Save ethanhuang13/8db697f8254f6f5dffe6d194e5078062 to your computer and use it in GitHub Desktop.
Important Updates to CNCopyCurrentnetworkInfo API in iOS 13

Dear $firstName,

As we announced at WWDC19, we're making changes to further protect user privacy and prevent unauthorized location tracking. Starting with iOS 13, the CNCopyCurrentNetworkInfo API will no longer return valid Wi-Fi SSID and BSSID information. Instead, the information returned by default will be:

SSID: “Wi-Fi” or “WLAN” (“WLAN" will be returned for the China SKU) BSSID: "00:00:00:00:00:00"

If your app is using this API, we encourage you to adopt alternative approaches that don’t require Wi-Fi or network information. Valid SSID and BSSID information from CNCopyCurrentNetworkInfo will still be provided to VPN apps, apps that have used NEHotspotConfiguration to configure the current Wi-Fi network, and apps that have obtained permission to access user location through Location Services.

Test your app on the latest iOS 13 beta to make sure it works properly. If your app requires valid Wi-Fi SSID and BSSID information to function, you can do the following: For accessory setup apps, use the NEHotSpotConfiguration API, which now has the option to pass a prefix of the SSID hotspot your app expects to connect to. For other types of apps, use the CoreLocation API to request the user’s consent to access location information.

Learn more by reading the updated documentation or viewing the the Advances in Networking session video from WWDC19. You can also submit a TSI for code-level support.

Best regards, Apple Developer Relations

TM and © 2019 Apple Inc. One Apple Park Way, MS 301-1TEV, Cupertino, CA 95014.

All Rights Reserved | Privacy Policy | Account

@ethanhuang13
Copy link
Author

Mail sent from [email protected] in 2019/08/07.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment