0

i want to retrieve the email ids of users exist in contact and mail app in the device.It just like there is search field to search the user email id and the fallowed table will show the results that contains the search text.And the users email id's need to search in contacts and mail. can anyone help me out.

Smith
  • 379
  • 6
  • 18

1 Answers1

0

You cannot grab any information from the mail.app on an iDevice. Apple's Sandbox rules prevent this sort of thing.

With the contacts - it's possible. You should read up on the Address framework.

Here's Apple documentation on it: https://developer.apple.com/library/ios/documentation/AddressBook/Reference/AddressBook_iPhoneOS_Framework/_index.html

Robert J. Clegg
  • 7,231
  • 9
  • 47
  • 99
  • Thanks tander.SO you mean to see we need to fetch the email id's of users from address book contacts ? – Smith Feb 18 '14 at 06:40
  • That's correct and you will only be allowed to do this if the user allows you to. Before accessing the contacts the Address framework alerts the user and asks for permission. Don't rely on this method too heavily as some users will not allow access to their contacts. – Robert J. Clegg Feb 18 '14 at 06:42