• 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: using NSURLConnection to download NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using NSURLConnection to download NSArray


  • Subject: Re: using NSURLConnection to download NSArray
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 9 Nov 2010 12:32:09 -0700

On Nov 9, 2010, at 12:26 PM, Stephen Blinkhorn wrote:

> I'm using a simple NSArray stored on a web server as part of a version tracking system.  First I download the array using arrayWithContentsOfURL: and check the version etc.  The problem with this approach is that if the server is down the method appears to hang indefinitely.
>
> So I thought I'd use NSURLConnection to download the array and set a timeout value.  Everything seems to be working but how can I turn the NSData* object(s) back into an NSArray that I can access as normal?

If the data is in property list format, then you turn it into an array using the NSPropertyListSerialization class. See its documentation for details.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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: using NSURLConnection to download NSArray
      • From: Stephen Blinkhorn <email@hidden>
References: 
 >using NSURLConnection to download NSArray (From: Stephen Blinkhorn <email@hidden>)

  • Prev by Date: Re: Apply animation curve to nswindow position?
  • Next by Date: Re: using NSURLConnection to download NSArray
  • Previous by thread: using NSURLConnection to download NSArray
  • Next by thread: Re: using NSURLConnection to download NSArray
  • Index(es):
    • Date
    • Thread