InjectionIII: dylib can't be opened

When loading .dylib macOS throws an error

"eval101.dylib" can't be opened because Apple cannot check it for malicious software.

Then in the console I get:

💉 *** dlopen() error: dlopen(/Users/nico/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval109.dylib, 2): no suitable image found.  Did find:
	/Users/nico/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval109.dylib: code signature in (/Users/nico/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval109.dylib) not valid for use in process using Library Validation: library load disallowed by system policy ***

I am using Xcode 11, iOS 13.0 and I am on macOS 10.15 beta.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 48 (45 by maintainers)

Most upvoted comments

That simple eh? Seems Xcode10 xcodebuild was the problem after all. I’ve filed a PR https://github.com/johnno1962/InjectionIII/pull/181.

Yup.

+ (BOOL)codesignDylib:(NSString *)dylib {
    NSString *command = [NSString stringWithFormat:@""
                         "(export CODESIGN_ALLOCATE=/Applications/Xcode.app"
                         "/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate; "
                         "/usr/bin/codesign --force -s 'Apple Development: Nico Gonzalez' \"%@\")", dylib];
    return system(command.UTF8String) >> 8 == EXIT_SUCCESS;
}

Screen Shot 2019-10-02 at 12 37 50 PM