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
Post a Comment