I'm developing an app with SDK 3.1.2 and it runs in the simulator, but when I try to deploy it in the device it arise de following error:
2010-06-17 17:40:39.592 MyApp[2143:207] *** -[__NSCFDate dateInformation]: unrecognized selector sent to instance 0x21e6a0
2010-06-17 17:40:39.608 MyApp[2143:207] *** Terminating app开发者_如何学C due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSCFDate dateInformation]:
Why this doesn't happen for the simulator?
There's no method in either Cocoa or Cocoa Touch called dateInformation
. So it sounds like you've got one of the following:
- A category on NSDate that provides
dateInformation
, but isn't being compiled into your device builds (Possible, but unlikely) - A method on some other object that's not an NSDate but does have a
dateInformation
method. However, if your other object gets deallocated, it's possible that the memory formerly occupied by the object could be recycled for use with an NSDate. (much more likely) You can debug this by running withNSZombieEnabled
set toYES
in your program environment (or use the Zombies instrument).
精彩评论