• 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: I've Got Those NSKeyedUnarchiver Blues!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I've Got Those NSKeyedUnarchiver Blues!


  • Subject: Re: I've Got Those NSKeyedUnarchiver Blues!
  • From: Stuart Rogers <email@hidden>
  • Date: Sun, 04 Dec 2011 22:32:37 +0000

A little earlier I wrote...

> The Trainer app is where things fall over.  It reads the file into
> an NSData object and tries to decode it with NSKeyedUnarchiver's
> -unarchiveWithData: but this results in:
>
> *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (SplitsTestSet)
>
> I really don't understand why this is happening.  I'm convinced it's
> not a problem with library linking, as these apps have no problem
> instantiating various objects sourced from the library.

And with that bold claim I immediately stand out to be the complete
idiot - it was a linking problem after all...

An article I found via Google suggested that if the library included
categories, then "-ObjC" should be added to "Other Linker Flags".

I'd ruled this out earlier because I didn't have any categories in my
library.  Except that I did, as class extensions (I had some properties
redefined internally as readwrite rather than the public readonly).

So that worked.

Which raises another question: if that fixed it in my misbehaving
app, why is my well-behaved app behaving well given that it
*doesn't* have that linker flag set?  Could it have anything to do
with the fact that the contents of the library were spawned off
from that app?  Consider these to be rhetorical questions - I'm
just happy that I've got over this hurdle and can now move on.

Stuart

_______________________________________________

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

  • Prev by Date: How to make WebKit play HTML5 video in a separate window?
  • Next by Date: Re: I've Got Those NSKeyedUnarchiver Blues!
  • Previous by thread: Re: I've Got Those NSKeyedUnarchiver Blues!
  • Next by thread: How to make WebKit play HTML5 video in a separate window?
  • Index(es):
    • Date
    • Thread