Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道从 iOS 4.0 开始没有必要明确声明 ivars。我只是使用@synthesize myVar = _myVar;这很适合我,因为它打字少,虽然我真的不知道为什么或来自哪个设置。我试图在我的 Mac 应用程序中做同样的事情。它在调试模式下构建时工作,但是,一旦我切换到制作存档,编译器就开始抱怨。有没有办法抑制这种情况?
@synthesize myVar = _myVar;
合成 ivars 仅适用于 64 位应用程序,因为它需要仅在“新”运行时(和 iOS 运行时)中才能找到的新运行时功能。您可能正在为您的系统编译调试版本(将是 64 位),但为存档目标创建了一个通用的 32/64 位二进制文件。解决方案是将发布配置更改为仅 64 位。