Opening files in another app for printing by a sandboxed app may fail
| Originator: | stevereinvented | ||
| Number: | rdar://14000104 | Date Originated: | 05/28/2013 |
| Status: | Open | Resolved: | |
| Product: | OS X | Product Version: | 10.8.3/12D78 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: Opening files for printing in another application from a sandboxed app may fail. Steps to Reproduce: 1. In a sandboxed app, choose to print a file, such as a PDF, with Preview. Expected Results: The file is opened and printed. Actual Results: Nothing happens. A message such as this is logged in Console: appleeventsd[53]: Sandboxed application with pid 41542 attempted to lookup App:"Preview"/4037/0x0:0x125125 prvw1110 sess=100004 but was denied due to sandboxing. (handleMessage()/appleEventsD.cp #2067) com.apple.coreservices.appleevents.peer.0x7f938300a3f0.xpcq Regression: N/A Notes: The method used to print is NSWorkspace's -openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers with the options (NSWorkspaceLaunchAndPrint | NSWorkspaceLaunchDefault), and nil passed for everything else but the array of NSURLs. Both apps are sandboxed and have the printing entitlement. It is possible to open the file and then print it. Opening and printing may succeed if the file is stored in some locations, for example a subfolder of ~/Library/Mobile Documents which is not the target app's folder.
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!