I am working on an app and need to make the user enter information like name, phone, address etc. Inside my app is it possible to show the contact list (Address book) and make the user pick the contact he wants to use. I am specifically hoping to find a way that also give me the UI and search functionality within the contacts just like the regular contacts list. So when the user wants to enter the information, I show him the contacts list (with the same UI/functionality or a subset of it) and let him pick the contact. Is there a way to do this in iOS?
Address book is there. USe that .
This answer can help you.
Get a list of all contacts on iOS
Fetch Contacts in iOS 7
How to simply retrieve list of Contacts in iOS7?
If, you want a tutorial, here is the link Tutorial link
Related
I'm having trouble searching online for this and I've missed it in the reference materials if it's there.
I'm writing an iOS app in Swift, and there are participants in the app whose contact info can currently be saved into the user's address book, using the Contacts Framework.
What I'd like to do is when the user has to save their own participant information into the system, I'd like to present their default contact info from the address book as the text fields' default text. I figured this would be possible using the contacts framework, but I'm not sure how to fetch the current user's information.
Does the contacts framework even keep track of that? I thought it did, because the Contacts app has my own phone number at the top of it's listings, but I realized afterwards that it's just the device's number, not a whole contact file. If so, do I search for it with a specific predicate or is their a function I can call?
Is there a way to find Favorite contacts from the iOS Address Book API? I'm referring to the contacts a user places in his Favorites tab in the Contacts app.
Favorites are stored inside Phone.app, not inside the Address Book database itself. You can't access other app's sandbox on a non-jailbroken iPhone, so unfortunately the answer is no.
Also, it would be pretty bad for privacy if any app could see your favorite contacts. It's already bad that it can access entire address book without asking you.
Filip is correct, you cannot access the list of favorite contacts on iOS via a public, app-store legal API.
To come close you could try to guess a user's favorite or most important contacts from their address book. Let's assume that people know most about the people they are closest to and that this is also reflected by their phone's address book:
For example, the address book contact for a close friend contains more
information (address, birthday, maybe a nickname) than a contact for a
business associate or a colleague at work.
We could then use this information to compute an importance score for each address book contact. By taking the n most important contacts we could approximate a user's favorite contacts.
I've written about this idea some more on my blog: http://dbader.org/blog/guessing-favorite-contacts-ios You can also find a sample implementation and a demo application there.
I have searched through the API and could not find any appropriate methods. Maybe Apple believes that this is a Phone-app data field or maybe it is about security. I'd love to use it, too.
ABAddressBookCopyArrayOfAllPeople(addressBook) loads all contacts from all contact groups.
ABAddressBookCopyArrayOfAllPeopleInSource(addressBook, defaultSourceRef) loads contacts from just the default address book.
Is there any way to just load contacts from user selected groups in the contacts groups?
Using ABAddressbook, you can access all contacts in your app, Now, It's depends on you, Which contacts you want to show to user. If you want to show any selected contacts, You have to get selected contacts from your app only, After that you can exclude other contact from main contact list which you want to display.
Finally, It's possible to view selected contacts, But You've to select those contacts from you app only, And it's depends on your logic.
Regards,
I am new in handling apps that will be connecting with Facebook.
I want to let my user log in my app with Facebook account and be able to send something, for example, a gift to their Facebook friends.
I want to get the user's friends list and which is very easy by using FBFriendPickerViewController. However, I want to have an effect that if their Facebook friend(s) is/are also using my app, the app icon will be shown at the right hand side of the user table cell (Just like some Phone Contact lists will show if the contact has Whatsapp/ Google+)
I have been searching through sites but still find nothing about this.
So my question is, is there any "official" way (using Facebook SDK method) to show the icon?
Or I have been thinking of another approach is that, I first get the friend list and then saved it, with the information that whether the "friend" is using my app or not. Then I create a custom friend picker view and check the condition to enable/disable the visibility of the app icon.
I can get the information by using approached of using GraphAPI fields or using external database, for which are mentioned in this , this and this .....
Anybody help?
Ok I end up with customizing my own table view... : )
Is there a way to find Favorite contacts from the iOS Address Book API? I'm referring to the contacts a user places in his Favorites tab in the Contacts app.
Favorites are stored inside Phone.app, not inside the Address Book database itself. You can't access other app's sandbox on a non-jailbroken iPhone, so unfortunately the answer is no.
Also, it would be pretty bad for privacy if any app could see your favorite contacts. It's already bad that it can access entire address book without asking you.
Filip is correct, you cannot access the list of favorite contacts on iOS via a public, app-store legal API.
To come close you could try to guess a user's favorite or most important contacts from their address book. Let's assume that people know most about the people they are closest to and that this is also reflected by their phone's address book:
For example, the address book contact for a close friend contains more
information (address, birthday, maybe a nickname) than a contact for a
business associate or a colleague at work.
We could then use this information to compute an importance score for each address book contact. By taking the n most important contacts we could approximate a user's favorite contacts.
I've written about this idea some more on my blog: http://dbader.org/blog/guessing-favorite-contacts-ios You can also find a sample implementation and a demo application there.
I have searched through the API and could not find any appropriate methods. Maybe Apple believes that this is a Phone-app data field or maybe it is about security. I'd love to use it, too.