Hello,
I am passing different types of data to NSData (NSString, NSArray, UIImage). I
am trying to find out what kind of data t is so I know how to handle the NSData
when I receive it. The below code is an example of how I am trying to do this
but its always returning null. What am I doing wrong?
NSString *somedata = [[NSString alloc] initWithString:@"Some string"];
NSData * set = [NSKeyedArchiver archivedDataWithRootObject:[somedata
dataUsingEncoding:NSASCIIStringEncoding]];
NSData * unset = [NSKeyedUnarchiver unarchiveObjectWithData:set];
NSLog(@"Class Type %@", [unset isKindOfClass:[NSKeyedUnarchiver
class]]);
[somedata release];
Thanks,
Phil
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]