error: synthesized property 'foobar' must either be named the same as a compatible ivar or must explicitly name an ivar

いま実機でないと重要な機能が試せないアプリを作っていて、それ以外の機能を作るのでシミュレータでいいかと思ってSDKを切り替えたらこういうエラーが出るようになった。

error: synthesized property 'foobar' must either be named the same as a compatible ivar or must explicitly name an ivar

要するに

@interface BazQuux {
}
@property (nonatomic, retain) FooBarType *foobar;

iPhone実機用のSDKだとビルドできるけど、シミュレータ用のSDKでは

@interface BazQuux {
    FooBarType *foobar;
}
@property (nonatomic, retain) FooBarType *foobar;

と書かなければ行けないということ。@synthesize foobar;の下でエラーメッセージがでるので当惑した。

error: synthesized property 'foobar' must either be named the same as a compatible ivar or must explicitly name an ivar

@synthesizeされるプロパティ'foobar'は、代入互換性のあるivarと同じ名前を付けられているか、または明示的にivarをつける必要がある。



なお、仕様上は一つ目のコードで動くはずで、これはシミュレータ用SDKのバグである、という主張が下のページに書いてあった。
iPhone Simulator: build errors when using synthesized instance variables - Stack Overflow