I writed a dynamic library that loaded into target application by environment variable DYLD_INSERT_LIBRARIES, the dylib works fine when application executed from terminal by this commands:
$ export DYLD_INSERT_LIBRARIES=/path/to/mylib.dylib
$ /path/to/application.app/Contents/MacOS/executable
but when execute it by open command:
$ open /path/to/application.app
this error occured:
dyld: could not load inserted library:
what is difference between two method of execution? thanks.
The reason of this issue was that my dylib is 32bit and it first load into "open" which is 64bit.