how to check that contact is already added to iphone phonebook or not? -


I want to check the iphone phonebook whether a contact has already been added or not, if I added I will not be able to add it, it is not added, then I will add new contact, I want to compare only one name like "Veer" is present in the Phonebook or not

< Div class = "post -text" itemprop = "text">

  ABAddressBookRef address book = abderracebook creation Health Option (zero, zero); NSArray * People = (__breeze NSARRA *) ABAdressbookPierAreOf All People (address book); NSMutableArray * Nameserray = [[NSMUTABELARROR] INIT]; (People in person ID) {NSString * firstNameString = (__breeze NSString *) ABRecordCopyValue ((__ bridge ABRecordRef) (person), kabpersonFirstNameProperty); NSLog (@ "% @", firstNameString); [Nomination addObject: firstNameString]; } NSLog (@ "% @", nominal); NSString * yourString = name that you want to add; BOOL Equal Stringfound = No; (For NSString * someString namearray) {if ([someString isEqual: yourString]) {Similar stringfade = yes; break; }} If you want to do the same {{code} you want to do the same {// code}} {// code you want}    

Comments