Quick Look Preview of vCard (.vcf) Files in a sandboxed app

Originator:jbrayton
Number:rdar://13039391 Date Originated:17-Jan-2013 10:33 PM
Status:Open Resolved:
Product:Mac OS X Product Version:OS X 10.8.2 (12C3006)
Classification:Other Bug Reproducible:yes
 
Summary:

A sandboxed app will generate incomplete Quick Look previews of vCard (.vcf) files unless the app meets these two requirements:

1.  The app has the "com.apple.security.personal-information.addressbook" entitlement.
2.  The system prompts the user for access to the address book and the user accepts.

Since the only information that Quick Look displays is in the vCard file to which the app has access, I do not believe it should be necessary for the app to have access to the address book.

Steps to Reproduce:

I am attaching an Xcode project that demonstrates the issue.

1.  Compile and launch the app.
2.  Click on the Quick Look button in the app's window.  

Expected Results:

I expect to see all the information in the vCard, such as my name, title, company, email address, web site link, and Twitter handles.  I would see that information if the app was not sandboxed.

Actual Results:

Instead I see a preview of the vCard that displays my picture but is missing my contact information.

Regression:

Notes:

The vCard file in the sample is included as a resource file, "contactinfo.vcf".

The following is written to the console output when attempting to generate a Quick Look preview of the vCard file:

2013-01-17 22:23:57.594 QuickLookContactIssue[61529:4817] Address book access is denied for executable at path: /Users/jbrayton/Library/Developer/Xcode/DerivedData/QuickLookContactIssue-ehucdvxhqbvxylclttudrsoymjtc/Build/Products/Debug/QuickLookContactIssue.app/Contents/MacOS/QuickLookContactIssue
(
	0   AddressBook                         0x00007fff8cd421ec __ABIsAccessGranted_block_invoke_0 + 36
	1   libdispatch.dylib                   0x00007fff8388c0b6 _dispatch_client_callout + 8
	2   libdispatch.dylib                   0x00007fff8388c041 dispatch_once_f + 50
	3   AddressBook                         0x00007fff8cd42148 ABIsAccessGranted + 40
	4   AddressBook                         0x00007fff8cd642b2 +[ABAddressBook addressBookWithDatabaseDirectory:options:] + 29
	5   Contact                             0x0000000101af151b Contact + 5403
	6   QuickLookUI                         0x00007fff83925655 -[QLPreviewDocument _loadWithDisplayBundleID:hints:canBeRemote:] + 1094
	7   QuickLookUI                         0x00007fff83924f05 __block_global_0 + 226
	8   QuickLook                           0x00007fff87278fb1 _Z18QLTryCatchAndCrashU13block_pointerFvvE + 17
	9   libdispatch.dylib                   0x00007fff8388ff01 _dispatch_call_block_and_release + 15
	10  libdispatch.dylib                   0x00007fff8388c0b6 _dispatch_client_callout + 8
	11  libdispatch.dylib                   0x00007fff838910c8 _dispatch_main_queue_callback_4CF + 275
	12  CoreFoundation                      0x00007fff88fcb0fe __CFRunLoopRun + 1614
	13  CoreFoundation                      0x00007fff88fca6b2 CFRunLoopRunSpecific + 290
	14  HIToolbox                           0x00007fff88ca70a4 RunCurrentEventLoopInMode + 209
	15  HIToolbox                           0x00007fff88ca6d84 ReceiveNextEventCommon + 166
	16  HIToolbox                           0x00007fff88ca6cd3 BlockUntilNextEventMatchingListInMode + 62
	17  AppKit                              0x00007fff8aa1d613 _DPSNextEvent + 685
	18  AppKit                              0x00007fff8aa1ced2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
	19  AppKit                              0x00007fff8aa14283 -[NSApplication run] + 517
	20  AppKit                              0x00007fff8a9b8cb6 NSApplicationMain + 869
	21  QuickLookContactIssue               0x0000000100000df2 main + 34
	22  libdyld.dylib                       0x00007fff892227e1 start + 0
)

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!