A third-party company has delivered a signed IPA using their certificates and provisioning profiles.
In order for me to resign the IPA, I need to change the bundle identifier to match my provisioning profile.
I have tried this using Fastlane Sigh (resign.sh), XReSign and a bunch of manual methods listed in this Stack Overflow post about resigning IPAs.
I am resigning the IPA though the Enterprise distribution certificate and installs on the device, however the app crashes on launch with the following error:
default 22:49:29.170425 -0500 assertiond Submitting new job for "ca.mybundleid.here" on behalf of <BKProcess: 0x10130eda0; SpringBoard; com.apple.springboard; pid: 55; agency: SystemShell; visibility: foreground; task: running>
default 22:49:29.170487 -0500 assertiond Submitted job with label: UIKitApplication:ca.mybundleid.here[0xe47b][66]
error 22:49:29.172015 -0500 assertiond Unable to obtain a task name port right for pid 1475: (os/kern) failure (0x5)
error 22:49:29.172074 -0500 assertiond Failed to start job with error <NSError: 0x101354c60; domain: NSPOSIXErrorDomain; code: 3; reason: "The process failed to exec"> {
description = "Unable to get valid task name port right for pid 1475";
failureReason = "The process failed to exec";
recoverySuggestion = "Consult /var/log/com.apple.xpc.launchd/launchd.log for more information";
}
default 22:49:29.172277 -0500 assertiond Deleted job with label: UIKitApplication:ca.mybundleid.here[0xe47b][66]
error 22:49:29.173927 -0500 SpringBoard [ca.mybundleid.here] Bootstrap failed with error: <NSError: 0x1c0459590; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
error 22:49:29.174034 -0500 SpringBoard Bootstrapping failed for <FBApplicationProcess: 0x113768450; ca.mybundleid.here; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID ca.mybundleid.here" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID ca.mybundleid.here, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x1c144a290 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={NSLocalizedFailureReason=The process failed to exec, NSLocalizedRecoverySuggestion=Consult /var/log/com.apple.xpc.launchd/launchd.log for more information, NSLocalizedDescription=Unable to get valid task name port right for pid 1475}}, BSErrorCodeDescription=bootstrap-failed}
The specific error message is Unable to bootstrap process with bundleID ca.mybundleid.here
After doing a bit of digging, it seems this issue is related to changing the bundle identifier.
I also found this post https://oleb.net/blog/2011/06/code-signing-changes-in-xcode-4/ in which he says the following
Update: Colin Humber, developer at TestFlight, made me aware of a potential problem with this approach. Apparently, the App ID of the provisioning profile that is used for building the app is hardcoded into the binary during the build process. If you later resign the app with a provisioning profile that belongs to different App ID, the one in the binary will no longer match the provisioning profile’s App ID since the binary will not be recompiled. This can cause all sorts of problems with services that rely on the App ID, such as access to the keychain, Push Notifications, or In-App Purchasing.
The post also goes on to say that this can be avoided if wildcards are used in the provisioning profiles, however the bundle identifiers from the original IPA and my provisioning profiles are very different.
Given this, is there any possible way for me to resign the application using my certificate and provisioning profile?
Edit: Is that post regarding the bundle id embedded within the binary still accurate?