3

I know that in iOS 6 we should request the access to contacts first like below : App would like to access your contacts

But now, I wonder how to add detail message in the alert view, just between the alert-title and two buttons. I did see some-app had done that.

I use ABAddressBookCreateWithOptions and ABAddressBookRequestAccessWithCompletion, but the previous one's option is reserved as NULL while the later one only accepts a callback block.

I searched a lot, like another Q, iOS 6 Release Notes and Apple Doc, but failed to make it.

Thanks a lot for any help. :)

Community
  • 1
  • 1
Jason Lee
  • 3,200
  • 1
  • 34
  • 71

1 Answers1

6

You can use NSContactsUsageDescription key for this purpose.

Add this key to your info.plist and add the Message you want to display as the value.

NSContactsUsageDescription

NSContactsUsageDescription (String - iOS) describes the reason that the app accesses the user’s contacts. When the system prompts the user to allow access, this string is displayed as part of the dialog box.

This key is supported in iOS 6.0 and later.

Please check InfoPlistKeyReference for more keys.

Midhun MP
  • 103,496
  • 31
  • 153
  • 200