Jason Silberman
Jason Silberman

Reputation: 2491

NSKeyedUnarchiver unarchiveObjectWithData: not working

I've looked all over Stack Overflow and I cannot find an answer for this.

This is my code:

NSDictionary *dic = (NSDictionary *)[NSKeyedArchiver unarchiveObjectWithData:data];

When I call this, I'm getting this error:

No known class method for selector 'unarchiveObjectWithData:'

This is running on iOS, what is going on?

Thanks

Upvotes: 1

Views: 1717

Answers (1)

mjk
mjk

Reputation: 541

NSKeyedArchiver doesn't have an unarchiveObjectWithData method. You probably want to use NSKeyedUnarchiver.

Upvotes: 4

Related Questions