IOS - 如何重新签名 ipa 文件?

2024-01-12

我尝试重新签署 .ipa 文件,但遇到一些问题。 我存档了该项目并将其导出以进行临时部署,然后按照本教程进行操作:https://sholtz9421.wordpress.com/2012/06/08/digitally-resigning-ipa/ https://sholtz9421.wordpress.com/2012/06/08/digitally-resigning-ipa/。 在安装过程中,我遇到了以下错误:“应用程序缺少应用程序标识符权利。”所以我创建了一个“entitlements.plist”文件,并尝试使用参数 --entitlements 辞职

codesign -f -v -s "MyIdentity" Payload/SampleApp.app --entitlements entitlements.plist

现在,当我尝试安装 .ipa 文件时,出现此错误:“无法验证代码签名..(可执行文件使用无效的权利进行签名)。”

我的 entitlements.plist 文件是这样的:

<?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>{team-identifier}.{bundleId}</string>
    <key>aps-environment</key>
    <string>production</string>
    <key>beta-reports-active</key>
    <true/>
    <key>com.apple.developer.associated-domains</key>
    <string>*</string>
    <key>com.apple.developer.team-identifier</key>
    <string>{team-identifier}</string>
    <key>get-task-allow</key>
    <false/>
    <key>keychain-access-groups</key>
    <array>
       <string>{team-identifier}.*</string>
    </array>
    </dict>
    </plist>

知道问题所在吗?任何帮助表示赞赏。


我找到了解决方案:我使用 IReSign 来重新签名 .ipa 文件。正确的 entitlements.plist 文件是这样的:

<?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>{team-identifier}.{bundleId}</string>
<key>aps-environment</key>
<string>production</string>
<key>com.apple.developer.team-identifier</key>
<string>{team-identifier}</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
    <string>{team-identifier}.{bundleId}</string>
</array>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

IOS - 如何重新签名 ipa 文件? 的相关文章

随机推荐