Xcode 中的应用程序运行良好,但 App Store 版本在加载时冻结

发布于 2024-10-08 17:18:10 字数 398 浏览 4 评论 0原文

有人听说过这个吗?我很困惑,谷歌也很困惑。

在装有 iOS 4.1 的 iPhone 4 上进行调试时,我的应用程序显示启动画面,然后在加载并获取 GPS 位置时显示动画,最后转到主菜单。当我从 App Store 下载它时,它永远不会停止加载。更奇怪的是,如果我隐藏永久加载应用程序然后恢复它,加载动画就会冻结并且应用程序不再响应!

我一直在尝试对出了什么问题进行各种猜测,但没有任何效果。我怎样才能获得有关此故障的有用信息?

编辑:应用程序还在装有 iOS 4.0 和 iOS 4.2.1 的 iPhone 3 以及装有 iOS 4.0.2 和 4.2.1 的 iPhone 4 上进行了测试。

编辑编辑:如果我不从应用程序商店下载它,则不会出现该问题。这使得调试变得极其困难,但希望比我更有经验的人能够缩小范围。

Has anyone ever heard of this? I'm baffled, and so is Google.

When debugging on iPhone 4 with iOS 4.1, my app shows the splash screen, then shows an animation while it loads and gets the GPS location, and finally goes to the main menu. When I download it from the App Store, it never stops loading. More strange than that, if I hide the forever-loading-app and then restore it, the load animation freezes and the app no longer responds!

I've been trying to make all kinds of guesses about what's going wrong, but nothing is working. How can I get useful information about this failure?

EDIT: App has also been tested on iPhone 3 with iOS 4.0 and iOS 4.2.1, and iPhone 4 with iOS 4.0.2 and 4.2.1.

EDIT EDIT: The problem does not occur if I do not download it from the app store. This makes it extremely difficult to debug, but hopefully narrows it down for somebody out there with more experience than I have.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一萌ing 2024-10-15 17:18:10

首先,听起来您已经在一台设备上测试了您的应用程序。
应用程序至少应该在少数设备上进行测试,以便您可以在多种情况下调试和了解内部流程。

但如果您无法获得其他设备,请尝试消除。手段 - 尝试将不必要的代码置于注释中,并仅加载必要的代码。
一步一步你就可以理解这个bug了。

在我看来,这像是服务器问题(您是否向服务器发送任何请求?),或者也许 GPS 无法停止搜索..?

First, it sounds like you've tested your app on one device.
Apps should be tested on few devices at least, so you can debug and understand inside flows on several cases.

But if you can't get another device, try elimination. means - try to put unnecessary code under remark, and load only the necessary code.
step-by-step you can understand the bug.

It sounds to me like server issue (are you sending any request to a server?), or maybe the gps can't stop searching..?

蓝天 2024-10-15 17:18:10

我同意税务员的观点。

首先,确保您在具有不同 iOS 的不同设备上进行了测试。

其次,确保您的应用程序是否必须连接到服务器,这些服务器是否按照您预期的方式响应。

第三,根据我的经验,请确保您使用Ad Hoc .mobileprovision 文件而不是Development .mobileprovision 文件测试您的应用程序。编译时 Xcode 会以不同的方式对待二进制文件。

I agree with Taxman.

First, make sure you tested on different devices with different iOS.

Second, make sure if your app has to connect to servers, those servers are responding in the way you expected.

Third, based on my experience, make sure you tested you app using the Ad Hoc .mobileprovision file other than the Development .mobileprovision file. Xcode will treat binaries differently when compiling.

苦笑流年记忆 2024-10-15 17:18:10

看来问题的根源是iOS 4.1中的一个bug:
https://devforums.apple.com/community/iphone/integration/location

无法获取位置信息
在 iOS 4.1 上

Michael Jurewitz 于 10 月 5 日,
2010 下午 1:51

iOS 4.1 中有一个已知问题
可能无法调用 Core Location 的地方
如果应用程序已被删除,则成功
从设备并重新安装。
设置中的定位服务也可能
错误地显示该应用程序有
访问位置信息。这
该问题已在 iOS 4.2 beta 2 中得到解决。

要解决此问题,请在“设置”>“重置位置警告”下选择“重置位置警告”。一般>重置。

一如既往,确保您的核心位置委托正确
处理从返回的任何错误
-locationManager:didFailWithError: 和 -locationManager:monitoringDidFailForRegion:withError:。

根据上述信息进行的测试证实,重置位置警告可以解决该问题,从而允许未来的运行超越加载屏幕。从应用程序商店重新安装应用程序会导致问题再次出现。这可以重复和循环测试,并获得一致的结果。

对于那些提出建议的人,非常感谢您付出的时间和精力!

It seems that the origin of the problem is a bug in iOS 4.1:
https://devforums.apple.com/community/iphone/integration/location

Unable to Obtain Location Information
on iOS 4.1

Michael Jurewitz at Oct 5,
2010 1:51 PM

There is a known issue in iOS 4.1
where calls to Core Location may not
succeed if the app has been removed
from a device and reinstalled.
Location Services in Settings may also
incorrectly show that the app has
access to location information. This
issue is addressed in iOS 4.2 beta 2.

To work around this issue, select Reset Location Warnings under Settings > General > Reset.

As always, ensure your Core Location delegate properly
handles any errors returned from
-locationManager:didFailWithError: and -locationManager:monitoringDidFailForRegion:withError:.

Testing based on the above information confirms that resetting location warnings resolves the issue, allowing future runs to progress beyond the loading screen. Reinstalling the app from the app store then causes the issue to occur again. This can be tested repeatedly and cyclicly with consistent results.

To those who responded with suggestions, thank you very much for your time and effort!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文