Error message

I get an error when typing in the first line of code from this chapter.

[code]#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
@autoreleasepool {

    NSData *now = [NSData date]; //this is the line for the error
    NSLog(@"This NSDate object lives at %p", now);
return 0;


Error states "No known class method for selector date"
I have no idea why? It;s straight from the book.

Just figured out what I did. had NSData not NSDate.