I know that since iOS 4.0 it's not necessary to explicitly declare ivars. I just use @synthesize myVar = _myVar; This suits me fine since it's less typing, although I don't really know why or which setting this comes from. I was trying to do the same in my Mac app. It worked while building in debug mode, however, once I switched to making an archive, the compiler started complaining. Is there a way to suppress this?

有帮助吗?

解决方案

Synthesizing ivars only works for 64-bit applications, since it requires new runtime features only found in the "new" runtime (and in the iOS one). It is likely that you're compiling your debug version for your system (which will be 64 bit), yet creating a universal 32/64 bit binary for the archive target. The solution would be to change the release config to 64-bit-only.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top