iOS 5 挂在 ASIHTTPRequests 上

发布于 2024-12-10 19:53:45 字数 439 浏览 0 评论 0原文

所以我有一个在 iOS 3.2 - 4.x 上运行的应用程序。它使用 ASIHTTPRequest 进行所有 REST API 调用。自从我和我的团队将三部 iPhone 4 升级到 iOS 5 后,该应用程序就会挂起并无限期地显示 ActivityIndi​​cator。我查看了服务器日志,发现请求没有到达服务器。

但是,如果我按下 iPhone 主页按钮,然后再次打开应用程序,请求将通过,我将收到数据,一切正常。由于某种原因,在我重新打开应用程序之前,这些请求永远不会被触发。

另一个奇怪的消息是,该应用程序可以在 Xcode 4.2 和 iPhone 模拟器中运行。该应用程序还可以在装有 iOS 5 的 iPad2 上运行(该应用程序仅适用于 iPhone)。

这是 ASIHTTPRequest 问题吗?不太确定如何查明问题,因为没有崩溃并且只发生在手机上。

任何见解将不胜感激!谢谢。

So I have an app that runs on iOS 3.2 - 4.x. It uses ASIHTTPRequest to make all the REST API calls. Ever since my team and I upgraded three of our iPhone 4's to iOS 5, The app will hang and show the ActivityIndicator indefinitely. I looked at the server logs and the requests aren't hitting the server.

However, if I press the iPhone home button then open the app again, the request will go through and I will receive the data, business as normal. For some reason the requests are never triggered until I reopen the app.

Another weird tidbit, the app works in Xcode 4.2 and the iPhone simulator. The app also works on an iPad2 with iOS 5 (the app is iPhone only).

Would this be an ASIHTTPRequest issue? Not too sure how to pinpoint the issue since there is no crash and only happens on the phone.

Any insight would be much appreciated! Thanks.

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

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

发布评论

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

评论(2

凶凌 2024-12-17 19:53:45

我是这方面的新手,所以这可能是一个幸运的猜测,但是当我禁用 ARC 并创建项目时,我的问题得到了解决。看看是否有帮助。

I am a novice at this so probably it was a lucky guess, but my problems were solved when I disabled the ARC and created the project. see if that can help.

川水往事 2024-12-17 19:53:45

当然,如果没有更多详细信息和代码示例,我无法确定,但是有关您的描述的一些事情表明至少有一种可能性可以重现该问题。事实上,这在模拟器中有效,并且在应用程序关闭并重新打开后有效,这让我认为您的应用程序可能会在您遇到这种情况之前的某个时刻收到内存警告。在由于该内存警告而发生的清理过程中,可能会卸载某些内容,而这些内容在您从主屏幕返回到应用程序之前无法正确重新初始化。您可以通过在 Xcode 4.2 模拟器中运行时模拟内存警告来测试这一点,但您可能需要准确找出内存警告发生的位置才能重现问题。

Of course I can't be certain without more details and a code sample, but a couple things about your description suggest one possibility for at least recreating the issue. The fact this works in the simulator and works after the app has been closed and reopened makes me think that your app may be receiving a memory warning at some point prior to when you experience this. During the cleanup that occurs as a result of that memory warning it is possible that something is getting unloaded which does not get properly reinitialized until you return to the app from the home screen. You can test this by simulating a memory warning while running in the Xcode 4.2 simulator, though you may need to figure out exactly where the memory warning occurs in order to duplicate the issue.

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