• 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
NSKeyedUnarchiver questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSKeyedUnarchiver questions


  • Subject: NSKeyedUnarchiver questions
  • From: Scott Frankel <email@hidden>
  • Date: Tue, 9 May 2006 20:51:55 -0700


I'm attempting to unarchive data my app has written to disk, but so far have not had any luck. It dies leaving a signal 10 error.


The following snippet:

NSMutableArray *newArray;
newArray = [NSKeyedUnarchiver unarchiveObjectWithFile:@"/absolute/ path/to/theFile.plist"];


yields newArray with zero content member items, as shown in the debugger. Zilch.

Using NSFileManager methods, I confirm what an `ls -l` in the terminal shows, that the file both exists and is readable. Using `cat` in the terminal shows that the file contains what I believe is valid data. (I archive it as human-readable ASCII characters using [archiver setOutputFormat:NSPropertyListXMLFormat_v1_0];)

Any suggestions on how to debug this or docs that might point me in the right direction would be greatly appreciated! I've already read:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSKeyedUnarchiver_index.html#//apple_ref/doc/uid/ 20000838.


Also, in reading the doc (above), I note 2 methods: unarchiveObjectWithData and unarchiveObjectWithFile. What does it mean to encode an object graph "in data," rather than "to a file?" How would that data appear on disk? Does the former use the file selected with the Save browser, where the latter uses hard-coded paths? (A wild guess.) My document-based app attemps to make use of
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType.



Thanks in advance! Scott



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSKeyedUnarchiver questions
      • From: Scott Frankel <email@hidden>
    • Re: NSKeyedUnarchiver questions
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: shared instance and nstableview
  • Next by Date: Re: iClass example, core data and multiple stores
  • Previous by thread: Re: iClass example, core data and multiple stores
  • Next by thread: Re: NSKeyedUnarchiver questions
  • Index(es):
    • Date
    • Thread