View Full Version : Weird issue in XCode-method prototypes showing up but aren't anywhere in the code

Aug 1, 2011, 09:13 PM
I'm pretty new to Objective-C but not new to software development. I've been playing around with something lately and have run across a really strange issue. Basically, I needed to create a new method, let's call it "doSomething:(Int)x". I had not yet created the prototype in the header file, but I went to add a call to it in the .m file first. What happened when I started typing [class doSomething:x] was the intellisense (or whatever it's called in XCode) started showing an existing method for "doSomething" with a different parameter type. However, this does not exist ANYWHERE in the code. I have searched through the entire solution, and it is no there. I did a clean, still happening. Even when I created a new prototype and method definition I could not call it because the code expected the other one.

I'm sure I'm being stupid about something, but short of recreating the entire project, does anyone have any clue as to what might be going on? Like I said, it does not exist in any files in my project, and it is not something that exists as a built-in Objective-C method (it's named something very specific and just to be safe I searched and it's not built-in). Thanks!

Aug 1, 2011, 09:23 PM
Post exactly what the doSomething method's name really is.

It could be that auto-completion is finding a similar method belonging to another class. That class could be in any framework. It may even conceivably be a private framework, or a private class or extension. It need not be something defined in one of your classes, nor in a public API.

You might also describe exactly how you searched for it, and then decided it wasn't built-in.

Oh, and the Xcode version might also be good to know.

Aug 1, 2011, 09:41 PM
I googled the method and searched Objective-C documentation and found nothing. I'd prefer not to give more information as it would be easy to figure out what I'm working on, and at this time I'd rather not share that.

Thank you anyway for your assistance. Sorry to be a bother.