• 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
NSURL problems on the Internet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURL problems on the Internet


  • Subject: NSURL problems on the Internet
  • From: Raff <email@hidden>
  • Date: Tue, 6 Aug 2002 22:40:08 +0200

Hi,

I want to load images from the Internet; I used the advised pattern :

nsUrl = [NSURL URLWithString:theUrl];
data = [nsUrl resourceDataUsingCache:YES];
if (data) {
[data writeToFile:[destFile stringByExpandingTildeInPath] atomically:YES];
} else {
// retry ?

The problem is, that the url manager seems to be weak : it regularly fail (as if the image did not exist), and if I retry, it doesn't event retry on the Internet, but keeps the preceeding result.
So it is impossible to get this image after that.

On the contrary, indicating the same URL on Internet Explorer make the image load.

is there an URL cache in the Cocoa framework ? where is the problem ?



By the way, if I want to download several images, is it advised to use a pool of thread, or is it sufficiently optimized in the framework ?
(Note that this increases the problem above, as if multiple network activity prevent from getting the Url to 'work' (small TTL ?).

Thanks for your help
R.D.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSURL problems on the Internet
      • From: Pierre-Olivier Latour <email@hidden>
  • Prev by Date: NSWindow setMiniwindowImage seems to do nothing
  • Next by Date: Re: UID <-> Login name <-> Full name
  • Previous by thread: Re: NSWindow setMiniwindowImage seems to do nothing
  • Next by thread: Re: NSURL problems on the Internet
  • Index(es):
    • Date
    • Thread