I am using the Unique Identifier extension of UIDevice, since the old uniqueIdentifier has been deprecated. I’m pretty sure it worked a few days ago. Now, when it runs across the code [[UIDevice currentDevice] uniqueDeviceIdentifier], it comes back with a runtime error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDevice uniqueDeviceIdentifier]: unrecognized selector sent to instance 0x8370a90
I have imported the additions to UIDevice that it needs with #import "UIDevice+IdentifierAddition.h". I have also tried using other extended classes and it doesn’t work with those either. I tried running on both the simulator and an iPhone, both with the same result. However, when I used these additions in the sample project that it provided, it works.
Any ideas? Is it possible that I disabled subclassing cocoa classes somehow?
Are you sure your project contains the correct version of that imported file? Sometimes when you download code from somewhere else, and add it to the project, you don’t do the actual copy, and at some point your source code control gets confused and uses the wrong version.
Go to that file, NSString+MD5Additions.m in the project navigator, right click, Show in Finder. Then look at the contents of this and make sure it’s the right one.
Also, go to Project, build phases, compile sources, find the file, right mouse and Show in Finder. Make sure this is the same file as in your project and that it has the right methods declared.