Created
April 19, 2014 13:46
-
-
Save piaoapiao/11084898 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPA 重签名 | |
Step1 : 解压IPA | |
unzip MYAPP.ipa | |
Step2: 删除旧的代码签名 | |
rm -rf Payload/ MYAPP.app/_CodeSignature | |
Step3: 更换证书 | |
cp MyEnterprise.mobileprovision Payload/ MYAPP.app/embedded.mobileprovision | |
Step4: 重签名 | |
/usr/bin/codesign -f -s "iPhone Distribution: YourCompanyName" --resource-rules Payload/ MYAPP.app/ResourceRules.plist Payload/ MYAPP.app | |
Step 5: 重新打包,生成新的ipa | |
zip -r New_ MYAPP.ipa Payload | |
说明:MYAPP.ipa --------要重签名的ipa,MyEnterprise.mobileprovision --------------- 要用来签名的provision文件,YourCompanyName--------------指该签名对应的证书的名字,这个可以在keychain中找到。 | |
在step4时有可能会报错:object file format unrecognized, invalid, or unsuitable | |
解决方法: | |
1)首先查看/usr/bin目录下是否存在codesign_allocate程序,如果存在,执行改名操作。 如果不存在,直接执行第二步 | |
sudo mv /usr/bin/codesign_allocate /usr/bin/codesign_allocate_old | |
2)将xcode目录下的codesign_allocate做一个软链接 | |
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment