• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: An API for Airplane mode on iOS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An API for Airplane mode on iOS?


  • Subject: Re: An API for Airplane mode on iOS?
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 09 Feb 2016 12:37:39 -0800

> On Feb 9, 2016, at 10:38 AM, Alex Zavatone <email@hidden> wrote:
>
> Simply put, if we can detect that this user is has turned off Airplane mode, we can respond in a more cautious manner.

But you can run into the same behaviors if the user has turned WiFi and/or cellular off and then back on. The Airplane Mode switch is just a ‘macro’ that turns WiFi, cellular and Bluetooth off (or back on) at once. You can also get race conditions if the device has been away from WiFi and then comes in range of a network that takes a little while to negotiate. (Usually if you’re listening for reachability of a specific host, you won’t hit these in-between states, though.)

The way we deal with this is to retry HTTP requests, if they fail with some common transient IP-level errors like ‘no route to host’ or ‘connection reset by peer’. The retry delay doubles after each failure, and most types of requests give up after 3 failures, so the delays are like 1, 2, 4 seconds.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: An API for Airplane mode on iOS?
      • From: Alex Zavatone <email@hidden>
References: 
 >An API for Airplane mode on iOS? (From: Alex Zavatone <email@hidden>)
 >Re: An API for Airplane mode on iOS? (From: Jens Alfke <email@hidden>)
 >Re: An API for Airplane mode on iOS? (From: Alex Zavatone <email@hidden>)
 >Re: An API for Airplane mode on iOS? (From: Jens Alfke <email@hidden>)
 >Re: An API for Airplane mode on iOS? (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: An API for Airplane mode on iOS?
  • Next by Date: PSA: Does your app use Sparkle? Update it, or use an HTTPS server
  • Previous by thread: Re: An API for Airplane mode on iOS?
  • Next by thread: Re: An API for Airplane mode on iOS?
  • Index(es):
    • Date
    • Thread