My client has an iOS app with In-app purchase, Game-kit and Push notifications enabled, it is currently on the app store. I would like to resign the application using an in-house enterprise distribution certificate, to test internally, but still be able to test services tied to the original provisioning profile. Is this possible?
When an Apple iOS provisioning profile expires, device users cannot access the associated application, and new device users cannot install the application.
In the Mobile device management commands window, proceed to the Remove provisioning profile section and click the Send command button. You can also send the command to the mobile device by selecting All commands from the context menu and then selecting Remove provisioning profile.
I ended up doing this, which is a combination of :-
and
1) Create Entitlements plist, prevent issues with the Keychain etc
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>GBA9L2EABG.com.your.bundle.id.MyApp</string>
<key>get-task-allow</key>
<false/>
</dict>
2) Unzip the IPA
unzip Application.ipa
3) Remove the old code signature
rm -r "Payload/Application.app/_CodeSignature" "Payload/Application.app/CodeResources" 2> /dev/null | true
4) Replace embedded mobile provisioning profile
cp "MyEnterprise.mobileprovision" "Payload/Application.app/embedded.mobileprovision"
5) Resign
/usr/bin/codesign -f -s "iPhone Distribution: Certificate Name" --resource-rules "Payload/Application.app/ResourceRules.plist" --entitlements Entitlements.plist "Payload/Application.app"
6) Re-package
zip -qr "Application.resigned.ipa" Payload
To resign an app a bit easier than what @Koko Carl has said, we have adapted the floatsign script, which can be found at https://gist.github.com/Weptun/5406993. Makes the process really easy:
sh floatsign.sh ~/Downloads/File.ipa "iPhone Distribution: CertificateName" -b new.bundle.id -p /Path/To/Profile/Appstore.mobileprovision App-resigned.ipa
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