For a future project I need to learn how works the codesigning process for Apple iOS IPA files (iPhone/iPad). The goal of my project will be to build (in Delphi) a Windows tool to codesign one IPA file (previously compiled with "Don't Code Sign" via XCode).
One sure thing, it's that is possible to codesign an IPA file only on Windows ; like Adobe does with AIR/Flash CS5. Also, Epic Games, Inc. built the UDK (Unreal Development Kit) with a third party tool to codesign IPA files.
This last one was coded in C#/.NET, so I tried to explore the source-code to learn how the codesigning process works but, wow, the code is fairly evolved and even if there are significant similarities between C#/.NET and Delphi, I'm quickly in the blur...
The iPhonePackager from UDK is really close to what I want to do (with less features).
From my research : certificates and keys can be "generated" via OpenSSL in command-line ; Apple uses X509 certificates to codesign the binary (?) ; a component like Bouncy Castle Crypto APIs can be used to manage certificates.
An interesting article about the codesigning process from Apple : http://developer.apple.com/library/mac/#technotes/tn2206/_index.html
Also I'll have to generate, the "CodeResources" ; the "embedded.mobileprovision" from the Mobile Provisioning file ; and the "CodeSignature/CodeResources" with the hierarchy of all files like :
<key>MainWindow.nib</key>
<data>GTBfZPINlJlD7HXjMRAKgfAztXU=</data>
If you read so far, you should definitely have a headache :)
So, below are few questions to start...
Is it possible to re-sign a binary already compiled and signed with "Don't Code Sign" ?
Do you think my project is a really hard job... ?
Do you think it will be better for me to hire a developer ? I can have a budget for this project but ideally I would like to do it by myself of course... :D
Many thanks in advance for advices and/or suggestions.
Beny
To extract the files from an IPA on Windows, you'll need to download DMG Extractor and install it. With DMG Extractor installed, you can double-click your IPA file and it will automatically be loaded in DMG Extractor.
I have written a tool to update the mobile provision and resign the IPA on Windows, the tool and its C# source code (licensed under LGPL) can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With