简体   繁体   English

iPhone应用程序使用2G,3G,4G网络

[英]iPhone app using 2G, 3G, 4G network

i want to develop an application that is capable of using 2G 3G or 4G depending upon the availability of the network. 我想开发一个能够使用2G 3G或4G的应用程序,具体取决于网络的可用性。 Because this app will be used in different countries and there is a support of only 2G in some countries while some support 3G or 4G.. i am a little bit confused whether my app will automatically use the Fastest network available or i will have to explicitly code for each one. 因为这个应用程序将在不同的国家使用,并且在一些国家仅支持2G,而有些支持3G或4G ..我有点困惑我的应用程序是否将自动使用最快的网络或我必须明确每个代码。

According to Apple's documentation , WiFi is what is chosen first. 根据Apple的文档 ,WiFi是首先选择的。 If that fails, then it goes to the next available (and presumably fastest) cellular network data connection. 如果失败,则转到下一个可用(并且可能是最快的)蜂窝网络数据连接。

This is the kind of thing programmers do not have to worry about when designing apps for iOS. 这是怎样的东西程序员不必担心设计的应用程序适用于iOS的时候。

iOS will take care of whether wifi or 3G is used. iOS将负责使用wifi或3G。 You don't need to worry about that. 你不必担心这一点。

If you have operations in your app that use a lot of data you may want to restrict them to when the user is on WiFi (or at least warn them). 如果您的应用中有使用大量数据的操作,您可能希望在用户使用WiFi时限制它们(或者至少警告它们)。 The reachability example shows how to do this, among other things. 可达性示例显示了如何执行此操作等。 Worth looking into as apple have been known to reject apps that use excessive amounts of cellular data. 值得研究的是苹果已经知道拒绝使用过量细胞数据的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM