ABAddressBook updates record images incorrectly
| Originator: | zyafa | ||
| Number: | rdar://13997843 | Date Originated: | May 28th, 2013 |
| Status: | Open | Resolved: | Unresolved |
| Product: | OS X | Product Version: | 10.7-10.8.3 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: ABAddressBook framework updates ABRecord image data incorrectly when iCloud is enabled. Image data is set, but in some time (5 to 30 seconds) it gets updated (via kABDatabaseChangedExternallyNotification) after iCloud sync. The updated image data is also square-sized no matter what source image dimensions are. This image data is also compressed, so it looks blurry and square-cropped on other iCloud-nabled devices (iPhones/iPads etc.). Also, when clearing image data by passing nil into -setImageData: selector, it gets back to record after iCloud sync. So, there is no way to programmatically remove image data from ABRecord. This bug doesn't reproduce if you set image data with native OS X and iOS Contacts apps. The image stays clear and uncropped on all devices synced via iCloud. Steps to Reproduce: 0. Ensure that iCloud Contacts syncing is enabled in System Preferences. 1. Initialize ABAddressBook with +sharedInstance selector. 2. Get one of the available ABPerson records. 3. Update ABPerson's image data with -setImageData: selector. Use non-square and high-resolution image (e.g. one that fits iPhone 5, 640x1136). 4. Wait for 5-30 sec for iCloud sync changes to take effect. 5. Observe corrupted image data (square-cropped and compressed). Expected Results: The image data should remain uncropped and uncompressed for some certain maximum size. Actual Results: The image data gets corrupted (square-cropped and compressed) after iCloud sync. Regression: Notes: This bug report contains an example Xcode project which demonstrates the issue. Clicking "Update picture" button will set an image data included with project to a selected ABPerson. Clicking "Remove picture" will remove image data from a selected ABPerson. If no image data currently provided with ABPerson, the image view will show a standard icon placeholder (NSUser). You will have to wait for some time (5-30 sec) to observe picture updated.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!