Questions tagged [contacts-framework]
44 questions
13
votes
4 answers
Swift Using Contacts Framework, search using phone number to get Name and User Image
I have an API that returns phone numbers in format: +1415xxxxxxx (E164)
Right now these numbers are put into a Cell of a UITableView and are presented as expected, however I'd like to be able to search the users contacts on the phone to see if the…
Mathew Jenkinson
- 644
- 2
- 9
- 17
12
votes
3 answers
Fetch localized phone label using Contacts frameworks
I'm trying to fetch localized phone label value using CNContact.My attampt so far:
NSError *error = nil;
CNContactFetchRequest *fetchRequest =[[CNContactFetchRequest alloc] initWithKeysToFetch:keysToFetch];
[addressBook…
Poles
- 3,307
- 6
- 38
- 82
8
votes
1 answer
Saving an image as Contact Picture, and displaying it while incoming call
Requirement: I am saving some contacts into the user's iPhone along with a picture (dimensions same as the device). I want this picture to be displayed ON FULLSCREEN whenever the contact calls on that device.
Noticed Example: Truecaller iOS app…
Nishant
- 11,895
- 9
- 53
- 89
7
votes
2 answers
iOS Terminated due to signal 9 on allowing permission
I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everything is going good and working well. But I experienced a amazing behavior which I have not seen in Android since I am android developer.
In iOS to…
A.s.ALI
- 1,659
- 1
- 14
- 41
7
votes
1 answer
create new group with contacts framework, CNErrorDomain Code = 2
i try to create and save a group with the Contacts Framework.
First the user authorize the App for contacts access.
A viewcontroller is presented and with a + button user shows an alertview with textfield.
The user types the group name he wants and…
brush51
- 5,508
- 6
- 36
- 71
6
votes
2 answers
iOS9 Contacts Framework get identifier from newly saved contact
I need the identifier of a newly created contact directly after the save request. The use case: Within my app a user creates a new contact and give them some attributes (eg. name, address ...) after that he can save the contact. This scenario is…
Thomas G.
- 995
- 10
- 24
6
votes
1 answer
IOS9 Contacts framework fails to update linked contact
In AddressBook on device I have a record linked with Facebook contact record.
I fetch it into CNContact with CNContactFetchRequest with:
contactFetchRequest.mutableObjects = true
contactFetchRequest.unifyResults = false
After getting, I modify…
poGUIst
- 310
- 4
- 10
5
votes
1 answer
Unable to update a contact's phone number in Swift
Went through many blogs, questions and articles before posting this question. I'm not able to update phone number for a contact using Contacts framework in Swift.
let store = CNContactStore()
OperationQueue().addOperation{[store] in
let predicate =…
Priyanka
- 157
- 1
- 2
- 13
5
votes
1 answer
Programmatically remove contact from adress book on specific time in swift
I am trying to programmatically remove contacts from address book on specific time. Is it even possible in Swift and do Apple allow it?. I'm already familiar with CNContactStorebecause I have got working adding contacts into phonebook. Granted…
Tarvo Mäesepp
- 3,850
- 2
- 33
- 71
4
votes
1 answer
CNContact unique id between devices
I'm having a bit of a problem with trying to access the same contact between multiple devices. My goal is to have a user select a contact and select a phone number and email address, which will then be stored in a database. If the user opens the app…
user7616911
- 76
- 1
- 4
3
votes
3 answers
Merge duplicate CNCONTACT array swift 3 contacts framework
I did find duplicate contacts list from this method , now i'm stuck in merging the duplicates, any idea how i can do this.
I fetched duplicate using this code Referenced from previous question.
let formatter =…
user8541344
3
votes
2 answers
AddressBook and Contacts framework in iOS 8.0 and 9.0
I am trying to build an app that fetches contact list from users contacts and renders it in Custom UI of app. I want to support iOS 8 and iOS9 But the problem is methods of AddressBook framework are deprecated in iOS9 and Contacts Framework will not…
user3401744
- 33
- 1
- 5
2
votes
0 answers
CNContactViewController Cancel Button Not Working in iOS 13
The CANCEL button has no effect when presenting a CNContactViewController inside a UINavigationController.
Whenever we click on CANCEL Button on ContactViewcontroller, CNContactViewControllerDeligate
method not called in iOS 13
sivakoti guttula
- 21
- 2
2
votes
1 answer
Update phone contact single item in array
I'm trying to update 1 single item in the iphone contacts. I'm updating the email array and don't want to affect the others in the array.
For instance, I'm changing the "home" email address from my app, but if they also have a "work" email in their…
Keith
- 1,679
- 3
- 14
- 25
2
votes
0 answers
Access contacts split by their account?
I've been trying to figure out how to pull contacts with the Contacts Framework, but split them up by which account they come from such as Google, Facebook, iCloud, etc..
I've seen apps like Contacts Sync for Gmail and Simpler Contacts have done…
Conner Simmons
- 63
- 9