• 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: iOS app launching speed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS app launching speed


  • Subject: Re: iOS app launching speed
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 15 May 2012 10:44:54 -0700

On May 15, 2012, at 9:48 AM, Alex Zavatone wrote:

> I didn't want to display the main screen (TVC), until the main data had loaded (a 4 KB data set) and serialized.
> I'm wondering if with a larger data set, the approach should be to have the first scene use the same graphic as the launch screen, fire off an async http load (through GDC or which preferred method?),

NSURLConnection. Use the async API (with delegate).

> display a little spinner if the delay takes longer then 1.25 seconds,

Why not cache the data from the previous run and load that from local storage at launch? It’ll be super fast. Then at the same time you also fire off an async HTTP request, and when that response comes back you can update the UI if it has different data. (As an optimization, make it a conditional GET by adding an If-None-Match: or If-Modified-Since: header so the server only has to send you the data if it’s changed from what you’ve already got.)

This way you also get offline support — the app will work properly if there’s no network, instead of just spinning forever.

Native apps are different from web apps, and one big benefit is that they don’t need to be hamstrung by network performance. So it’s important to make them work well with slow or no network; otherwise you might as well just write a web app.

—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


References: 
 >Re: iOS app launching speed (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: iOS app launching speed
  • Next by Date: Re: iOS app launching speed
  • Previous by thread: Re: iOS app launching speed
  • Next by thread: Re: iOS app launching speed
  • Index(es):
    • Date
    • Thread