App Store代码运行与iPhone 3G上的Xcode / Device代码不同 [英] App Store code runs different from Xcode/Device code on iPhone 3G

查看:111
本文介绍了App Store代码运行与iPhone 3G上的Xcode / Device代码不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何解释这一个。我昨天向商店提交了我的一个应用的更新。 第一个屏幕截图是在运行iOS 4.2.1的iPhone 3G上运行的一个特定屏幕,从App Store下载:



下面的第二张图片是完全相同的代码,自从原始提交后,没有进行任何更改,运行在完全相同的设备上通过Xcode 。



应用程序运行正常在我的iPhone 4,运行iOS 5,从App Store下载。所以总结一下:


  1. 在iPhone 3G上从App Store获取的应用程序有缺陷

  2. 在iPhone 4上从App Store获取的应用程序良好

  3. 在iPhone 3G上通过Xcode绑定的应用程序 li>

这些不是唯一的图形不一致,但它们都与自定义的UITableViewCell代码相关,它不仅仅是push标签每个目录中有几个像素,并且从第一天开始工作正常。我已经提交了一份idp-dts报告,并等待他们的回复,但由于等待名单通常是一个星期或更多,我宁愿自己这样做。



任何帮助/提示/猜测都将非常感谢!



iPhone 3G运行应用程序的App Store版本:



>



iPhone 3G正在运行我应用程序的Xcode系留版本:





编辑:这听起来很相似对此问题:



编辑3:从Apple Radar回来,这是一个已知问题。将在未来版本的Xcode中修复。感谢所有的帮助家伙!


I'm not sure how to explain this one. I submitted an update of one of my apps to the store yesterday. The first screenshot is how one particular screen appears running on my iPhone 3G, running iOS 4.2.1, downloaded from the App Store:

And the second image below is the exact same code, no changes have been made since the original submission, running on the exact same device tethered through Xcode.

The application runs fine on my iPhone 4, running iOS 5, downloaded from the App Store. So to recap:

  1. App obtained from App Store is flawed on iPhone 3G
  2. App obtained from App Store is good on iPhone 4
  3. App tethered through Xcode is good on iPhone 3G

These are not the only graphical inconsistencies, but they're all related to custom UITableViewCell code, which doesn't do anything more than push labels a few pixels in each directory, and has been working fine since day one. I have filed a report with idp-dts, and am waiting to hear back from them, but as the waiting list is usually a week or more, I'd rather figure this out on my own.

Any help/tips/guesses would be very appreciated!

iPhone 3G running App Store version of my application:

iPhone 3G running Xcode tethered version of my application:

Edit: This sounds quite similar to this problem: Building with LLVM and any optimization causes app to crash on startup The customer who contacted me was using a 2nd generation iPod Touch, the only other hardware other than the iPhone 3G that uses armv6.

Edit 2: Here's the snippet of code that sets the bounds of the color bar on the left side. There doesn't seem to be anything fishy going on in the code:

- (void)layoutSubviews {
    CGRect colorViewFrame = self.bounds;
    colorViewFrame.size.width = 6;
    colorViewFrame.origin.y += 3;
    colorViewFrame.origin.x -= 1;
    colorViewFrame.size.height -= 8;

    colorView.frame = colorViewFrame;
    ...
}

解决方案

So here's what I found under Build Settings:

Which, having taken a class or two in compiler optimization, makes sense. Code debugging on a device should be left in its original state for debugging purposes, and code released should be optimized for speed and efficiency.

So here's the fun part. Changing my Debug setting to Fastest, Smallest:

Causes the issue to occur on my device while running tethered in Xcode.

Before filing a Radar or making any rash decisions and submitting non-optimized code to the App Store, is there anything else I should consider investigating? Was the compiler optimization really the underlying cause of the layout issues?

Edit: And if the optimization level is the issue, why does the optimized code run properly on my iPhone 4, but not properly on my iPhone 3G?

Edit 2: This problem sounds extremely similar to this answer: Building with LLVM and any optimization causes app to crash on startup

Edit 3: Heard back from Apple Radar, this is a known issue. Will be fixed in a future version of Xcode. Thanks for all the help guys!

这篇关于App Store代码运行与iPhone 3G上的Xcode / Device代码不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆