I'm working on a MacOS desktop Electron app that is for distribution outside the app store using Developer ID. Before code signing, the app opened and was working well. But after code signing, I get the following error.
stderr:dyld: Library not loaded: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib
Referenced from: /Users/home/Desktop/electron-start/dist/mac-arm64/electron1.app/Contents/Frameworks/R.framework/Versions/3.5/Resources/bin/exec/R
Reason: image not found
Before code signing I think the file was looking for a path within the app
/Users/home/Desktop/electron-start/dist/mac-arm64/electron1.app/Contents/Frameworks/R.framework/Versions/3.5/Resources/bin/exec/R
But now I think the file is looking for a path outside
Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib
I used this entitlements file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
Can anyone please help me? I've looked at many places and willing to learn. Thanks for your time. I really appreciate it.