+3  A: 

You can write a short interface extension early in you .m file to suppress these warnings

Example:

@interface NSDate (SuppressSomWarnings)
- (void)dateWithNaturalLanguageString:(NSString*)_str;
@end
epatel
+1  A: 

It's strange, I do not get any warning when I type the same two lines... Did you correctly import the headers and frameworks into your project?

I see that they are defined in NSCalendateDate.h, which is in Foundation.framework.

Failing that, you can try and include the interface definitions directly into your code, e.g., at the top of your .m file, to see if that gets rid of the warnings. (See epatel's answer that came while I was writing this!)

squelart
My Foundation.framework does not have that header file; only NSDate.h (which lacks these methods) and NSCalendar.h (which describes the NSCalendar class). To be clear, this is an iPhone project. I think the Cocoa headers define these methods just fine, but the UIKit headers do not.
Squeegy
Same for me: iPhone project. I'm using the latest SDK for iPhone 2.2.1. It's not normal that this header file is missing, maybe you should try and reinstall xcode...
squelart
it's seeming that way... Thanks for the sanity check.
Squeegy
A: 

Do you have the correct SDK configured? You might be liking against the newest version, but using old header files.

Robert Gould
Yep, my Foundation.framework is provided by the 2.2 SDK.
Squeegy
+3  A: 

I would very strongly advise you to not use these methods. Just because they are declared in Mac OS X's Foundation framework, does not stop them being private API on the iPhone. Apple would be well within their rights to discontinue your app from the store. Likewise, there's nothing to stop Apple tidying up Foundation a bit for an iPhone OS 2.2.2 or later release and removing those two methods, thereby breaking your app.

Mike Abdullah
A: 

Your code may work in the simulator but does it work on the phone?

The simulator uses the OS X Foundation framework which is a superset of what is available on the iPhone.

Hunter