iPhone SDK设置静态IP [英] Iphone SDK set static IP
问题描述
有人知道如何以编程方式在iO中设置IP地址吗?手动进行操作非常容易,只需进行设置并配置网络即可.但是,我想在程序内部执行此操作,以连接到没有DHCP服务器的WiFi网络.任何指针都会有所帮助.
Does anyone know how to setup an IP address in iOs programmatically? It is really easy to do manually, just go to settings and configure the network. However, I want to do this inside a program, to connect to a WiFi network that do not have a DHCP server. Any pointers would help.
更新:这似乎不可能.关于我应该怎么做的任何建议?该应用程序需要连接到没有DHCP服务器的网络.
Update: This does not seem to be possible. Any suggestion on what I should do instead? The app needs to connect to a network that does not have a DHCP server.
推荐答案
我非常怀疑,如果不使用私有API,这是不可能的,否则,恶意应用可能会有效地破坏"用户的网络设置.
I very much suspect this isn't possible without the use of private APIs, as otherwise it would be possible for a malicious app to effectively "break" the user's network settings.
这篇关于iPhone SDK设置静态IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!