重新签署IPA文件

时间:2015-09-04 14:04:30

标签: ios ipa sign

我们有IPA文件,由其他开发人员用他的证书开发。

我们正在尝试重新签署使用其他开发人员证书构建和分发的IPA。如果您之前已经这样做或对此有任何想法,请告诉我。

尝试了以下链接中提到的一些解决方案但是我们能够生成IPA但无法将其安装在设备中。

我们正在iOS 8中尝试它.Mac 10.10。

2 个答案:

答案 0 :(得分:2)

重新签名是一个多步骤过程,可能会在每一步产生错误。所以请耐心等待,并尝试自己理解每一步。

# Start with files:
# .ipa-file 'MyApp.ipa'
# New provisioning profile 'profile.mobileprovision'

# Unpack the .ipa-file
unzip MyApp.ipa

# Extract the old entitlements from the binary
codesign -d --entitlements :- Payload/MyApp.app > entitlements_old.plist

# Extract the new entitlements from the provisioning profile
security cms -D -i profile.mobileprovision > profile.plist
/usr/libexec/PlistBuddy -x -c 'Print :Entitlements' profile.plist > entitlements.plist

现在有一个手动步骤来编辑entitlements.plist,以便application-identifier正确无误。请参考entitlements_old.plist作为参考,但请注意,值开头的团队标识符应该不同。

# Then replace the embedded provisioning profile
cp profile.mobileprovision Payload/MyApp.app/embedded.mobileprovision

# Re-sign the binary and update entitlements
#
# Note: replace "Firstname Lastname (TEAMID123)"
#       with your certificate name
#
codesign -f -s "Firstname Lastname (TEAMID123)" \
    --entitlements entitlements.plist \
    Payload/MyApp.app

# Create ipa
zip -r MyApp2.ipa Payload/

可悲的是,出现错误时的错误消息并未提供有关确切错误的任何特殊信息。但它可能是:

  • 使用错误的签名身份
  • 二进制文件和配置文件之间的权利不匹配

答案 1 :(得分:2)

试试这个软件。通过企业证书重新签署IPA对我来说很好。

https://github.com/maciekish/iReSign

相关问题