Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Adding contact with phone and/or email set crashes simulator

I'm trying to write a little directory lookup app that allows you to save contacts you find to your Address Book. I am only working in the simulator for now, with SDK 1.0.

I am able to create a new entry in the Address Book and set the first and last name on it. However, when I try to add email OR phone information to the record, the save() method freezes for a moment and crashes the simulator (infinite loop, perhaps?).

var contact = Ti.Contacts.createContact();
contact.firstName = e.row.firstname;
contact.lastName = e.row.lastname;
contact.email = e.row.email;
contact.phone = e.row.phone;
contact.save();

I've dumped e.row.email and e.row.phone to make sure they were set properly; these are the formats I'm using:

e.row.email = 'username@domain.edu';
e.row.phone = '(512) 555-1212';

Note that setting either of these will cause the crash.

— asked March 22nd 2010 by Nick Wing
  • contacts
  • iphone
  • mobile
0 Comments

1 Answer

  • Accepted Answer

    Contacts API is not yet ready for prime time. It should be by the 1.2 release in a couple of weeks.

    — answered March 22nd 2010 by Jeff Haynie
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.