I made a custom Static Library that I use in an iOS project. When I use an NSKeyedUnarchiver to unarchive data. It throws an exception when I try to use it in the library. I tried copying the classes of my static library into my project to see if that would work and that resolves the issue, but obviously defeats the purpose of a static library. I also tried several combinations of release/debug and simulator/device and still does not work.
Is the NSKeyedUnarchiver having trouble finding the classes it needs to unarchive?
EDIT
I tracked down the exception thrown and it says it is can’t unarchive the class JGObjectRep which is one of the other classes in the static library. Keep in mind this works just fine if I copy these into the project.
Try adding these options to your Linker Flags:
-ObjC
-all_load