Hotspot does not work on the latest watchos 10.2

let hotspotConfig = NEHotspotConfiguration(ssid: "SSID", passphrase: "PASSWORD", isWEP: false)

hotspotConfig.hidden = true

let hotspotMgr = NEHotspotConfigurationManager.shared

hotspotMgr.apply(hotspotConfig) { error in



}

This works on the watchos before, but does not work on the latest watchos 10.2, if given incorrect password, the error returns .invalidWPAPassphrase, it's right. However, when given the correct password, the error returns .unknown and no wifi connect request alert shows on the watch.

The code works ok on the iPhone, but not works on the watchos.

Replies

https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_networking_hotspotconfiguration

Hotspot Configuration Entitlement

com.apple.developer.networking.HotspotConfiguration

has been removed from watchOS?

Or this is bug?

But here no watchOS included.