No longer able to read Preview Content files in Preview

Prior to updating to MacOS 14, the Preview code would read main bundle files listed in Preview Content when the target was MacOS. Now, the files are not read.

When the target is iPadOS, the files are read and the preview works.

Does anyone know what is happening? I suspect that this has something to do with the App Sandbox security features.

Hi,

Sorry to hear you are having problems getting previews working. The best next step will be to file a feedback with diagnostics so we can take a look.

Steps to generate helpful diagnostics:

  1. Download and install the logging profile on all devices involved. Instructions and profiles are available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift
  2. Reproduce the issue
  3. Click the "Diagnostics" button in the error banner in Previews' Canvas area (or if the banner is missing you can use the menu: Editor > Canvas > Diagnostics)
  4. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  5. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
  6. Generate the sysdiagnose(s) and attach those too

Thanks. I have verified that it is the Sandbox. The work around was just to change the entitlements property list to set the App Sandbox item to NO.

My preview code now reads the PDF files that are in the Preview Content folder and are copied to the application bundle.

No longer able to read Preview Content files in Preview
 
 
Q