I tried to link one of my library in my macOS app with it's extension. But when I try to debug the app extension a link error occurs.
My App is built in Xcode/DerivedData/MyApp/Build/Products/Debug/MyApp.app, and app extension for quick look thumbnail is in Xcode/DerivedData/MyApp/Build/Products/Debug/MyApp.app/Contents/PlugIns/MyApp.appex.
I want to link myLib.dylib in Xcode/DerivedData/MyApp/Build/Products/Debug/MyApp.app/Contents/Frameworks/MyCompany/Bin with MyApp.appex.
I tried several "runpath search path" in Build Settings of MyApp.appex like the followings:
@executable_path/../
@executable_path/../../../Frameworks/MyCompany/Bin/
$(BUILD_PRODUCTS_DIR)/MyApp.app/Contents/MyCompany/Bin
$(BUILT_PRODUCTS_DIR)/Contents/Frameworks/
@rpath
and all failed. When I run myApp.appex for debugging I have the error message :
dyld[46627]: Library not loaded: @rpath/MyLib.dylib
What should I do?