In terms of security There are 3 type of iOS clients.
- The carefree client. They just want to get it done. They are more than willing to give out log-in details and let you submit on their behalf.
- The more careful client. They are more carful about log in details. They might send a you the signing certificates, but not itunes credietials. They will upload the ipa themselfs.
- The corporate client. They will want to own the entire submission process, they have a secirity policy and wont want to share any certificate or password with a 3rd party.
The problem with client number 3 is that they will have to sign an app that you have built. This is possible but a little tricky. I will outline how its you can do it, the hardest part is explaining it to the client.
The first thing to note, when you build an iOS app, the certificate you used to code sign is not final. You can re-sign the code as many times as you like with a different certificates, on different machines. This is what the organiser is doing when you select "share". It also allows you to change the profile you signed it with.
 |
| Note the option "Dont resign" - This leaves the original code signing intact. |
You can do this manually without Xcode (you still need a Mac with the certificate and private key in the keychain):
- First get the .ipa file. Export it from Xcode using the organiser (click share, dont re-sign then save it anywhere).
- Rename the .ipa file to .zip and unzip it
- Open the payload folder, right click on the inner file and select "show package contents"
- Replace the file called "embedded.mobileprovision" with your new profile. You can use organiser to extract your profile or you can download it from the provisioning portal)
- To resign the app, execute the following command in the terminal: /usr/bin/codesign -f -s "{SIGNER IDENTITY}" {APPLICATION BUNDLE PATH}
- Re-zip (right click, then choose "compress") the payload folder.
- Rename it to its the original .ipa extension.
For step 5 you may need to go into keychain to get the name of the certificate to sign with.
 |
| Copy the common name |
The final command will look like this:
/usr/bin/codesign –f –s “iPhone Distribution: Company Name” “/Path to application bundle/MyApplication.app”
I adapted a script to automate this process, you can download it
here on on
github. To use, open with AppleScript Editor, save as .app, then drag .ipa and the .mobileprovision files onto it. You will be prompted for the name of the certificate to sign with. Again copy and paste the common name from keychain.