• 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: (NSURLDownload)The control never reaches downloadDidFinish: (readable code)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (NSURLDownload)The control never reaches downloadDidFinish: (readable code)


  • Subject: Re: (NSURLDownload)The control never reaches downloadDidFinish: (readable code)
  • From: deepak gopal <email@hidden>
  • Date: Fri, 28 Sep 2007 00:29:29 +0100 (BST)

The code should be more readable now. The question is
still the same, I checked through many examples and
didn't find a way to debug this.

What's wrong?

Thank you
DG

--- deepak gopal <email@hidden> wrote:

> Hi
>
> I am downloading a file from the server.
> Its a zip file and I need to uarchive it.
> I have the code in place (copied below) and I
> unarchive the file in downloadDidFinish:
> But the control doesn't seem to reach
> downloadDidFinish:
> There is no syntax error.
>
> What should I do?
>
> Thank you
> DG
>
> code:
> -----------------------------------------------
>  NSURLRequest *request;
>       request= [NSURLRequest requestWithURL:[NSURL
URLWithString:breakPath]
>
>
> cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:60.0];
>
>  NSURLDownload *download = [[NSURLDownload alloc]
> initWithRequest:request delegate:self];
>
>       [download autorelease];
>
>       // assigning the complete path to the
destination
>
>       NSString *destination =
>         [garage_
tringByAppendingString:kNewBreakPath];
>
>
>       if (download) {
>         // This will go and download
>         [download setDestination:destination
allowOverwrite:YES];
>
>       }
>
> ------------------------------
>
> - (void)downloadDidFinish:(NSURLDownload *)download
> {

>   NSString *presentDestination =
>     [garage_ stringByAppendingString:kNewBreakPath];
>
>   NSString *finalDestination =
>     [[garage_ stringByAppendingString:kNewBreakPath]
>       stringByAppendingPathExtension:[breakPath
pathExtension]];
>
>
>   NSFileManager *fileManager = [NSFileManager
defaultManager];
>
>   [fileManager movePath:presentDestination
toPath:finalDestination handler:nil];
>
>
>   // this will unarchive the zipped/dmg file
downloaded.
>
>   [self unarchiveDownloadedFile:finalDestination];
>
> }
>



      Bring your gang together - do your thing. Go to http://in.promos.yahoo.com/groups
_______________________________________________

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: 
 >(NSURLDownload)The control never reaches downloadDidFinish: (From: deepak gopal <email@hidden>)

  • Prev by Date: (NSURLDownload)The control never reaches downloadDidFinish:
  • Next by Date: Re: (NSURLDownload)The control never reaches downloadDidFinish:
  • Previous by thread: (NSURLDownload)The control never reaches downloadDidFinish:
  • Next by thread: Re: (NSURLDownload)The control never reaches downloadDidFinish:
  • Index(es):
    • Date
    • Thread