繁体   English   中英

重新签署IPA文件

[英]re-sign IPA files

我们有另一个开发人员使用其证书开发的IPA文件。

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

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

我们正在iOS 8和Mac 10.10中进行尝试。

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

# 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/

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

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

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

https://github.com/maciekish/iReSign

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM