From 562e9ecd8bf84dffd41b4f3db2f0e3bde4fe549a Mon Sep 17 00:00:00 2001 From: Erik Berglund Date: Sat, 10 Dec 2016 14:12:04 +0100 Subject: [PATCH] Added signing troubleshooting steps --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2598053..903674f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # SwiftPrivilegedHelper -This is just an example application to demonstrate how to use a privileged helper tool with authentication in Swift 3.0. +This is an example application to demonstrate how to use a privileged helper tool with authentication in Swift 3.0. -Please undestand the code and improve and customize it to suit your need and application, this is just a simple example with minimal error handling and error checks. +Please undestand the code and improve and customize it to suit your needs and application. The example code contain minimal error handling and error checks and can be improved in many ways. # Requirements * **Tool and language versions** - This project was created and only tested using Xcode Version 8.1 (8B62) and written in Swift 3.0. + This project was created and only tested using Xcode Version 8.1 (8B62) and Swift 3.0. * **Developer Certificate** To use a privileged helper tool, the application and helper has to be signed by a valid deverloper certificate. @@ -15,20 +15,24 @@ Please undestand the code and improve and customize it to suit your need and app * **SMJobBlessUtil** The python tool for verifying signing for applications using SMJobBless included in the [SMJobBless](https://developer.apple.com/library/content/samplecode/SMJobBless/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010071-Intro-DontLinkElementID_2) example project is extremely useful for troubleshooting signing issues. + Dowload it here: [SMJobBlessUtil.py](https://developer.apple.com/library/content/samplecode/SMJobBless/Listings/SMJobBlessUtil_py.html) + + Use it like this: `./SMJobBlessUtil.py check /path/to/MyApplication.app` # Setup -To use the project, you need to use your own signing certificate. +To test the project, you need to update it to use your own signing certificate. ### Select signing team 1. Select the project in the navigator 2. For both the application and helper targets: -3. Change the signing Team to your Team: +3. Change the signing Team to your Team ![ChangeSigningTeam](https://github.com/erikberglund/SwiftPrivilegedHelper/blob/master/Screenshots/ChangeSigningTeam.png) ### Change signing certificate OU -1. Find the OU of the Developer ID certificate you selected in the application. You look for the DevelopmentTeam in the pbxproj file inside the xcode project file. +1. Find the OU of the Developer ID certificate you selected in the application. You look for the DevelopmentTeam in the pbxproj file inside the xcode project file. + ```bash $ grep DevelopmentTeam SwiftPrivilegedHelper/MyApplication.xcodeproj/project.pbxproj DevelopmentTeam = Y7QFC8672N; @@ -36,4 +40,10 @@ To use the project, you need to use your own signing certificate. ``` 2. For both the application and helper Info.plist: 3. Change the OU in the _Tools owned after installation_ and _Clients allowed to add and remove tool_ respectively to your certificate OU: - ![ChangeCertificateOU](https://github.com/erikberglund/SwiftPrivilegedHelper/blob/master/Screenshots/ChangeCertificateOU.png) \ No newline at end of file + ![ChangeCertificateOU](https://github.com/erikberglund/SwiftPrivilegedHelper/blob/master/Screenshots/ChangeCertificateOU.png) + +Now build and test the application + +### Signing Troubleshooting + +Use [SMJobBlessUtil.py](https://developer.apple.com/library/content/samplecode/SMJobBless/Listings/SMJobBlessUtil_py.html) and correct all issues until it's running without output. \ No newline at end of file