I am looking for a way to enable personal Hotspot programatically in iOS using Swift or Objective-C but did not see any API or way to achieve that.
My question is that even possible to do that?
Does Apple allow that?
Also as per Apple Developer Documentation HotSpot Helper what are the controls we can achieve that ??
Hotspot Communication
Hotspot helpers can use these APIs to communicate with the hotspot even when Wi-Fi is not the default route.
func bind(to: NEHotspotHelperCommand)
Binds a URL request to the network interface associated with the hotspot helper command instance.
In-Provider Networking
Network APIs for use by all types of NetworkExtension providers and by hotspot helpers.
This is not possible. From Apple's Forums:
If iOS did allow this, this would be a privacy and security risk. There is no private API to do this either. However, as Pushkraj Lanjekar said,
There is no way to programatically control personal hotspot on an iOS device. This Apple Forums link may be helpful, however; https://developer.apple.com/forums/thread/113933.