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
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
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!)
Do you have the correct SDK configured? You might be liking against the newest version, but using old header files.
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.
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.