greenisus / nsobject-nscoding Goto Github PK
View Code? Open in Web Editor NEWAutomatic NSCoding and persistence implementation
Automatic NSCoding and persistence implementation
Could you enable ARC support? I know this is pulled from another project, not sure if that's something you're willing to take on -- it 's something I'm not technically capable of myself yet, though.
For now I'm just using --fno-objc-arc, but it would make integration easier in the future for others.
Hi, greenisus. I very like your extension. But recently found a strange behavior. I tried to perform encoding operation with my class, where one of the field is NSInteger property:
@Property (nonatomic, assign) NSInteger userID;
I have noticed after encoding operation I got a wrong value in userID field. It contained 0 (in my case). I decided to deep into and found that actually I pass a correct number:12. Than - (void)autoEncodeWithCoder:(NSCoder *)coder is called.
This method gets Class properties and calls - (NSMutableDictionary *)propertiesForClass:(Class)klass {
Here I saw, that my NSInteger extracted via
NSString *pattrs = [NSString stringWithCString:property_getAttributes(property) encoding:NSUTF8StringEncoding];
and pattrs contains "Tq,N,V_userID"
I went to official documentation:https://developer.apple.com/library/mac/documentation/cocoa/conceptual/objcruntimeguide/articles/ocrtpropertyintrospection.html
And did not find specificator 'q'. Maybe apple has changed smith. But in your code you don't handle this 'q' case in your switch-case block in both methods:
you have case 'Q': // unsigned long long
but this 'q' do the same as case 'i': // int
when I added these cases, NSInteger encoding/decoding began work properly.
If properties are added or removed, the lacked of keyed archiving will cause this to not work as the archiving will happen out of order.
Hi,
I've update the Parse SDK to 1.12 Version just to make a migration to heroku but now i've found a lot of error by using your library but i wasn't able to find the relative log error....
Can you please help me to find a solution ?
Do you have any update of that library ?
Best Regards...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.