After updating Xcode to version 4.2 I received the following warning in my current project:
warning: \'NSDate\' may not respond to \'initWithString:\'
You should use NSDateFormatter to get an NSDate object from a string. This will give you more flexibility with the format of the input string.
NSDateFormatter Reference
This method is in the documentation only noted at the Mac OSX page, not the iOS. Why Apple has different versions is unclear to me, but they luckily respond the same.
Because the class reference for iOS says there is no such method for iOS NSDate, you get the warning. Your code, however, will respond perfectly fine.
To silence the warning, you should indeed use NSDateFormatter.
Regards,
Jacco
Read the changes at this website http://developer.apple.com/library/ios/#releasenotes/General/iOS42APIDiffs/index.html Sometimes they change little syntax things and make newer and better ways of doing things.