Re: Best way to read a file from HTTP URL
Re: Best way to read a file from HTTP URL
- Subject: Re: Best way to read a file from HTTP URL
- From: Julio Cesar Silva dos Santos <email@hidden>
- Date: Tue, 23 Jan 2007 10:52:36 -0200
I use an NSDictionary with all information and then load it:
NSURL * versionURL = [NSURL URLWithString:@"http://www.myserver.com/
myDict.plist"];
NSDictionary * versionDict = [NSDictionary
dictionaryWithContentsOfURL:versionURL];
if (versionDict != nil) {
//Do something
} else {
//Warn the user that the info is not available
}
On 23/01/2007, at 10:44, "" <email@hidden> <email@hidden>
wrote:
Hi,
I want to implement a version check function for my application. My
decision is to put a version.txt, including a version number, on my
web server, so that all clients can access it to check against
their own version number.
What is the more elegant way to read a file from a webserver? For
instance: http://www.myserver.com/version.txt
I read the documents about NSFileHandle, NSSocket, NSURL. I
searched for some examples without any success. I'm not sure, if I
really need the overhead to implement a webclient. Some other
languages (such as java) supports file reading from a url in only
1-2 lines.
Thanks,
Ferhat
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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