Frame not working for one of my goals (splash screen)

I have an XCode Swift project with two targets, a traditional app and a splash screen. I want to use the framework in both (I've tried with at least 2 frameworks with no luck).

In the app, they work fine, but in the screensaver, even though I can compile (I have a bridge file with the appropriate imports and I have a copied and linked structure)

enter image description here

when the splash screen starts it with an error in the Console:

Jul  1 16:33:15 ironbird.local ScreenSaverEngine[60006]: Error loading /Users/juanjo/Library/Screen Savers/Ninja.saver/Contents/MacOS/Ninja:  dlopen(/Users/juanjo/Library/Screen Savers/Ninja.saver/Contents/MacOS/Ninja, 265): Library not loaded: @executable_path/../Frameworks/Paddle.framework/Versions/A/Paddle
      Referenced from: /Users/juanjo/Library/Screen Savers/Ninja.saver/Contents/MacOS/Ninja
      Reason: image not found

      

Can someone help me solve the problem or at least debug it? If I'm looking for a bug, I find people forgetting to either copy or link the structure, which is not my business.

Thanks in advance!

UPDATE: If I use install_name_tool to change the path where the search was looking for an absolute path, I get the splash screen to work.

+3


source to share


1 answer


I did the job with changing the original structure like this:



$ cd Frameworks/Paddle.framework/Versions/A/
$ install_name_tool -id @rpath/Paddle.framework/Versions/A/Paddle Paddle

      

0


source







All Articles