According to the documentation with iOS6 an address book should be created using ABAddressBookCreateWithOptions.
It also says if the caller does not have access to the db then this method will return null.
However access is requested by calling ABAddressBookRequestAccessWithCompletion, which takes an ABAddressBookRef as a parameter.
So according to the documentation you can’t get an ABAddressBookRef in the first place if you don’t have access, but to get access you have to have an ABAddressBookRef to pass as a parameter.
Eh. Catch 22? How do you create an ABAddressBookRef then?
Been googling for some example/tutorial code for this but haven’t found any.
TIA
I use code like this:
where
_bookis my ABAddressBookRef.If my app has been denied access then _book will be NULL and you can’t access the address book.