Issue in adding the contacts in iOS -


i building app using titanium appcelerator in creating contacts. strange thing , contact created in simulator. when try same code in iphone doesn't cant understand reason . using following code :

var addressbookdisallowed1 = function(){             alert('not allowed');         };         if (ti.contacts.contactsauthorization == ti.contacts.authorization_authorized){             performaddressbookfunction1();         } else if (ti.contacts.contactsauthorization == ti.contacts.authorization_unknown){             ti.contacts.requestauthorization(function(e){                 if (e.success) {                     performaddressbookfunction1();                 } else {                     addressbookdisallowed1();                 }             });             } else {                 addressbookdisallowed1();         }         function performaddressbookfunction1(){             var contact = titanium.contacts.createperson();             contact.firstname = cat_name;             contact.organization = cat_organization;             contact.kind = titanium.contacts.contacts_kind_organization;             var address = {};             address.street = cat_addr;             address.city = cat_city;             address.state = cat_state;             address.zip = cat_zip;              contact.address = {"work":[address]};                contact.email = {"work": [cat_email]};             contact.phone  = {"work": [cat_phone]};              titanium.contacts.save();          } 

i have added permissions . can see in code. ios version 6.1.3 hope me. in advance


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -