How to programmatically start 3g connection on iphone?

寵の児 提交于 2019-11-28 12:19:56

问题


how to programmatically start 3g connection on iphone?

do I need to use socket api?


回答1:


You don't need to. You just access whatever resource you need from the Internet, and the phone will handle connecting in a suitable manner. If you want to know whether there is a connection at all, and if so what kind is being used, there is an API and a sample from Apple. Also see Apples iPhone Network Access: Best Practices.




回答2:


The iPhone SDK abstracts out (in most cases) your connection type. You cannot choose to use wifi vs 3G vs EDGE vs Bluetooth. It might be possible if the device is jailbroken, but it's not in the SDK.

As far as I'm aware, the only time you can explicitly use a certain kind of connection is when using the GameKit framework and it forces you to use a Bluetooth connection.




回答3:


You can't programatically start a 3g connection.

You app should be aware of the network status whether it be EDGE, 3g or WiFi.



来源:https://stackoverflow.com/questions/2217945/how-to-programmatically-start-3g-connection-on-iphone

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!