erikberglund / SwiftPrivilegedHelper

Example application using a privileged helper tool with authentication in an unsandboxed application written in Swift
MIT License
182 stars 34 forks source link

incorporate SwiftPriviligedHelper in own project #15

Open hk05 opened 5 years ago

hk05 commented 5 years ago

Hi,

I am trying to incorporate a simple helper in my own project. I would like to use SwiftPriviligedHelper as a starting point.

First of all: I do not have previous experience with creating helper tools, so please forgive me any ignorance in this field.

After quite a struggle I got SwiftPriviligedHelper running with my self signed developer certificate.

Next I want to add the code to my own project and change the identifiers to my own projects identifiers, so replace the com.github.erikburglund. to com.mydonain. My first attempt is to do that in the (working) SwiftPriviligedHelper project. After changing all references I cannot run the helper app any more. Trying Install causes a "Failed to install helper with error: Error Domain=CFErrorDomainLaunchd Code=4 "(null)". I tried bumping the bundle identifier, to no avail.

Any pointers on how to get this done with a simple self signed developer certificate are welcome.

Thanks!

PS: Quite frankly: I do not understand much about the certificate juggling that is going around, I am disparately reading background info (including the links provided by this project and the closed issues in this project), but the more I read the messier things get in my head on how to safely and robustly apply this technique in my own projects. Any pointers to clear and up-to-date reads on certificates / jobbless are welcome! Thanks again for providing this project!