I have NSMutableArray and a NSString. How to archive these two in to a NSData by using NSKeyedArchiver in IOS6, Xcode4.6

有帮助吗?

解决方案

Try this

// Convert it  to NSdata

    NSData *messageData1 = [NSKeyedArchiver archivedDataWithRootObject:message];
    NSData *messageData2 = [NSKeyedArchiver archivedDataWithRootObject:arr];  
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top