iPhone ABAddressBook -> NSDictionary causing app to crash for some users
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 Fir开发者_如何学Cst 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
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.
精彩评论