• 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: Marco S Hyman <email@hidden>
  • Date: Tue, 15 May 2012 15:33:34 -0700

On May 15, 2012, at 2:50 PM, Jens Alfke wrote:

> Async NSURLRequest, as already mentioned. It’s a little bit clunky to use by modern standards — I wish they’d add some nice block-based callbacks to it instead of making me implement yet another delegate class — but it works well, and it’s quite well documented by Apple and others.

I'd disagree regarding the "quite well documented by Apple" part.
Don't know about documentation by others.

Apple's doc has this bit of example code.

----------------
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
    // Create the NSMutableData to hold the received data.
    // receivedData is an instance variable declared elsewhere.
    receivedData = [[NSMutableData data] retain];
} else {
    // Inform the user that the connection failed.
}
----------------

Is it possible for one of the delegate methods to be called before
receiveData is initialized?  The doc for initWithRequest:delegate: states

  This is equivalent to calling initWithRequest:delegate:startImmediately:
  and passing YES for startImmediately.

Sure looks like a possible race to me.  That disqualifies it as good
documentation.

Marc
_______________________________________________

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: iOS app launching speed
      • From: Jens Alfke <email@hidden>
References: 
 >Re: iOS app launching speed (From: Alex Zavatone <email@hidden>)
 >Re: iOS app launching speed (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: iOS app launching speed
  • Next by Date: Re: Nested XML -> CoreData
  • Previous by thread: Re: iOS app launching speed
  • Next by thread: Re: iOS app launching speed
  • Index(es):
    • Date
    • Thread