简体   繁体   English

仅生成更新模拟器二进制文件,而不生成iPhone二进制文件

[英]Build only updates Simulator binaries, not iPhone ones

I have some code that runs fine - all lines are executed as expected - on the iOS Simulator. 我在iOS模拟器上有一些运行良好的代码-所有行均按预期执行。 But when I switch to the iPhone, some of the code isn't even run! 但是当我切换到iPhone时,某些代码甚至无法运行! [Xcode 4.4.1] For example, here are two lines, the first was in the original source, of aa few days ago, the second just added today: [Xcode 4.4.1]例如,这是两行,第一行是几天前的原始来源,第二行是今天添加的:

NSLog(@"Original text"); NSLog(@“原始文本”);

NSLog(@"Newly added text"); NSLog(@“新添加的文本”);

The second line, added more recently, simply does not show in the debug output when the App runs on the iPhone, but it's there when it runs on the Simulator. 第二行是最近添加的,当应用程序在iPhone上运行时,它根本不会显示在调试输出中,但是在模拟器上运行时,它就位于调试输出中。

It looks like none of the changes I make get to the new version gets linked into the iPhone build. 我对新版本所做的更改似乎都没有链接到iPhone版本中。 It's as if the the object file that gets linked for the iPhone version is simply NOT update during a build, even though the source changed. 好像为iPhone版本链接的目标文件只是在构建期间不更新,即使源发生了变化。 I've done a Product->Clean, but it did not help... 我已经完成了“产品”->“清洁”,但没有帮助...

I'd be grateful for any help/suggestions, as I am quite perplexed. 我很困惑,感谢您的帮助/建议。

You are probably trying to debug code, which was compiled in release mode. 您可能正在尝试调试在发布模式下编译的代码。 So lots of info is optimized out. 因此,大量信息已被优化。 Set Debug in your scheme configuration. 在方案配置中设置“调试”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM