问题
During the application lifecycle, how can device be put into Access Point mode?
Like turning on the Personal Hotspot.
And is it possible to assign SSID to that network during runtime?
回答1:
There's no way to do the above with public API.
If you want to use private api there is a file located in the Preferences folder, along with the com.apple.SpringBoard.plist
:
/var/mobile/Library/Preferences/com.apple.MobileInternetSharing.plist
In that file, you will want to set 1023
for key State to enable the Tethering feature. To disable the feature, you will want to set 1022
for key State.
This action is only possible on a jailbroken device
来源:https://stackoverflow.com/questions/16964131/ios-programatically-setting-up-device-in-ap-mode