contacts

Programmatically Link CNContacts

社会主义新天地 提交于 2019-12-21 02:51:17
问题 In my app, I want to create a new contact. If a contact with the same name already exists, I want to link the new contact to the old one. I have looked into the CNContact and CNContactStore references, and don't see any way to link contacts. Is this possible, and if so, how? 回答1: In IOS9 contacts in different accounts that represent the same person may be automatically linked together. To achieve this you should make sure that the name of your newly inserted contact matches the name of the

extract the country code from mobile number

若如初见. 提交于 2019-12-21 02:35:24
问题 I have a list of mobile numbers with country code like "919638095998"number. I have referred the libphonenumber google example also but in that first we need to pass the country 2 digit code, which I don't know initially. So how can I know that the number is from which country? I have also got one solution as manually extract the code one by one digit from mobile number and then compare with country code. But it is a long task and also it will give me bad performance. Can anyone suggest a

Database design - Multiple “Contact information” for different tables

依然范特西╮ 提交于 2019-12-20 22:01:28
问题 I have a database with tables "person", "company", "shop", etc. Many of these tables must have "contact information". The possibility to design this was asked in Database design - Similar Contact Information for multiple entities Now, in my database I leave a possibility to have a multiple addresses, multiple phones and multiple emails to each contact data . This is my database schema: So, I make an intermediate table "contact" as a simplest way to link a "contact information" to each table.

Is ABRecordID a reliable way to identify unique contacts?

旧时模样 提交于 2019-12-20 17:38:28
问题 My app uploads contacts, and, in the future, will need to update them. Is using the ABRecordID a reliable way to identify people, or is it possible for a new record to obtain the ID of a deleted record? To optimize uploads, I would like to upload only the records that have been modified or created since the last upload. I'm currently storing a copy of the person's contacts using core data. I'd like to slim down the footprint of my app and speed up the execution time of scanning through the

With CNContactPickerViewController in iOS 9.0, how to enable/disable single or multiple selection?

人走茶凉 提交于 2019-12-20 11:51:46
问题 The delegate CNContactPickerDelegate have methods for single and multiple selections. But how do we specify we want single or multiple selection when we present the view controller? I guess I miss something that perhaps also causes the problem I have described in: CNUI ERROR Selection predicates are set but the delegate does not implement contactPicker:didSelectContact: 回答1: You need to implement ONLY the method you need. If you want only one contact, implement: contactPicker:didSelectContact

Prevent php web contact form spam

↘锁芯ラ 提交于 2019-12-20 09:59:14
问题 I am an amateur web designer, I have searched on stackoverflow.com and other websites and have found many fixes for this issue I'm having, but none of them have worked (probably because I implement them incorrectly). I'm hoping someone with more knowledge can help me with a simple fix or show me how to implement one of the fixes I've found. The problem: I have a very simple php contact form on my business's website. It has worked great for years, but in the last week has been hacked. I now

How to retrieve address book contacts with Swift?

不想你离开。 提交于 2019-12-20 09:57:58
问题 I don't understand why my code doesn't compile with Swift. I am trying to convert this Objective-C code: CFErrorRef error = NULL; ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, &error); if (addressBook != nil) { NSLog(@"Succesful."); NSArray *allContacts = (__bridge_transfer NSArray *)ABAddressBookCopyArrayOfAllPeople(addressBook); } This is my current rendition in Swift: var error:CFErrorRef var addressBook = ABAddressBookCreateWithOptions(nil, nil); if (addressBook !=

iPhone SDK - UITextField with + Button for Contacts

爱⌒轻易说出口 提交于 2019-12-20 09:24:44
问题 In some applications like Mail, when you have a UITextField, there is a little + button to the right. When you tap it, a modal view controller comes up which you can select a phone number, address, etc from, and it will appear in the text field. I was wondering how to implement this in my own app. Thanks, Isaac 回答1: If you want the plus button inside the text field, take a look at the rightView property of the UITextField class, which lets you put any UIView in the right-most portion of the

How to disable PhoneGap APIs/functionality?

谁说胖子不能爱 提交于 2019-12-20 05:53:39
问题 Is there a recommended way to remove access to unneeded PhoneGap APIs? For example our app does not need to access the contact database. With normal web pages, an XSS vulnerability is sandboxed to only affect one site (the browser prevents any contagion to other sites). With a PhoneGap application, by default, an XSS vulnerability can access the contacts list or any other part of the PhoneGap API. I want to avoid the Skype situation where an XSS vunerability in Skype allowed an attacker to

Issue with fetching the contacts list from Device

家住魔仙堡 提交于 2019-12-20 05:46:10
问题 What's wrong with this code : NSMutableArray* contactArray = [[NSMutableArray alloc] init]; ABAddressBookRef addressBook = ABAddressBookCreate(); CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook); // Over here it returns zero count. CFIndex nPeople = ABAddressBookGetPersonCount(addressBook); for (int i = 0 ; i < nPeople; i++) { NSMutableDictionary* dicContact = [[[NSMutableDictionary alloc] init] autorelease]; ABRecordRef ref = CFArrayGetValueAtIndex(allPeople, i); } It