Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 287323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:42:55+00:00 2026-05-12T05:42:55+00:00

There are two runtimes for Cocoa/Objective-C: the legacy runtime and the modern runtime (that’s

  • 0

There are two runtimes for Cocoa/Objective-C: the legacy runtime and the “modern” runtime (that’s what Apple calls it).

According to Apple’s documentation, “iPhone applications and 64-bit programs on Mac OS X v10.5 and later use the modern version of the runtime“.

So far so good.

Now, the “modern” runtime supports a feature called “synthesized instance variables”, which means that you don’t have to define an instance variable for every declared property. The instance variable will be added automatically. Quote from the iPhone Reference Library: “For the modern runtimes, instance variables are synthesized as needed. If an instance variable of the same name already exists, it is used.“

If you use this feature in your iPhone app, it builds and runs fine on the iPhone (physical) device, but when you change the target to “iPhone Simulator”, you get build errors:

synthesized property ‘x’ must either be named the same as a compatible ivar or must explicitly name an ivar

What’s going on here? Isn’t the iPhone simulator a real iPhone simulator? Does this mean that the simulator uses a different runtime than the physical iPhone?

How can I use this feature on the iPhone simulator?

EDIT:

The code which doesn’t compile when targeting the iPhone Simulator is:

@interface MyClass : NSObject {
}

@property NSString *prop1;

@end

According to the documentation, this should work fine on the “modern” runtime, and indeed it does on the iPhone device, but it doesn’t compile when changing the target to iPhone Simulator.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:42:55+00:00Added an answer on May 12, 2026 at 5:42 am

    The iPhone Simulator in current SDKs (3.0) use the host’s runtime, which does not support synthesized ivars in 32-bit mode. You’ll have to @synthesize your ivars until the Simulator is fixed. (It’d be good to file a bug with Apple requesting this enhancement.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've heard now from several sources (stackoverflow.com, cocoa-dev, the documentation, blogs, etc) that it
We're using Eclipse 3.4.1 with SpringSource dm Server 1.0. There are two Targeted Runtimes
There are two weird operators in C#: the true operator the false operator If
There are two popular closure styles in javascript. The first I call anonymous constructor
There are two popular naming conventions: vc90/win64/debug/foo.dll foo-vc90-win64-debug.dll Please discuss the problems/benefits associated with
There are two scenarios I need to clarify: An executable compiled with .NET 3.5
There are two databases in SQL Server 2005: One called A and another one
There are two schools of thought on how to best extend, enhance, and reuse
There is two available Eclipse plugins for Maven : Eclipse IAM (old name is
There are two different ways to create an empty object in JavaScript: var objectA

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.