App's QuickLook plugin not working in 10.13: "framework being ignored in restricted program because of @executable_path"

I have a Mac app with an embedded QuickLook plugin. The plugin works fine on macOS Sierra and before, but does not work anymore in the macOS High Sierra beta. It fails with the following error:


dyld: warning, LC_RPATH @executable_path/../Frameworks in /Applications/MyApp.app/Contents/Library/QuickLook/MyApp Quick Look Plugin.qlgenerator/Contents/MacOS/../Frameworks/MyDataLayer.framework/Versions/A/MyDataLayer being ignored in restricted program because of @executable_path


"MyDataLayer.framework" is my own framework that encapsulates the data layer. The framework can be loaded into the main app and even into the included Spotlight importer without problems. Only the QuickLook plugin fails.


My framework and QuickLook plugin are Objective-C only, the app is mixed Swift + Objective-C.


I can reproduce this in a test environment. The build settings are the same for my QuickLook plugin and the Spotlight importer. One works, the other doesn't.


What could be causing this? Is there anything else I could check to get more troubleshooting information?