Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using mach_inject in xamarin.mac #15

Open
karthickr87 opened this issue Oct 31, 2014 · 1 comment
Open

using mach_inject in xamarin.mac #15

karthickr87 opened this issue Oct 31, 2014 · 1 comment

Comments

@karthickr87
Copy link

Hello,

I am using xamarin for developing a mac application, my idea is to create a binding between mach_inject and xamarin. As a first step, i created a framework out of this project.To make sure it is working fine, i created a new xcode project and linked the framework. When i run the app, i am getting the following error

2014-10-31 17:58:27.429 BrainloopShareFramework[11184:303] an error occurred while installing com.aspiresys.BrainloopShareFramework.Installer (domain: kSMErrorDomainFramework (4097))
2014-10-31 17:58:27.430 BrainloopShareFramework[11184:303] Couldn't install MachInjectSample (domain: com.erwanb.MachInjectSample.ErrorDomain code: 1)

Am i going in correct approach. is it possible to use mach_inject in xamarin mac app by creating a binding. Please help me.

@rodionovd
Copy link

Well, the reason for the error is that SMJobBless() doesn't play well with frameworks: it expects your helper executable to lay inside your main application bundle (and not inside your framework's bundle).

There're few things you can do here:

  1. Copy your helper into Contents/Library/LaunchServices directory of the application bundle;

    You may even do that at runtime: see how I did it for my own injection framework

  2. (if you're trying to inject something into Finder) try Finder Sync extensions instead. Even Dropbox replaced their Finder injector with them.

Don't also forget about code-signing: everything (your main application, frameworks and helpers) should share the same certificate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants