Description of the problem
I need to manage an arbitrary application on an iOS device, my plan is to enter the executable file in IPA (where the remote control logic is implemented), and then repack it.
Since the application should work in a controlled environment (specific device), I plan to use my provisioning profile with my development certificate for re-packaging / signing.
To begin with, I'm trying to re-package a third-party application without entering code, this is done as follows:
1. Unzip the existing IPA 2. Copy the provisioning profile to %APP_NAME%.app/embedded.mobileprovisioning 3. export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" 4. signcode --force --deep -s "%Dev Cert Name%" "%Path/To/APP_NAME%.app" 5. zip the re-signed code back together
The Above works great for applications that I manually create using Xcode, however when using IPAs downloaded from the AppStore, this does not work with the following device log error:
<Debug>: AppleFairplayTextCrypterSession::fairplayOpen() failed, error -42112
Checking the "Mach-O" Executable application, I checked that the "Signing Codes" section of the corresponding architecture is completely changed (using the "signcode" tool).
Questions
- Why can't I re-pack the application that I downloaded from the AppStore while the application that I manually create w / Xcode has successfully re-packaged / signed?
- How can I re-pack / sign the AppStore application with my development certificate and provisioning profile?
- How does FairPaly distinguish an application that I manually create (using Xcode) for an application downloaded from the AppStore? What about the remnants of the appstore application that the application does not do manually?
References
source share