Re: asynchronous nsurlconnection in nsoperation
Re: asynchronous nsurlconnection in nsoperation
- Subject: Re: asynchronous nsurlconnection in nsoperation
- From: Ariel Feinerman <email@hidden>
- Date: Thu, 22 Mar 2012 12:41:34 +0300
Is this for iOS or Mac OS?
This for iOS
// dispatch_async(kBgQueue, ^{ NSData* data = [NSData
dataWithContentsOfURL: myUrl]; // THIS IS WHAT YOU WANT Ariel **
The date is very large their amount is 400 Mb so the asynchronous is
necessarily
one cannot be in memory at once
On Wed, Mar 21, 2012 at 10:36 PM, Sebastian Celis
<email@hidden>wrote:
> On Wed, Mar 21, 2012 at 10:59 AM, Ariel Feinerman <email@hidden>
> wrote:
> > I wish to insert an asynchronous NSURLConnection into non-concurrent
> > NSOperation
>
> Hi Ariel,
>
> MBRequest does this. It is done by forcing the operation's runloop to
> continue running while the network connection is in progress. I would
> recommend looking though the source code. Specifically, take a look at
> MBURLConnectionOperation.
>
> https://github.com/mobiata/MBRequest
>
> https://github.com/mobiata/MBRequest/blob/master/Classes/MBURLConnectionOperation.m
>
> - Sebastian
>
--
best regards
Ariel
_______________________________________________
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