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

Xcode signing issue #26

Open diuming opened 4 years ago

diuming commented 4 years ago

Is it possible use following signing? Screen Shot 2020-06-11 at 10 49 56 AM

jeff-h commented 4 years ago

Is your underlying question whether you need a paid developer account for this? If so, the answer is no, you don't need it. I have my free developer account settings chosen in Team and "development" as the signing cert. Otherwise the same as your screenshot.

chipjarred commented 4 years ago

I'm not entirely sure what the exact question is either, but the settings look similar to mine. It seems reasonable to think that @diuming may just be trying to resolve a build problem for which he has no diagnostic output. I know it took quite some digging for me to figure out what was causing it to fail for me.

As great as the CodeSignUpdate shell script is in the project, it does have one major problem, which is that the error messages it generates aren't displayed since they are written to stdout, which is being redirected for string building. As a result, it just terminates with exit code 1 with no information about what went wrong. It does generate useful error messages. It's just that they are never actually displayed. So you're left scratching your head about what went wrong.

I have a fork in which I essentially re-wrote the CodeSignUpdate shell script as a Swift script. Since it doesn't need to use I/O redirection to build strings, it can actually emit its error messages, plus I check a few additional things that could cause problems that it didn't check. You might find it helpful. You can find it at https://github.com/chipjarred/SwiftPrivilegedHelper . I added a README to the Scripts folder to explain how to use it. It's not much different from the original shell script, except instead of hard coding info in the script, you set them in environment variables in your Run Script phase.

I hope it helps someone