Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I just realized I sent my client her app way too soon. I forgot that the simulator threw a SIGABRT error. Luckily, I just sent her another e-mail letting her know that her version would crash. I don't know if she's opened it yet - she hasn't let me know.

The error dialog seems to suggest that the error was caused by the line of code mentioned in the title of this thread. This is strange, because the app passed the build phase with 4 warnings and no errors. The warnings are irrelevant to the issue.

I have the base SDK set to 6.0, so no issues there.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,750
8,422
A sea of green
Look up the UIAppearance protocol reference. The appearance method has a return type of id. The compiler doesn't check that an id type has a method for the message. If the type is a defined class, then the compiler does check.

You should think of id as the type "any object". Since no class has been declared for it, the compiler has no expectation that the object can respond to any message. Therefore, the compiler can perform no compile-time check that the object can respond to a message, and there can be no warning that the object may not respond to the message.

If the object is given a class name (i.e. a type), then the compiler does know what class the object is expected to be, and thus what message(s) it should respond to. This means the compiler can give warnings about "may not respond to".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.