views:

177

answers:

1

I want to detect iPhone's common settings like settings about Mail, Contacts and Calendar.

screenshot

I want to detect this Sort Order and Display Order settings for a native contact book application. Is this possible and how? Thanks in advance.

+6  A: 

For the settings about the Adress Book, you can use the methods ABPersonGetSortOrdering() and ABPersonGetCompositeNameFormat() to get respectively the sort order and the display order. Read the AdressBook guide and the ABPerson class reference.

For mail, you can detect if the device is configured to send email with the class method canSendMail of the MFMailComposeViewController class. I am not aware of an API that give you more information than that. I doubt Apple would add one (and as a user, I prefer it this way).

For calendar, see this question: http://stackoverflow.com/questions/246249/programmatically-add-custom-event-in-the-iphone-calendar

And for detecting the locale timezone, it's as simple as [NSTimeZone localTimeZone];. Again, I invite you to read the NSTimeZone class reference, to learn what you can do with this object.

Guillaume