IOS - 如何退出 ipa 文件?

IOS - How to resign an ipa file?

我尝试重新注册 .ipa 文件,但我遇到了一些问题。 我存档了该项目并将其导出以进行临时部署,然后我按照本教程进行操作:https://sholtz9421.wordpress.com/2012/06/08/digitally-resigning-ipa/。 在安装过程中我遇到了这个错误:"Application is missing the application-identifier entitlement." 所以我创建了一个 "entitlements.plist" 文件并尝试使用参数 --entitlements

退出

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

现在,当我尝试安装 .ipa 文件时出现此错误:"Failed to verify code signature .. (The executable was signed with invalid entitlements)."

我的 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>