iphone - Not able to access Contacts in iOS7 -


i using following code contacts user's phone

cferrorref  error; __block bool accessgranted; abaddressbookref myaddressbook = abaddressbookcreatewithoptions(null,&error); abaddressbookrequestaccesswithcompletion(myaddressbook, ^(bool granted, cferrorref error)   { if (!accessgranted && !granted) { alertviewdeny = [[uialertview alloc]initwithtitle:@"deny access" message:@"deny" delegate:self cancelbuttontitle:nil otherbuttontitles:@"cancel", nil]; [alertviewdeny show]; [alertviewdeny release]; } else { nsarray *allpeople = (nsarray *)abaddressbookcopyarrayofallpeople(myaddressbook);      dlog(@"allpeople %@",allpeople); } 

in output getting //only ios7 , working ios6.

allpeople( )


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -