简体   繁体   English

我应该为我的iPhone应用程序使用哪种类型的“无网络连接”警告

[英]Which type of “No Network Connectivity” warning should I use for my iPhone App

The app i'm developing for the app store infrequently needs network connectivity. 我正在为应用程序商店开发的应用程序很少需要网络连接。 I've already implemented a way to handle/notify the user when there is no network connection, but that only happens when they've initiated the request (click a button to make a web service call). 我已经实现了一种在没有网络连接时处理/通知用户的方法,但这只有在他们发起请求时才会发生(单击按钮进行Web服务调用)。

My question is, Does apple require a continuous check for network connectivity, ie their reachability example, or will the method I have implemented (checking for network connectivity only when certain actions are triggered) be acceptable for app store submission? 我的问题是,苹果是否需要连续检查网络连接,即它们的可达性示例,或者我实施的方法(仅在触发某些操作时检查网络连接)是否可以接受应用商店提交?

Thanks in advance. 提前致谢。

Checking for connectivity only when it's needed is sufficient. 仅在需要时检查连接是否足够。 In fact, Apple discourages using Reachability as a "pre-flight" check. 事实上,Apple不鼓励使用Reachability作为“飞行前”检查。 They say to just handle failure gracefully, and then use Reachability if necessary to watch for connectivity to come back. 他们说只是优雅地处理故障,然后在必要时使用Reachability来监视连接回来。

It is acceptable for app store submission. 它适用于应用商店提交。 In fact, I'm sure AT&T and Apple would prefer it. 事实上,我确信AT&T和Apple会更喜欢它。

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

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