• 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: How to upload dictionary to online URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to upload dictionary to online URL


  • Subject: Re: How to upload dictionary to online URL
  • From: Satoshi Matsumoto <email@hidden>
  • Date: Sat, 29 May 2004 14:05:13 +0900

Hi Keith,

on 04.5.29 1:14 PM, Keith Renz at email@hidden wrote:
> I would like to upload a very small dictionary (~1K) to an online URL
> (ftp or http). I can download just fine with NSURLConnection &
> NSURLDownload, but uploading is not so straight forward. What is the
> simplest way to do this?

If your dictionary contents is all property list objects (NSData, NSDate,
NSNumber, NSString, NSArray, or NSDictionary objects), you can use the
bellow NSDictionary method. If not, convert your contents to NSData and
then use the bellow method.

- (BOOL)writeToURL:(NSURL *)aURL atomically:(BOOL)flag

Writes a textual description of the contents of the receiver to aURL. If the
receiver’s contents are all property list objects (NSData, NSDate,
NSNumber, NSString, NSArray, or NSDictionary objects), the location written
by this method can be used to initialize a new dictionary with the class
method dictionaryWithContentsOfURL: or the instance method
initWithContentsOfURL:.

Hope that helps.

Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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.


References: 
 >How to upload dictionary to online URL (From: Keith Renz <email@hidden>)

  • Prev by Date: How to upload dictionary to online URL
  • Next by Date: Re: KVO and bindings question
  • Previous by thread: How to upload dictionary to online URL
  • Next by thread: Re: How to upload dictionary to online URL
  • Index(es):
    • Date
    • Thread