Reputation: 3850
I used the following code and it throws an error [NSKeyedArchiver init]: cannot use -init for initialization
Code:-
NSKeyedArchiver *a=[[NSKeyedArchiver alloc] init];
Upvotes: 0
Views: 204
Reputation: 104082
That's because the NSKeyedArchiver class doesn't have "plain vanilla" init method. you have to use initForWritingWithMutableData:
Upvotes: 2