We have an Application that we use NSCoding to archive our object data into NSData. We then take the NSData and send it to an XML parser and send it up to a Cloud server for storage.
We have a Customer that wants to be able to alter, or Create their own Objects on the Cloud Server and have our App then read the NSData back again and see the contents of an Object.
The customer is Windows Based, so we'd need a way for them to programmatically be able to Generate the same data structure that is store as the NSData. I can Supply them with the Data Keys I'm decoding and the Type of Data.
Is there a way to reverse engineer the NSData object and inject, modify, etc it from something that is not Objective-C?
UPDATE: 2012.0413 Added code:
Here is the Code the I'm using to get the Data:
NSMutableData *data = [NSMutableData data];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
//go and encode ourselves so we can save our state in CD.
[self encodeWithCoder:archiver];
Here is the encodwWithCoder routine:
-(void) encodeWithCoder:(NSCoder *)encoder {
//See if mama has anything for us...
[super encodeWithCoder:encoder];
//encode our state
[encoder encodeObject:[self elementName] forKey:@"name" ];
[encoder encodeObject:[self elementViewContents] forKey:@"elementViewContents" ];
[encoder encodeObject:[self elementGestureRecognizerView] forKey:@"elementGestureRecognizerView" ];
[encoder encodeCGRect:self.frame forKey:@"frame"];
[encoder encodeCGRect:self.bounds forKey:@"bounds"];
[encoder encodeCGPoint:self.center forKey:@"center"];
[encoder encodeBool:elementLocked forKey:@"elementLocked"];
}
Thanks!