How does Objective C on the iPhone compare to Objective C on the Mac and what version of objective C is the various iPhone versions?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
iPhone OS debuted shortly before Leopard, and it has been Objective-C 2.0 from the get-go. Aside from the lack of Garbage Collection on iPhone, the key difference is that the Objective-C runtime on iPhone is always Modern Runtime, as opposed to the Legacy Runtime for 32-bit Mac apps. (See this Apple doc.) One of the important results of this distinction is that instance variables are non-fragile (meaning that when you change the instance variables of a class, you don’t have to recompile its subclasses) and it can synthesize variables for properties.