I am writing an app that interfaces with the iPhone address book.
Here is the relevant section of my code (from UIImagePickerControllerDelegate
)
-(void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo
{
ABPersonSetImageData(record, (__bridge CFDataRef)UIImagePNGRepresentation(image), &error);
}
My app lets you take a picture with the camera (using UIImagePictureController
), and then stores it as the contact for someone in your address book.
I'm finding that the operation above hangs for 5-10 seconds. 1) Is there a better approach? 2) Why is this so slow?