Constantly ignoring warnings

I have a project that compiles with some warnings. This is an iPhone project that uses some methods for NSDate, which apparently are not the headers of the iPhone SDK, but work flawlessly. When I call these methods, I get warnings like:

NSDate Warnings http://beautifulpixel.com/assets/NSDate_Warnings-20090215-235727.png

So, how do I silence warnings forever to tell Xcode "everything is okay."

Or how can I fix the warnings? This code works fine on the device, and Apple has already approved an application that uses the same methods, so I'm sure Xcode can understand that the methods really exist.

+5
source share
5 answers

You can write a short interface extension at the beginning of the .m file to suppress these warnings

Example:

@interface NSDate (SuppressSomWarnings)
- (void)dateWithNaturalLanguageString:(NSString*)_str;
@end
+3
source

I would very strongly advise you not to use these methods. Just because they are announced in the Mac OS X Foundation environment, this does not stop them from being a private API on the iPhone. Apple will, within its rights, terminate your application from the store. Similarly, there is nothing that could stop Apple from embellishing the Foundation a bit for iPhone OS 2.2.2 or later and removing these two methods, thereby disrupting your application.

+8
source

, , ... ?

, NSCalendateDate.h, Foundation.framework.

, , .m , , . (. Epatel , , !)

+2

SDK? , , .

0

, ?

OS X Foundation, , iPhone.

0

All Articles