OSX app crashing: code signature invalid

三世轮回 提交于 2020-03-18 07:00:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!