iOS以编程方式在AP模式下设置设备 [英] iOS programatically setting up device in AP mode

查看:204
本文介绍了iOS以编程方式在AP模式下设置设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用程序生命周期中,如何将设备置于访问点模式?

During the application lifecycle, how can device be put into Access Point mode?

就像打开个人热点一样.

Like turning on the Personal Hotspot.

是否可以在运行时将SSID分配给该网络?

And is it possible to assign SSID to that network during runtime?

推荐答案

无法使用公共API进行上述操作.

There's no way to do the above with public API.

如果要使用私有api,则首选项"文件夹中将包含一个文件,以及com.apple.SpringBoard.plist:

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 在该文件中,您将需要为键状态设置1023以启用网络共享功能.要禁用此功能,您需要将键状态设置为1022.

/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

这篇关于iOS以编程方式在AP模式下设置设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆