iPhone ABAddressBook -> NSDictionary 导致某些用户的应用程序崩溃

发布于 2024-10-14 06:48:37 字数 447 浏览 3 评论 0原文

我在应用程序商店中有一个相当成功的应用程序。然而,大约有 10 条评论指出,一旦通过 ABAddressBook 访问地址簿,该应用程序就会崩溃。

这让我抓狂,因为我没有收到来自苹果的崩溃报告,也无法重现这个问题。有一些用户通过我的电子邮件与我联系,但他们无法提供崩溃日志。

ABAddressBook 组件对于获取用户的名字、姓氏和号码并将其存储在 NSDictionary 中至关重要。我已经测试了多种排列(例如,如果没有号码、没有名字、没有姓氏等),并且在我的设备上一切正常。

我唯一怀疑的是,如果用户有一个非常大的地址簿,则应用程序内存不足,或者花费太长时间来处理将地址簿读取到 NSDictionary,但是我将其移至一个单独的线程以防止阻塞UI,但这仍然会导致某些用户的应用程序崩溃!

关于复制此问题的任何建议/也许将所有详细信息复制到 NSDictionary 不是最好的方法?

谢谢

I have an app on the app store that has been fairly successful. However around 10 reviews have been posted stating that the app crashes as soon as the addressbook is accessed via ABAddressBook.

This is driving me crazy as I've received no crash reports from Apple and am unable to replicate the issue. I've had a few users contact me through my email, but they are unable to provide crash logs.

The ABAddressBook component is essential taking the users First name, Last name and number and storing that in an NSDictionary. I've tested with multiple permutations (e.g. if there is no number, no first name, no last name etc) and all works fine on my device.

The only thing I suspect is that if the user has an extremely large addressbook the app is running out of memory or is taking too long to process the reading of the addressbook to NSDictionary, however I moved this to a separate thread to prevent blocking of the UI, but this still causes the app to crash for some users!

Any advice on replicating this issue / perhaps copying all details to an NSDictionary is not the best approach?

Thanks

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

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

发布评论

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

评论(1

入怼 2024-10-21 06:48:37

您认为这是内存问题的猜测是相当合理的。追求消除提取所有数据的需要,您的问题可能会消失。

Your guess that it is a memory issue is quite reasonable. Pursue eliminating the need to pull all data and you problem will likely go away.

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