问题
I have an OSX app that I distribute outside the AppStore. Therefor I sign it with the according certificate (Developer ID Application Certificate).
The app itself is written in Freepascal (Lazarus) and has a dependency lib, written in C++, which I also sign. I also change the path of the lib to be relative to the app by using install_name_tool and prefixing the path with @loader_path. Works like a charm for me locally.
The app (as reported to me) works OK on OSX 10.11.6, but crashes on OSX 10.10.5, saying: Library not loaded: @loader_path/libMyAPP.dylib Referenced from: /Users/USER/Downloads/MyAPP.app/Contents/MacOS/MyAPP Reason: no suitable image found. Did find: /Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib: code signature invalid for '/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib'
/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib: code signature invalid for '/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib'
Any pointers what might be going on? Is this really a code signing issue or something else? Thanks.
回答1:
I have the same error with XCode 11/iPhone7 device and google firebase.
dyld: Library not loaded: @rpath/GTMSessionFetcher.framework/GTMSessionFetcher Referenced from:
...
Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for
...
GTMSessionFetcher: stat() failed with errno=1
Solution
try to remote pod and remove use_framework!
pod deintegrate
then remove use_framework!
# use_frameworks!
then install again
pod install
来源:https://stackoverflow.com/questions/49378727/osx-app-crashing-code-signature-invalid