Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OSX app crashing: code signature invalid

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.

like image 348
simonescu Avatar asked Mar 20 '18 07:03

simonescu


1 Answers

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 remove pod and remove use_framework!

pod deintegrate

then remove use_framework!

  # use_frameworks!

then install again

pod install
like image 58
BuffK Avatar answered Nov 03 '22 05:11

BuffK