iOS9 and iOS8 ABPeoplePickerNavigationController/ContactPickerViewController

So if I'm developing a new app that uses the AddressBook (now Contacts), how do I write it to be compaitble with iOS9 and iOS8.


If I use AddressBook apis,I know told they are depricated and should not be used. If I use ContactPickerViewController apis and try to run it on 8.4 it wont compile?


I don't see anything in the docs on how you are to use this new api yet not exclude the millions of < iOS9 devices out there? Any thoughts on where to docs are to address this?

Answered by dkardell in 36822022

Thanks, while that document says you can do both, it doesn't do a good job of giving a simple exmaple of, "Hey I want to develop for the latest and greatest but I also don't want to exclude ios8. Here is example code of how to properly impliment an addressbook/contact app on both ios8 and 9"

You can write your code so that it detects which version of iOS it is running on uses the appropriate objects and code. See this thread, especially eskimo's reponse.

Accepted Answer

Thanks, while that document says you can do both, it doesn't do a good job of giving a simple exmaple of, "Hey I want to develop for the latest and greatest but I also don't want to exclude ios8. Here is example code of how to properly impliment an addressbook/contact app on both ios8 and 9"

iOS9 and iOS8 ABPeoplePickerNavigationController/ContactPickerViewController
 
 
Q