[MonoTouch] Problem with ABAddressBook on the Device

Jonathan Pryor jonpryor at vt.edu
Tue Nov 3 10:30:20 EST 2009


On Sat, 2009-10-31 at 10:26 +0100, Peter Stockli wrote:
> I wrote following code to read out all Phonenumbers in the Addressbook
> of the iPhone:
...
> This works in the simulator, but crashes on the Device.

Unfortunately, I'm unable to reproduce.

Is it possible that you have a large number of contacts & phone numbers
in your address book?  I only have 74 contacts, and most only have one
phone number.  It's plausible that with enough contacts & phone numbers
the resulting List<string> will contain enough entries that your process
runs out of memory...

You might consider writing each phone number you add to Console.Error
along with a count to see where you're dying (ye olde printf debugging).
Xcode's Organizer's Console tab will show you everything written to
stderr, providing some degree of feedback.

 - Jon




More information about the MonoTouch mailing list