Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permanently ignoring warnings

I have a project that compiles with some warnings. It's an iPhone project that uses some methods on NSDate, that are seemingly not the headers of the iPhone SDK, but work flawlessly none the less. 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 the warnings permanently, in order to tell XCode "it's OK, really."

Or how do I correct the warnings? This code works great on the device and Apple has already approved an app that uses these same methods, so surely I can get XCode to understand that the methods really are there.

like image 990
Alex Wayne Avatar asked Feb 16 '09 08:02

Alex Wayne


1 Answers

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.

like image 126
Mike Abdullah Avatar answered Sep 28 '22 15:09

Mike Abdullah